kevmap

TechniquesT1027.004 › AN1381

AN1381 Analytic 1381

Windows · attack.mitre.org · ATT&CK Enterprise v19.2

<p>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.</p>
Detects
T1027.004 Compile After Delivery
Part of
DET0501 Detection Strategy for Compile After Delivery - Source Code to Executable Transformation

Log sources and channels

Exactly as MITRE states them in x_mitre_log_source_references. Where a channel is vague, it is vague in the source; kevmap does not tidy it.

Log sourceChannelData component
WinEventLog:SysmonEventCode=1DC0032 Process Creation
WinEventLog:SysmonEventCode=11DC0039 File Creation
WinEventLog:SysmonEventCode=3, 22DC0082 Network Connection Creation

Mutable elements

Parameters MITRE marks as environment-specific. These are the knobs you are expected to tune; they are why an analytic is not a rule.

FieldDescription
ParentProcessNameFilter for unexpected users (non-dev) launching compilers like csc.exe or msbuild.exe
OutputDirectoryPathAdjust paths for sensitive file write zones (e.g., `C:\Users\Public\`, `%TEMP%`, or Desktop)
TimeWindowTune the correlation window between compilation and subsequent execution or C2