ATT&CK coverage › Technique

Command and Scripting Interpreter: Windows Command Shell T1059.003

Adversaries may abuse the Windows command shell for execution. The Windows command shell (cmd) is the primary command prompt on Windows systems. The Windows command prompt can be used to control almost any aspect of a system, with various permission levels required for different subsets of commands. The command prompt can be invoked remotely via Remote Services such as SSH.

Events covered

13 catalog events are tagged with this technique by at least one rule.

ProviderEvent IDTitle
Sysmon1Process creation
Sysmon3Network connection
Sysmon11FileCreate
Sysmon22DNSEvent (DNS query)
Security-Auditing4688A new process has been created.
Defender-DeviceProcessEvents9001000Process activity (any)
AppLocker8004FilePathBuffer was prevented from running.
AppLocker8007FilePathBuffer was prevented from running.
AppLocker8022PackageBuffer was prevented from running.
AppLocker8025PackageBuffer was prevented from running.
PowerShell4104Creating Scriptblock text (MessageNumber of MessageTotal).
ScreenConnect200Executed command of length.
ScreenConnect201Transferred files with action 'Transfer'.

Authoring guide

Patterns shared across the 31 rules above: which fields they filter on, what specific values they look for, and what they exclude. Field names are normalized across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (15 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
CommandLine19match 18, starts_with 1, in 1, eq 1/../../, suspiciousCmdLineKeywords, http, ://, %AppData%
Image18ends_with 18\cmd.exe, \finger.exe, \rundll32.exe, \crackmapexec.exe, \attrib.exe
OriginalFileName9eq 9Cmd.Exe, cmd.exe, CONHOST.EXE, AdvancedRun.exe, HH.exe
ParentImage7ends_with 6, eq 1\cmd.exe, w3wp.exe, \hh.exe, \ITSMService.exe, \ScreenConnect.ClientService.exe
ParentCommandLine4match 3, ends_with 1, eq 1conhost, .bat, /k, /r, /../../
ScriptBlockText3eq 2, match 1.bat, .cmd, Start-Process, "*.HistorySavePath", "*Remove-Item*"
Data2match 2Executed command of length, Transferred files with action
Provider_Name2eq 2ScreenConnect
EventID2eq 24104
Computer1eq 1exchangeServers
InitiatingProcessFileName1match 1cmd.exe, powershell.exe
Initiated1eq 1true
TargetFilename1match 1\Documents\ConnectWiseControl\Temp\
risk_score1ge 130
process_name1in 1"svchost.exe", "tcc.exe"

Top indicator values (148 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique.

FieldKindValueRules (here)Corpus reach
Imageends_with\cmd.exe992
OriginalFileNameeqCmd.Exe532
CommandLinematch/../../22
Imageends_with\finger.exe29
ParentImageends_with\cmd.exe213
CommandLinematch/c27
Imageends_with\rundll32.exe276
CommandLinematchpowershell216
Provider_NameeqScreenConnect22
EventIDeq41042108
ParentImageeqw3wp.exe1
CommandLinematchsuspiciousCmdLineKeywords1
ComputereqexchangeServers1
InitiatingProcessFileNamematchpowershell.exe1
InitiatingProcessFileNamematchcmd.exe1
CommandLinematch%AppData%17
CommandLinematch://14
CommandLinematchhttp131
ParentCommandLinematchconhost1
Imageends_with\crackmapexec.exe12

Common exclusions (2 distinct)

Field/operator/value combinations that rules under this technique routinely exclude (top-level not() clauses). These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths.

FieldKindValueRules excluding
Imagein"*:\\Windows\\SysWOW64\\*"1
Imagein"*:\\Windows\\System32\\*"1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Sigma 26 rules

Splunk 3 rules

Kusto Query Language 2 rules