Indirect Command Execution T1202

Tactic: Stealth

Adversaries may abuse utilities that allow for command execution to bypass security restrictions that limit the use of command-line interpreters. Various Windows utilities may be used to execute commands, possibly without invoking cmd. For example, Forfiles, the Program Compatibility Assistant (`pcalua.exe`), components of the Windows Subsystem for Linux (WSL), `Scriptrunner.exe`, as well as other utilities may invoke the execution of programs and commands from a Command and Scripting Interpreter, Run window, or via scripts. Adversaries may also abuse the `ssh.exe` binary to execute malicious commands via the `ProxyCommand` and `LocalCommand` options, which can be invoked via the `-o` flag or by modifying the SSH config file.

Events covered

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

Authoring guide

Patterns shared across the 69 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names 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 (33 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
Image36ends_with 29, contains 7, eq 2, starts_with 2, wildcard 2, is_not_null 1, is_null 1, regex_match 1\msdt.exe, \winword.exe, :\temp\, :\users\public\, :\windows\system32\bash.exe
CommandLine31contains 21, ends_with 4, regex_match 4, wildcard 2, eq 1, is_not_null 1, is_null 1(?i)conhost\.exe.*?\.exe, ^\S+\s, conhost.exe 0xffffffff -ForceV1, --exec, --install
OriginalFileName22eq 22bash.exe, winword.exe, excel.exe, forfiles.exe, ftp.exe
ParentImage16ends_with 13, contains 1, is_not_null 1, ne 1\bginfo.exe, \bginfo64.exe, \conhost.exe, \wsl.exe, \wslhost.exe
event.type13eq 13start, change
process_name13eq 10, in 2, match 2, ne 1(?i)^ssh\.exe, busybox, forfiles.exe, wsl.exe, aa-exec
EventID6eq 64688, 1
parent_process_name6eq 4, regex_match 2, ends_with 1, in 1, ne 1(?i)(forfiles|fodhelper|ftp|pcalua)\.exe, wsl.exe, apt, apt-get, awk
process.args6eq 5, wildcard 3, starts_with 2, ends_with 1--, --distribution, --exec, --headless, --install
operationName4contains 3, in 1create mobileapp, devicecompliancescript, devicehealthscript, devicemanagementscript, mobileapp
EventType3eq 3exec, connection_attempted
ParentCommandLine3eq 2, starts_with 1*forfiles* /c *, *pcalua* -a*, bash
Type3eq 3
host.os.type3eq 3
Description2eq 2PAExec Application, The curl executable

Top indicator values (735 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. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
12606
EventIDeq
4688
4313
EventIDeq
1
2237
Imageends_with
\cmd.exe
4130
Imageends_with
\cscript.exe
473
Imageends_with
\powershell.exe
4182
Imageends_with
\pwsh.exe
4168
Imageends_with
\wscript.exe
475
Imageends_with
\calc.exe
313
Imageends_with
\msdt.exe
39
Imageends_with
\mshta.exe
367
Imageends_with
\regsvr32.exe
365
Imageends_with
\winword.exe
320
Imageends_with
:\windows\system32\bash.exe
22
Imageends_with
:\windows\syswow64\bash.exe
22
Imageends_with
\excel.exe
218
Imageends_with
\ftp.exe
22
Imageends_with
\powerpnt.exe
215
Imageends_with
\rundll32.exe
295
EventTypeeq
exec
3171
OriginalFileNameeq
bash.exe
34
OriginalFileNameeq
winword.exe
36
OriginalFileNameeq
excel.exe
24
CommandLineregex_match
(?i)conhost\.exe.*?\.exe
22
CommandLineregex_match
^\S+\s
22
CommandLineregex_match
conhost.exe 0xffffffff -ForceV1
22
CommandLinewildcard
*schtasks*
22
Imagecontains
:\temp\
213
Imagecontains
:\users\public\
215
Imagecontains
:\windows\temp\
29

Exclusions (161 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. 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. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
CommandLinecontains
--install
1
CommandLinecontains
--unregister
1
CommandLinecontains
-d
1
CommandLinecontains
-e kill
1
CommandLinecontains
-i
1
CommandLinecontains
/home/linuxbrew/.linuxbrew/
1
CommandLinecontains
bash -
1
CommandLinecontains
bash.exe -
1
CommandLinecontains
homebrew
1
CommandLinecontains
wau-notify.ps1
1
CommandLinecontains
webhook
1
CommandLineends_with
.dotx
1
CommandLineends_with
.potx
1
CommandLineends_with
.xltx
1
CommandLineeq
bash
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.

Platform (all)
Domain (all)

Sigma 40 rules

Elastic 13 rules

Splunk 14 rules

Panther 2 rules