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

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

Authoring guide

These 72 rules share fields, values, and exclusions.

Fields filtered most (34 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
Image35ends_with 29, contains 7, starts_with 2, wildcard 2, eq 1, is_null 1, regex_match 1\WINWORD.exe, \msdt.exe, :\Temp\, :\Users\Public\, :\Windows\SysWOW64\bash.exe
CommandLine31contains 21, ends_with 4, regex_match 4, gt 2, wildcard 2, eq 1, is_not_null 1, is_null 1, (?i)conhost\.exe.*?\.exe, 1, ^\S+\s, conhost.exe 0xffffffff -ForceV1
OriginalFileName22eq 22Bash.exe, WinWord.exe, Excel.exe, POWERPNT.EXE, forfiles.exe
ParentImage15ends_with 13, contains 1, is_not_null 1\bginfo.exe, \bginfo64.exe, \conhost.exe, \wsl.exe, \wslhost.exe
event.type12eq 12start, change
process_basename10eq 9, in 1forfiles.exe, wsl.exe, Dism.exe, aa-exec, aoss
EventID7eq 6, in 14688, 1, 13, 24
parent_process_basename5eq 5forfiles.exe, wsl.exe, conhost.exe, pcalua.exe, wslhost.exe
process.args5eq 5, starts_with 3, wildcard 2, contains 1*&>*, */dev/tcp/*, */dev/udp/*, --distribution, --headless
EventType4eq 4exec, start, connection_attempted
ParentCommandLine4eq 2, starts_with 1, wildcard 1* curl *, *cmd /c *, *conhost* *.exe*, *forfiles* /c *, *pcalua* -a*
operationName4contains 3, in 1*DeviceHealthScript*, *MobileApp*, DeviceComplianceScript, DeviceManagementScript, create mobileapp
TargetObject3contains 2, wildcard 1*RunMRU*, *\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\*\Packag..., shell\open\command\
process_name3regex_match 2, in 1(?i)^ssh\.exe, 360se.exe, arc.exe, atlas.exe
CurrentDirectory2contains 1, wildcard 1?:\, ?:\*\AppData\*, ?:\Windows\*, \\\\wsl.localhost

Top indicator values (804 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
71036
event.typeeq
start
467
EventIDeq
4688
4284
EventIDeq
1
2226
Imageends_with
\cmd.exe
4132
Imageends_with
\cscript.exe
472
Imageends_with
\powershell.exe
4181
Imageends_with
\pwsh.exe
4166
Imageends_with
\wscript.exe
474
Imageends_with
\WINWORD.exe
317
Imageends_with
\calc.exe
315
Imageends_with
\msdt.exe
310
Imageends_with
\mshta.exe
367
Imageends_with
\regsvr32.exe
364
Imageends_with
:\Windows\SysWOW64\bash.exe
22
Imageends_with
:\Windows\System32\bash.exe
22
Imageends_with
\EXCEL.EXE
216
Imageends_with
\POWERPNT.EXE
214
Imageends_with
\ftp.exe
22
Imageends_with
\rundll32.exe
294
OriginalFileNameeq
WinWord.exe
36
CommandLinegt
1
22
CommandLineregex_match
(?i)conhost\.exe.*?\.exe
22
CommandLineregex_match
^\S+\s
22
CommandLineregex_match
conhost.exe 0xffffffff -ForceV1
22
CommandLinewildcard
*schtasks*
22
EventTypeeq
start
2388
Imagecontains
:\Temp\
211
Imagecontains
:\Users\Public\
213
Imagecontains
:\Windows\Temp\
28

Exclusions (201 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
process_basenameeq
cmd.exe
2
process_basenameeq
powershell.exe
2
CommandLinecontains
--install
1
CommandLinecontains
--unregister
1
CommandLinecontains
-d
1
CommandLinecontains
-e kill
1
CommandLinecontains
-i
1
CommandLinecontains
*/home/linuxbrew/.linuxbrew/*
1
CommandLinecontains
*Homebrew*
1
CommandLinecontains
*WAU-Notify.ps1*
1
CommandLinecontains
*webhook*
1
CommandLinecontains
bash -
1
CommandLinecontains
bash.exe -
1
CommandLineends_with
.dotx
1
CommandLineends_with
.potx
1

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 40 rules

Elastic 14 rules

Splunk 16 rules

Panther 2 rules