T1027.004 Compile After Delivery
Stealthon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0501 Detection Strategy for Compile After Delivery - Source Code to Executable Transformation
AN1381 Windows
Detects compilation activity using csc.exe, ilasm.exe, or msbuild.exe initiated by user-space processes outside typical development environments, followed by execution or network activity from newly written binaries.
| MITRE log source | In Microsoft Sentinel |
|---|---|
WinEventLog:SysmonEventCode=1 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SysmonEventCode=11 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
WinEventLog:SysmonEventCode=3, 22 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
AN1382 Linux
Detects GCC or Clang invoked on suspicious file paths (e.g., /tmp/, ~/Downloads) with output to executable binaries, followed by execution or outbound traffic from these binaries.
| MITRE log source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLexecve | Not mapped to Sentinel yet. |
auditd:SYSCALLopen,create | Not mapped to Sentinel yet. |
NSM:Flowconn.log | Not mapped to Sentinel yet. |
AN1383 macOS
Detects non-standard compilation activity via Xcode CLI tools or bundled GCC/MONO packages writing new executable files and executing them outside dev environments (e.g., user Downloads folder).
| MITRE log source | In Microsoft Sentinel |
|---|---|
macos:unifiedlogprocess activity, exec events | Not mapped to Sentinel yet. |
macos:osqueryfile_events | Not mapped to Sentinel yet. |
macos:unifiedlognetworkd or socket | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (0)
No Content Hub rule is tagged with this technique.
In Sigma rules
6 SigmaHQ community rules name it in their tags.
- Csc.EXE Execution Form Potentially Suspicious Parent
- Visual Basic Command Line Compiler Usage
- Dynamic .NET Compilation Via Csc.EXE
- Dynamic .NET Compilation Via Csc.EXE - Hunting
- Potential Application Whitelisting Bypass via Dnx.EXE
- Dynamic CSharp Compile Artefact
Mitigations
- None listed by MITRE.
MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.