<!--
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">

        <!-- Branch 1: ProxyCommand in parent args, child process contains "cscript" -->
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">cscript</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">http</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">mshta</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">powershell</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">pwsh</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wmic</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wscript</CommandLine>
        </Rule>

        <!-- Branch 1 (OriginalFileName): ProxyCommand in parent args, child process contains various strings -->
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">cscript</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">mshta</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">powershell</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">pwsh</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wmic</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">ProxyCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wscript</Image>
        </Rule>

        <!-- Branch 2: PermitLocalCommand=yes AND LocalCommand= in parent args, child process contains various strings -->
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">cscript</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">http</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">mshta</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">powershell</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">pwsh</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wmic</CommandLine>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <CommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wscript</CommandLine>
        </Rule>

        <!-- Branch 2 (Image-based child match): PermitLocalCommand=yes AND LocalCommand= in parent args -->
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">cscript</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">mshta</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">powershell</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">pwsh</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wmic</Image>
        </Rule>
        <Rule name="Windows SSH Proxy Command" groupRelation="and">
          <ParentImage name="technique_id=T1572,technique_name=Protocol Tunneling" condition="image">ssh.exe</ParentImage>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> PermitLocalCommand=yes</ParentCommandLine>
          <ParentCommandLine name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains"> LocalCommand=</ParentCommandLine>
          <Image name="technique_id=T1572,technique_name=Protocol Tunneling" condition="contains">wscript</Image>
        </Rule>

      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>