Detection rules › Kusto Query Language

Potential Build Process Compromise - MDE

Source
upstream

'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

TacticTechniques
PersistenceT1554 Compromise Host Software Binary

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.
Defender-DeviceProcessEvents9001000Process 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.

FieldKindValues
BuildProcessTimele
  • FileEditTime
FileNamematch
  • build_processes