Detection rules › Splunk
WinRM Tools (Sysmon)
Winrm is a command–line tool for system management is implemented in a Visual Basic Scripting Edition file (Winrm.vbs) written using the WinRM scripting API. This tool enables an administrator to configure WinRM and to get data or manage resources. Winrs.exe is a command line tool enables administrators to remotely execute most Cmd.exe commands using the WS-Management protocol. -- The WMI command-line (WMIC) utility provides a command-line interface for Windows Management Instrumentation (WMI). WMIC is compatible with existing shells and utility commands. - ThreatActor Association: Antlion, APT27/Emissary Panda, APT29/Nobelium/Cozy Bear, Carbanak, APT34/OilRig, FIN6, FIN7, FIN8 (Syssphinx), FIN12, FIN13, Flax Typhoon, GhostShell, Lazarus, Magic Hound (aka APT35, Charming Kitten, Phosphorus, and Mint Sandstorm), MalKamak, MuddyWater, TA2541, TA551, Vice Society, Volt Typhoon, WinterVivern/UAC-0114, Witchetty, Wizard Spider
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1047 Windows Management Instrumentation |
| Lateral Movement | T1021.006 Remote Services: Windows Remote Management |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
id: '5490.5683'
title: WinRM Tools
description: 'Winrm is a command–line tool for system management is implemented in
a Visual Basic Scripting Edition file (Winrm.vbs) written using the WinRM scripting
API. This tool enables an administrator to configure WinRM and to get data or manage
resources. Winrs.exe is a command line tool enables administrators to remotely execute
most Cmd.exe commands using the WS-Management protocol. -- The WMI command-line
(WMIC) utility provides a command-line interface for Windows Management Instrumentation
(WMI). WMIC is compatible with existing shells and utility commands. - ThreatActor
Association: Antlion, APT27/Emissary Panda, APT29/Nobelium/Cozy Bear, Carbanak,
APT34/OilRig, FIN6, FIN7, FIN8 (Syssphinx), FIN12, FIN13, Flax Typhoon, GhostShell,
Lazarus, Magic Hound (aka APT35, Charming Kitten, Phosphorus, and Mint Sandstorm),
MalKamak, MuddyWater, TA2541, TA551, Vice Society, Volt Typhoon, WinterVivern/UAC-0114,
Witchetty, Wizard Spider -- Software Association: ALPHV/BlackCat, Astaroth, Avaddon,
AvosLocker, BadHatch, Bazar, Blackcat/ALPHV, Black Basta, Clop, Conti, Cring, IcedID,
Play, Quantum, Ryuk, SamSam, Sodinokibi/REvil, Vice Society, XingLocker -- Atomics
T1047 Test#1 Atomics T1047 Test#2 Atomics T1047 Test#3 Atomics T1047 Test#4 Atomics
T1047 Test#5 Atomics T1047 Test#6 Atomics T1047 Test#9 Atomics T1518.001 Test#6'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 (TERM(winrm) OR
TERM(winrs) OR TERM(wmic)) | regex process="winrm|winrs|wmic" | table _time, host,
user, signature_id, process, process_*, parent_process, parent_process_* | bin span=1s
| stats values(*) as * by _time, host, process | eventstats c(process) as c_process
by process| where c_process<25 '
techniques:
- lateral-movement:remote services:windows remote management
- execution:windows management instrumentation
technique_id:
- T1021.006
- T1047
data_category:
- Windows Sysmon
references:
- http://msdn.microsoft.com/en-us/library/aa384426
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` EventCode=1 (TERM(winrm) OR TERM(winrs) OR TERM(wmic))
Stage 2: regex
| regex process="winrm|winrs|wmic"
Stage 3: table
| table _time, host, user, signature_id, process, process_*, parent_process, parent_process_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host, process
Stage 6: eventstats
| eventstats c(process) as c_process by process
Stage 7: where
| where c_process<25
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | winrm |
| 1 | TERM |
| 1 | winrs |
| 1 | TERM |
| 1 | wmic |