HackTool - CrackMapExec Execution Patterns

Detects various execution patterns of the CrackMapExec pentesting framework

Sigma rule (View on GitHub)

 1title: HackTool - CrackMapExec Execution Patterns
 2id: 058f4380-962d-40a5-afce-50207d36d7e2
 3status: stable
 4description: Detects various execution patterns of the CrackMapExec pentesting framework
 5references:
 6    - https://github.com/byt3bl33d3r/CrackMapExec
 7author: Thomas Patzke
 8date: 2020-05-22
 9modified: 2023-11-06
10tags:
11    - attack.privilege-escalation
12    - attack.persistence
13    - attack.execution
14    - attack.t1047
15    - attack.t1053
16    - attack.t1059.003
17    - attack.t1059.001
18    - attack.s0106
19logsource:
20    category: process_creation
21    product: windows
22detection:
23    selection:
24        CommandLine|contains:
25            # cme/protocols/smb/wmiexec.py (generalized execute_remote and execute_fileless)
26            - 'cmd.exe /Q /c * 1> \\\\*\\*\\* 2>&1'
27            # cme/protocols/smb/atexec.py:109 (fileless output via share)
28            - 'cmd.exe /C * > \\\\*\\*\\* 2>&1'
29            # cme/protocols/smb/atexec.py:111 (fileless output via share)
30            - 'cmd.exe /C * > *\\Temp\\* 2>&1'
31            # https://github.com/byt3bl33d3r/CrackMapExec/blob/d8c50c8cbaf36c29329078662473f75e440978d2/cme/helpers/powershell.py#L136 (PowerShell execution with obfuscation)
32            - 'powershell.exe -exec bypass -noni -nop -w 1 -C "'
33            # https://github.com/byt3bl33d3r/CrackMapExec/blob/d8c50c8cbaf36c29329078662473f75e440978d2/cme/helpers/powershell.py#L160 (PowerShell execution without obfuscation)
34            - 'powershell.exe -noni -nop -w 1 -enc '
35    condition: selection
36falsepositives:
37    - Unknown
38level: high

References

Related rules

to-top