Obfuscated Files or Information: Compile After Delivery T1027.004

Tactic: Stealth

Adversaries may attempt to make payloads difficult to discover and analyze by delivering files to victims as uncompiled code. Text-based source code files may subvert analysis and scrutiny from protections targeting executables/binaries. These payloads will need to be compiled before execution; typically via native utilities such as ilasm.exe, csc.exe, or GCC/MinGW.

Events covered

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

Authoring guide

Patterns shared across the 14 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 (14 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
CommandLine6contains 4, regex_match 3, wildcard 1(?i)\x5cAppData\x5c|\x5cWindows\x5cTemp, (?:[Pp]rogram[Dd]ata|%(?:[Ll]ocal)?[Aa]pp[Dd]ata%|\\[Aa]p..., *.c, *.c *, *.cc
Image5ends_with 5\csc.exe, \cvtres.exe, \dnx.exe
process_name4eq 3, in 2csc.exe, cargo, cl.exe, clang, iexplore.exe
EventID3eq 34688, 1
ParentCommandLine3contains 3, regex_match 1(?:[Pp]rogram[Dd]ata|%(?:[Ll]ocal)?[Aa]pp[Dd]ata%|\\[Aa]p..., -encoded , :\perflogs\, @modelcontextprotocol, \programdata\microsoft\windows defender advanced threat...
ParentImage3ends_with 2, eq 2, starts_with 2\cscript.exe, \excel.exe, \mshta.exe, \vbc.exe, c:\program files (x86)\
Type3eq 3
event.type3eq 3start
parent_process_name3in 2, eq 1, starts_with 1Cursor Helper, Cursor Helper (Plugin), Jan, MSBuild.exe, cmstp.exe
OriginalFileName2eq 2csc.exe
TargetFilename1ends_with 1.cmdline
event.category1eq 1process
event_type1in 1childproc, netconn, proc
process.args1eq 1build

Top indicator values (155 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
Imageends_with
\csc.exe
39
event.typeeq
start
3606
CommandLineregex_match
(?i)\x5cAppData\x5c|\x5cWindows\x5cTemp
22
EventIDeq
4688
2313
OriginalFileNameeq
csc.exe
22
ParentCommandLinecontains
\programdata\microsoft\windows defender advanced threat protection
2
ParentCommandLinecontains
caewaiagyayqbpagwazqbkaciaogb0ahiadqblacwaigbtahmazwaiadoaigbbag4acwbpagiabab...
2
ParentCommandLinecontains
jwb7aciazgbhagkabablagqaiga6ahqacgb1agualaaiag0acwbnaciaogaiaeeabgbzagkaygbsa...
2
ParentCommandLinecontains
nahsaigbmageaaqbsaguazaaiadoadabyahuazqasaciabqbzagcaiga6aciaqqbuahmaaqbiagwa...
2
ParentImageeq
c:\programdata\chocolatey\choco.exe
2
ParentImageeq
c:\windows\system32\inetsrv\w3wp.exe
2
ParentImageeq
c:\windows\system32\sdiagnhost.exe
2
ParentImagestarts_with
c:\program files (x86)\
2
ParentImagestarts_with
c:\program files\
2
process_nameeq
csc.exe
24
process_namein
csc.exe
22
CommandLinecontains
-o
12
CommandLinecontains
/fullpaths
1
CommandLinecontains
/noconfig
1
CommandLinecontains
/noconfig /fullpaths @
1
CommandLinecontains
:\perflogs\
111
CommandLinecontains
:\users\
16
CommandLinecontains
:\users\public\
118
CommandLinecontains
@
13
CommandLinecontains
\appdata\local\temp\
126
CommandLinecontains
\contacts\
16
CommandLinecontains
\favorites\
16
CommandLinecontains
\favourites\
16
CommandLinecontains
\pictures\
14
CommandLinecontains
\temporary internet
17

Exclusions (13 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
ParentCommandLinecontains
\programdata\microsoft\windows defender advanced threat protection
2
ParentCommandLinecontains
caewaiagyayqbpagwazqbkaciaogb0ahiadqblacwaigbtahmazwaiadoaigbbag4acwbpagiabab...
2
ParentCommandLinecontains
jwb7aciazgbhagkabablagqaiga6ahqacgb1agualaaiag0acwbnaciaogaiaeeabgbzagkaygbsa...
2
ParentCommandLinecontains
nahsaigbmageaaqbsaguazaaiadoadabyahuazqasaciabqbzagcaiga6aciaqqbuahmaaqbiagwa...
2
ParentImageeq
c:\programdata\chocolatey\choco.exe
2
ParentImageeq
c:\windows\system32\inetsrv\w3wp.exe
2
ParentImageeq
c:\windows\system32\sdiagnhost.exe
2
ParentImageeq
c:\programdata\chocolatey\tools\shimgen.exe
1
ParentImagestarts_with
c:\program files (x86)\
2
ParentImagestarts_with
c:\program files\
2
parent_process_nameregex_match
(?i)(^C:\x5cProgram\sFiles)|(sdiagnhost|w3wp|choco)\.exe
2
CommandLineregex_match
(?i)\"C:\x5cWindows\x5cMicrosoft\.NET\x5cFramework64\x5cv\d+\.\d+\.\d+\x5ccsc...
1
parent_processregex_match
(?i)\x5cProgramData\x5cMicrosoft\x5cWindows\sDefender\sAdvanced\sThreat\sProtection
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 6 rules

Elastic 3 rules

Splunk 5 rules