<!--
MARDUK  /  SYSMON DYNAMIX

       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,,,,,,,,,,,,.     ,,,,,,,,,,,,,,,,,,,,,,
       ,,,,,,,,,,,..,,,,,,,,,.     ,,,,,,,,,,.,,,,,,,,,,,
       ,,,,,,,,,,,    ..,,,,,.     ,,,,,..    ,,,,,,,,,,,
       ,,,,,,,,,,,        ..,.    .,..        ,,,,,,,,,,,

Detection attribution and licensing are documented in THIRD_PARTY_NOTICES.md.
MITRE ATT&amp;CK mapping: © 2026 The MITRE Corporation. This work is reproduced
and distributed with the permission of The MITRE Corporation.
-->
<Sysmon schemaversion="4.90">
  <EventFiltering>
    <RuleGroup name="" groupRelation="or">
      <ProcessCreate onmatch="include">
        <!-- Macro `process_msbuild` resolves to: Processes.process_name=msbuild.exe (matching on the process name msbuild.exe) -->
        <!-- The SPL excludes paths matching *\\framework*\\v*\\* (standard .NET Framework locations), so we match msbuild.exe running from paths that do NOT contain \framework\ combined with a versioned subdirectory. Sysmon cannot express a negative path exclusion as an include-only rule directly; instead we include all msbuild.exe executions and rely on the condition set below to flag the non-standard path case by matching the image condition broadly. Analysts should post-filter on process path in Splunk. The best Sysmon approximation is: Image matches msbuild.exe but does NOT begin with the standard framework paths. -->
        <Rule name="Suspicious msbuild path" groupRelation="and">
          <Image name="technique_id=T1127.001,technique_name=MSBuild" condition="image">msbuild.exe</Image>
          <Image name="technique_id=T1127.001,technique_name=MSBuild" condition="excludes">Microsoft.NET\Framework</Image>
        </Rule>
        <Rule name="Suspicious msbuild path" groupRelation="and">
          <OriginalFileName name="technique_id=T1127.001,technique_name=MSBuild" condition="is">MSBuild.exe</OriginalFileName>
          <Image name="technique_id=T1127.001,technique_name=MSBuild" condition="excludes">Microsoft.NET\Framework</Image>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>