title: CrackMapExec PowerShell Obfuscation author: Thomas Patzke date: 2020/05/22 description: The CrachMapExec pentesting framework implements a PowerShell obfuscation with some static strings detected by this rule. detection: SELECTION_1: EventID: 1 SELECTION_2: CommandLine: '*powershell.exe*' SELECTION_3: CommandLine: '*join*split*' SELECTION_4: CommandLine: '*( $ShellId[1]+$ShellId[13]+''x'')*' SELECTION_5: CommandLine: '*( $PSHome[*]+$PSHOME[*]+*' SELECTION_6: CommandLine: '*( $env:Public[13]+$env:Public[5]+''x'')*' SELECTION_7: CommandLine: '*( $env:ComSpec[4,*,25]-Join'''')*' SELECTION_8: CommandLine: '*[1,3]+''x''-Join'''')*' condition: (SELECTION_1 and SELECTION_2 and (SELECTION_3 or SELECTION_4 or SELECTION_5 or SELECTION_6 or SELECTION_7 or SELECTION_8)) falsepositives: - Unknown fields: - ComputerName - User - CommandLine id: 6f8b3439-a203-45dc-a88b-abf57ea15ccf level: high logsource: category: process_creation product: windows references: - https://github.com/byt3bl33d3r/CrackMapExec - https://github.com/byt3bl33d3r/CrackMapExec/blob/0a49f75347b625e81ee6aa8c33d3970b5515ea9e/cme/helpers/powershell.py#L242 status: experimental tags: - attack.execution - attack.t1059.001 - attack.defense_evasion - attack.t1027.005 - attack.t1027 - attack.t1086 yml_filename: win_susp_crackmapexec_powershell_obfuscation.yml yml_path: /Users/user/Documents/YamatoSecurity/sigma/rules/windows/process_creation