Wmiexec.py Execution

This detection analytic looks for wmiprvse.exe spawn cmd.exe with the following command line, cmd.exe /Q /c ', ' 1 \\', ' 2 &1. These strings are specific to the execution of wmiexe.py, which allows a semi-interactive shell used via WMI. Part of the RedCanary 2024 Threat Detection Report.

Sigma rule (View on GitHub)

 1title: Wmiexec.py Execution
 2id: 2968dbf6-77ee-4932-b42b-b453d3ac8915
 3status: experimental
 4description: |
 5    This detection analytic looks for wmiprvse.exe spawn cmd.exe with the following command line, 
 6    `cmd.exe /Q /c ', ' 1 \\', ' 2 &1`. These strings are specific to the execution of wmiexe.py, 
 7    which allows a semi-interactive shell used via WMI. Part of the RedCanary 2024 Threat Detection 
 8    Report.    
 9references:
10    - https://redcanary.com/threat-detection-report/threats/impacket/
11author: RedCanary, Sigma formatting by Micah Babinski
12date: 2024/03/21
13tags:
14    - attack.s0357
15    - attack.execution
16    - attack.t1047
17    - attack.lateral_movement
18    - attack.t1021
19    - attack.t1021.003
20logsource:
21    category: process_creation
22    product: windows
23detection:
24    selection:
25        ParentImage|endswith: '\wmiprvse.exe'
26        Image|endswith: '\cmd.exe'
27        CommandLine|contains:
28            - 'cmd.exe /Q /c '
29            - ' 1> \\'
30            - ' 2>&1'
31    condition: selection
32falsepositives:
33    - Unknown
34level: low```

References

Related rules

to-top