<!--
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">
        <!-- Detection: Windows Command and Scripting Interpreter Hunting Path Traversal -->
        <!-- The SPL filters on Processes.process (CommandLine) containing path traversal patterns -->
        <!-- and then requires count_of_pattern > 1, meaning MORE THAN ONE occurrence of the pattern. -->
        <!-- Sysmon's "contains" checks for at least one occurrence; to approximate "more than one" -->
        <!-- occurrence we use "contains all" with two instances of the pattern separated by a semicolon, -->
        <!-- which requires BOTH to be present simultaneously - this is the closest valid Sysmon approximation. -->
        <Rule name="Windows Command and Scripting Interpreter Hunting Path Traversal" groupRelation="and">
          <CommandLine name="technique_id=T1059,technique_name=Command and Scripting Interpreter" condition="contains all">/..\;/..</CommandLine>
        </Rule>
        <Rule name="Windows Command and Scripting Interpreter Hunting Path Traversal" groupRelation="and">
          <CommandLine name="technique_id=T1059,technique_name=Command and Scripting Interpreter" condition="contains all">\..;\..&amp;</CommandLine>
        </Rule>
        <!-- Pattern: \.. appearing more than once (XML-safe representation) -->
        <!-- Using contains all with two distinct anchor strings to require multiple occurrences -->
        <Rule name="Windows Command and Scripting Interpreter Hunting Path Traversal" groupRelation="and">
          <CommandLine name="technique_id=T1059,technique_name=Command and Scripting Interpreter" condition="contains all">\..\;\..</CommandLine>
        </Rule>
        <!-- Pattern: \\.. appearing more than once -->
        <Rule name="Windows Command and Scripting Interpreter Hunting Path Traversal" groupRelation="and">
          <CommandLine name="technique_id=T1059,technique_name=Command and Scripting Interpreter" condition="contains all">\\..\;\\..</CommandLine>
        </Rule>
        <!-- Pattern: //.. appearing more than once -->
        <Rule name="Windows Command and Scripting Interpreter Hunting Path Traversal" groupRelation="and">
          <CommandLine name="technique_id=T1059,technique_name=Command and Scripting Interpreter" condition="contains all">//..\;//..</CommandLine>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>