<!--
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">
        <!-- Outer query: cmd.exe launched by a parent other than explorer.exe,
             combined via subsearch join with inner query: reg.exe launched by cmd.exe.
             The net observable in Sysmon is reg.exe spawned by cmd.exe where cmd.exe
             was not spawned by explorer.exe - captured here as ParentImage=cmd.exe
             (reg.exe process) with GrandParent exclusion expressed via separate rules
             for cmd.exe whose parent is not explorer.exe. -->

        <!-- Rule set 1: reg.exe spawned by cmd.exe (Image match) -->
        <Rule name="Suspicious Reg exe Process" groupRelation="and">
          <Image name="technique_id=T1112,technique_name=Modify Registry" condition="image">reg.exe</Image>
          <ParentImage name="technique_id=T1112,technique_name=Modify Registry" condition="image">cmd.exe</ParentImage>
        </Rule>
        <!-- Rule set 2: reg.exe spawned by cmd.exe (OriginalFileName match for reg.exe) -->
        <Rule name="Suspicious Reg exe Process" groupRelation="and">
          <OriginalFileName name="technique_id=T1112,technique_name=Modify Registry" condition="is">reg.exe</OriginalFileName>
          <ParentImage name="technique_id=T1112,technique_name=Modify Registry" condition="image">cmd.exe</ParentImage>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>