← Back to SOC feed Coverage →

HackTool - CrackMapExec Execution Patterns

sigma HIGH SigmaHQ
T1047T1053T1059.003T1059.001
imProcessCreate
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-05-08T23:00:01Z · Confidence: high

Hunt Hypothesis

Detects various execution patterns of the CrackMapExec pentesting framework

Detection Rule

Sigma (Original)

title: HackTool - CrackMapExec Execution Patterns
id: 058f4380-962d-40a5-afce-50207d36d7e2
status: stable
description: Detects various execution patterns of the CrackMapExec pentesting framework
references:
    - https://github.com/byt3bl33d3r/CrackMapExec
author: Thomas Patzke
date: 2020-05-22
modified: 2023-11-06
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.execution
    - attack.t1047
    - attack.t1053
    - attack.t1059.003
    - attack.t1059.001
    - attack.s0106
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains:
            # cme/protocols/smb/wmiexec.py (generalized execute_remote and execute_fileless)
            - 'cmd.exe /Q /c * 1> \\\\*\\*\\* 2>&1'
            # cme/protocols/smb/atexec.py:109 (fileless output via share)
            - 'cmd.exe /C * > \\\\*\\*\\* 2>&1'
            # cme/protocols/smb/atexec.py:111 (fileless output via share)
            - 'cmd.exe /C * > *\\Temp\\* 2>&1'
            # https://github.com/byt3bl33d3r/CrackMapExec/blob/d8c50c8cbaf36c29329078662473f75e440978d2/cme/helpers/powershell.py#L136 (PowerShell execution with obfuscation)
            - 'powershell.exe -exec bypass -noni -nop -w 1 -C "'
            # https://github.com/byt3bl33d3r/CrackMapExec/blob/d8c50c8cbaf36c29329078662473f75e440978d2/cme/helpers/powershell.py#L160 (PowerShell execution without obfuscation)
            - 'powershell.exe -noni -nop -w 1 -enc '
    condition: selection
falsepositives:
    - Unknown
level: high

KQL (Azure Sentinel)

imProcessCreate
| where (TargetProcessCommandLine contains "cmd.exe /Q /c " and TargetProcessCommandLine contains " 1> \\" and TargetProcessCommandLine contains "\\" and TargetProcessCommandLine contains "\\" and TargetProcessCommandLine contains " 2>&1") or (TargetProcessCommandLine contains "cmd.exe /C " and TargetProcessCommandLine contains " > \\" and TargetProcessCommandLine contains "\\" and TargetProcessCommandLine contains "\\" and TargetProcessCommandLine contains " 2>&1") or (TargetProcessCommandLine contains "cmd.exe /C " and TargetProcessCommandLine contains " > " and TargetProcessCommandLine contains "\\Temp\\" and TargetProcessCommandLine contains " 2>&1") or TargetProcessCommandLine contains "powershell.exe -exec bypass -noni -nop -w 1 -C \"" or TargetProcessCommandLine contains "powershell.exe -noni -nop -w 1 -enc "

Required Data Sources

Sentinel TableNotes
imProcessCreateEnsure this data connector is enabled

False Positive Guidance

MITRE ATT&CK Context

References

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_hktl_crackmapexec_execution_patterns.yml