<!--
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_powershell` resolves to: Processes.process_name=powershell.exe OR Processes.process_name=powershell_ise.exe (or similar PowerShell variants). See splunk/security_content for exact macro definition. -->
        <Rule name="Nishang PowershellTCPOneLine" groupRelation="and">
          <Image name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="image">powershell.exe</Image>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains all">Net.Sockets.TCPClient;System.Text.ASCIIEncoding</CommandLine>
        </Rule>
        <Rule name="Nishang PowershellTCPOneLine" groupRelation="and">
          <OriginalFileName name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains all">Net.Sockets.TCPClient;System.Text.ASCIIEncoding</CommandLine>
        </Rule>
        <Rule name="Nishang PowershellTCPOneLine" groupRelation="and">
          <Image name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="image">powershell_ise.exe</Image>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains all">Net.Sockets.TCPClient;System.Text.ASCIIEncoding</CommandLine>
        </Rule>
        <Rule name="Nishang PowershellTCPOneLine" groupRelation="and">
          <OriginalFileName name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="is">powershell_ise.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains all">Net.Sockets.TCPClient;System.Text.ASCIIEncoding</CommandLine>
        </Rule>
        <Rule name="Nishang PowershellTCPOneLine" groupRelation="and">
          <Image name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="image">pwsh.exe</Image>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains all">Net.Sockets.TCPClient;System.Text.ASCIIEncoding</CommandLine>
        </Rule>
        <Rule name="Nishang PowershellTCPOneLine" groupRelation="and">
          <OriginalFileName name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="is">pwsh.dll</OriginalFileName>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains all">Net.Sockets.TCPClient;System.Text.ASCIIEncoding</CommandLine>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>