<!--
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">
        <!-- Rule logic: CommandLine contains \\.\pipe\ AND (ParentImage NOT in trusted paths OR Image NOT in trusted paths) -->
        <!-- Expanded into DNF: two flat AND-rules covering the two OR branches of the NOT-path exclusion -->

        <!-- Branch 1: CommandLine contains named pipe AND ParentImage is NOT in a trusted directory -->
        <Rule name="Windows Process With NamedPipe CommandLine" groupRelation="and">
          <CommandLine name="technique_id=T1055,technique_name=Process Injection" condition="contains">\\.\pipe\</CommandLine>
          <ParentImage name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Program Files (x86)\</ParentImage>
          <ParentImage name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Program Files\</ParentImage>
          <ParentImage name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Windows\System32\</ParentImage>
          <ParentImage name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Windows\SysWOW64\</ParentImage>
        </Rule>

        <!-- Branch 2: CommandLine contains named pipe AND Image (process path) is NOT in a trusted directory -->
        <Rule name="Windows Process With NamedPipe CommandLine" groupRelation="and">
          <CommandLine name="technique_id=T1055,technique_name=Process Injection" condition="contains">\\.\pipe\</CommandLine>
          <Image name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Program Files (x86)\</Image>
          <Image name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Program Files\</Image>
          <Image name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Windows\System32\</Image>
          <Image name="technique_id=T1055,technique_name=Process Injection" condition="not begin with">C:\Windows\SysWOW64\</Image>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>