Detect MSBuild spawning a script interpreter or signed-binary proxy
Matches msbuild.exe becoming the parent of one of the high-risk children MITRE enumerates in AN1535 — the analytic's SuspiciousChildList knob, whose values (powershell.exe, rundll32.exe, regsvr32.exe, cmd.exe, wscript.exe, mshta.exe) MITRE spells out, extended here with cscript.exe, pwsh.exe and certutil.exe. AN1535 is a scored chain across seven event sources: anomalous msbuild invocation, then a payload write, an unsigned module load, a remote thread and egress inside a correlation window. Sigma has no cross-event join, no timeframe and no signature field on process creation, so only the child-spawn leg is expressed and the UnsignedOrInvalidSignatureOnly, RarePathRegex and NetworkReputationThreshold knobs have no equivalent in one event. The inline task itself is invisible here: what an inline task compiles and runs lives in the XML project file, not on the command line, so this rule sees the consequence rather than the abuse. Note the analytic's process source is Security 4688, which requires the Audit Process Creation subcategory to be enabled; without it this rule returns nothing at all. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0556, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
title: Detect MSBuild spawning a script interpreter or signed-binary proxyid: a36895e4-2e2e-4579-978f-2c50384ff605status: experimentaldescription: | Matches msbuild.exe becoming the parent of one of the high-risk children MITRE enumerates in AN1535 — the analytic's SuspiciousChildList knob, whose values (powershell.exe, rundll32.exe, regsvr32.exe, cmd.exe, wscript.exe, mshta.exe) MITRE spells out, extended here with cscript.exe, pwsh.exe and certutil.exe. AN1535 is a scored chain across seven event sources: anomalous msbuild invocation, then a payload write, an unsigned module load, a remote thread and egress inside a correlation window. Sigma has no cross-event join, no timeframe and no signature field on process creation, so only the child-spawn leg is expressed and the UnsignedOrInvalidSignatureOnly, RarePathRegex and NetworkReputationThreshold knobs have no equivalent in one event. The inline task itself is invisible here: what an inline task compiles and runs lives in the XML project file, not on the command line, so this rule sees the consequence rather than the abuse. Note the analytic's process source is Security 4688, which requires the Audit Process Creation subcategory to be enabled; without it this rule returns nothing at all. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0556, not hand-written and not tested by its author. Any lab result is on this rule's own page.references: - https://attack.mitre.org/techniques/T1127/001 - https://attack.mitre.org/detectionstrategies/DET0556author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags: - attack.defense-evasion - attack.execution - attack.t1127.001logsource: category: process_creation product: windowsdetection: selection_parent: ParentImage|endswith: '\msbuild.exe' selection_child: Image|endswith: - '\powershell.exe' - '\pwsh.exe' - '\cmd.exe' - '\wscript.exe' - '\cscript.exe' - '\mshta.exe' - '\rundll32.exe' - '\regsvr32.exe' - '\certutil.exe' condition: selection_parent and selection_childfalsepositives: - "Ordinary builds on developer workstations and CI agents. MSBuild Exec tasks, pre-build and post-build events shell out through cmd.exe on almost every non-trivial project, and many SDK targets call powershell.exe to sign, package or publish output. On a build host this pair is the normal case, not the exception, which is what MITRE's DeveloperHosts knob exists to scope away." - "Visual Studio and NuGet package install and restore scripts, which are PowerShell by design and run with msbuild.exe as the parent whenever a package ships an install.ps1 or a targets file that invokes one." - "Installer and setup projects whose custom actions register components with regsvr32.exe or rundll32.exe as part of a legitimate build or deployment step, producing the exact parent-child pair the rule keys on with no command-line difference to separate it from proxy execution."level: highSentinel · KQL
Run this as a search.
DeviceProcessEvents| where (InitiatingProcessFolderPath endswith "\\msbuild.exe" and (FolderPath endswith "\\powershell.exe" or FolderPath endswith "\\pwsh.exe" or FolderPath endswith "\\cmd.exe" or FolderPath endswith "\\wscript.exe" or FolderPath endswith "\\cscript.exe" or FolderPath endswith "\\mshta.exe" or FolderPath endswith "\\rundll32.exe" or FolderPath endswith "\\regsvr32.exe" or FolderPath endswith "\\certutil.exe"))
Splunk · SPL
Run this as a search.
index=* (ParentImage="*\\msbuild.exe" AND (Image="*\\powershell.exe" OR Image="*\\pwsh.exe" OR Image="*\\cmd.exe" OR Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\mshta.exe" OR Image="*\\rundll32.exe" OR Image="*\\regsvr32.exe" OR Image="*\\certutil.exe"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (TO_LOWER(process.parent.executable) LIKE "*\\\\msbuild.exe" AND (TO_LOWER(process.executable) LIKE "*\\\\powershell.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pwsh.exe" OR TO_LOWER(process.executable) LIKE "*\\\\cmd.exe" OR TO_LOWER(process.executable) LIKE "*\\\\wscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\cscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\mshta.exe" OR TO_LOWER(process.executable) LIKE "*\\\\rundll32.exe" OR TO_LOWER(process.executable) LIKE "*\\\\regsvr32.exe" OR TO_LOWER(process.executable) LIKE "*\\\\certutil.exe"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="12"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="ParentImage" type="pcre2">(?i)\\msbuild\.exe$</field> <field name="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$|\\cmd\.exe$|\\wscript\.exe$|\\cscript\.exe$|\\mshta\.exe$|\\rundll32\.exe$|\\regsvr32\.exe$|\\certutil\.exe$)</field> <description>Detect MSBuild spawning a script interpreter or signed-binary proxy</description> <mitre> <id>T1127.001</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.