Detection rules › Sigma
Cmd.EXE Missing Space Characters Execution Anomaly
Detects Windows command lines that miss a space before or after the /c flag when running a command using the cmd.exe. This could be a sign of obfuscation of a fat finger problem (typo by the developer).
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1059.001 Command and Scripting Interpreter: PowerShell |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
| Security-Auditing | 4688 | A new process has been created. |
Stages and Predicates
Stage 1: 1 of selection1
or:
CommandLine|contains: '"cmd/c'
CommandLine|contains: '"cmd/k'
CommandLine|contains: '"cmd/r'
CommandLine|contains: '\cmd/c'
CommandLine|contains: '\cmd/k'
CommandLine|contains: '\cmd/r'
CommandLine|contains: 'cmd.exe/c'
CommandLine|contains: 'cmd.exe/k'
CommandLine|contains: 'cmd.exe/r'
Stage 2: 1 of selection2
or:
CommandLine|contains: '/cbitsadmin'
CommandLine|contains: '/ccertutil'
CommandLine|contains: '/cpowershell'
CommandLine|contains: '/cschtasks'
CommandLine|contains: '/cwhoami'
CommandLine|contains: '/kbitsadmin'
CommandLine|contains: '/kcertutil'
CommandLine|contains: '/kpowershell'
CommandLine|contains: '/kschtasks'
CommandLine|contains: '/kwhoami'
Stage 3: 1 of selection3
or:
CommandLine|contains: 'cmd /c'
CommandLine|contains: 'cmd /k'
CommandLine|contains: 'cmd /r'
CommandLine|contains: 'cmd.exe /c'
CommandLine|contains: 'cmd.exe /k'
CommandLine|contains: 'cmd.exe /r'
Stage 4: not 1 of filter_*
or:
CommandLine|endswith: 'cmd.exe/c .'
CommandLine: 'cmd.exe /c'
CommandLine|contains: 'AppData\Local\Programs\Microsoft VS Code\resources\app\node_modules'
CommandLine|contains: 'cmd /c '
CommandLine|contains: 'cmd /k '
CommandLine|contains: 'cmd /r '
CommandLine|contains: 'cmd.exe /c '
CommandLine|contains: 'cmd.exe /k '
CommandLine|contains: 'cmd.exe /r '
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.
| Field | Kind | Values |
|---|---|---|
CommandLine | ends_with |
|
CommandLine | eq |
|
CommandLine | match |
|