Detection rules › Kusto Query Language
Potential Build Process Compromise - MDE
'The query looks for source code files being modified immediately after a build process is started. The purpose of this is to look for malicious code injection during the build process. This query uses Microsoft Defender for Endpoint telemetry. More details: https://techcommunity.microsoft.com/t5/azure-sentinel/monitoring-the-software-supply-chain-with-azure-sentinel/ba-p/2176463'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1554 Compromise Host Software Binary |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
| Security-Auditing | 4688 | A new process has been created. |
| Defender-DeviceProcessEvents | 9001000 | Process activity (any) |
Stages and Predicates
Stage 1: source
DeviceProcessEvents
Stage 2: where
macro "(TimeGenerated > ago(timeframe))"
Stage 3: where
FileName match "build_processes"
Stage 4: summarize
Stage 5: join
Stage 6: where
BuildProcessTime le "FileEditTime"
Stage 7: summarize
Stage 8: extend
Stage 9: extend
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
BuildProcessTime | le |
|
FileName | match |
|