Trusted Developer Utilities Proxy Execution: MSBuild T1127.001

Tactics: Stealth, Execution

Adversaries may use MSBuild to proxy execution of code through a trusted Windows utility. MSBuild.exe (Microsoft Build Engine) is a software build platform used by Visual Studio. It handles XML formatted project files that define requirements for loading and building various platforms and configurations.

Events covered

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

Authoring guide

Patterns shared across the 22 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 (25 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
process_name18eq 13, regex_match 2, in 1, ne 1, wildcard 1msbuild.exe, certutil.exe, (?i)msbuild\.exe, cmd.exe, *.com
parent_process_name12eq 7, in 3, regex_match 2explorer.exe, (?i)(cmd|powershell(_ise)?|pwsh|cscript|wscript|mshta)\.exe, MSBuild.exe, cmd.exe, cscript.exe
event.type10eq 10start
OriginalFileName9eq 8, in 1msbuild.exe, cscript.exe, installutil.exe
Image5wildcard 2, ends_with 1, ne 1, starts_with 1*\\framework*\\v*\\*, ?:\programdata\*.exe, ?:\users\*\appdata\*.exe, ?:\users\*\downloads\*.exe, ?:\users\public\*.exe
EventID3eq 34688, 1
EventType3eq 3start, connection_attempted, lookup_requested
process.args3eq 1, starts_with 1, wildcard 1-n, ?:\Users\*\AppData\Local\Temp\tmp*.exec.cmd, C:\Intel\, C:\PerfLogs\, C:\ProgramData\
dns.question.name2is_not_null 2, match 1.*\.(top|buzz|xyz|rest|ml|cf|gq|ga|onion|monster|cyou|que...
event.category2eq 2process
process.code_signature.trusted2eq 1, ne 1false, true
CommandLine1contains 1-encodedcommand
CurrentDirectory1starts_with 1D:\, E:\, F:\
DestinationPort1eq 1443, 80
EfectiveCommand1regex_match 1regexEmpire

Top indicator values (144 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
process_nameeq
msbuild.exe
1216
process_nameeq
mshta.exe
431
process_nameeq
regsvr32.exe
425
process_nameeq
wscript.exe
429
process_nameeq
certutil.exe
322
process_nameeq
cscript.exe
325
process_nameeq
installutil.exe
318
process_nameeq
powershell.exe
3104
process_nameeq
rundll32.exe
360
process_nameeq
cmd.exe
277
process_nameeq
ieexec.exe
28
process_nameeq
iexpress.exe
28
process_nameeq
microsoft.workflow.compiler.exe
28
process_nameeq
msiexec.exe
222
process_nameeq
msxsl.exe
29
process_nameeq
wmic.exe
247
event.typeeq
start
10606
OriginalFileNameeq
msbuild.exe
811
parent_process_nameeq
explorer.exe
320
parent_process_nameeq
wmiprvse.exe
211
EventIDeq
4688
2313
EventTypeeq
start
216
event.categoryeq
process
2128
parent_process_namein
cscript.exe
25
parent_process_namein
wscript.exe
25
parent_process_nameregex_match
(?i)(cmd|powershell(_ise)?|pwsh|cscript|wscript|mshta)\.exe
22
process_nameregex_match
(?i)msbuild\.exe
22
CommandLinecontains
-encodedcommand
13
CurrentDirectorystarts_with
D:\
1
CurrentDirectorystarts_with
E:\
1

Exclusions (98 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
process_nameeq
powershell.exe
2
CommandLinecontains
\.nuget\packages\vswhere\
1
CommandLinecontains
common\..\..\buildtools\
1
CommandLinecontains
git log --pretty=format
1
CommandLinecontains
vswhere.exe -property catalog_productsemanticversion
1
CommandLineeq
driver\DPInst_x64 /f
1
CurrentDirectorywildcard
?:\Users\*\AppData\Local\Temp\BackupBootstrapper\Logs\
1
CurrentDirectorywildcard
?:\Users\*\AppData\Local\Temp\QBTools\
1
CurrentDirectorywildcard
?:\Windows\TempInst\*
1
EventDatacontains
gc_service.exe
1
EventDatacontains
gc_worker.exe
1
Imagein
c:\program files (x86)\microsoft visual...
1
Imagein
c:\program files (x86)\microsoft visual...
1
Imagein
c:\program files (x86)\microsoft visual...
1
Imagein
c:\program files (x86)\microsoft visual...
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 1 rule

Elastic 14 rules

Splunk 6 rules

Kusto 1 rule