<!--
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 OR Processes.original_file_name=PowerShell.EXE -->
        <!-- The SPL regex matches variations of -EncodedCommand (ec, en, enc, enco, encod, encode, encoded, encodedc, encodedco, encodedcom, encodedcomm, encodedcomma, encodedcomman, encodedcommand) preceded by /, - -, -, en-dash, em-dash, or similar Unicode dashes, followed by a base64 string of 5+ chars -->
        <!-- Rules below use CommandLine "contains any" to cover the most common abbreviated and full-length parameter variants across all dash styles -->
        <Rule name="Malicious PowerShell Process - Encoded Command" groupRelation="and">
          <Image name="technique_id=T1027,technique_name=Obfuscated Files or Information" condition="image">powershell.exe</Image>
          <CommandLine name="technique_id=T1027,technique_name=Obfuscated Files or Information" condition="contains any"> -encodedcommand ; --encodedcommand ; /encodedcommand ; -encodedcomman ; --encodedcomman ; /encodedcomman ; -encodedcomma ; --encodedcomma ; /encodedcomma ; -encodedcomm ; --encodedcomm ; /encodedcomm ; -encodedcom ; --encodedcom ; /encodedcom ; -encodedco ; --encodedco ; /encodedco ; -encodedc ; --encodedc ; /encodedc ; -encoded ; --encoded ; /encoded ; -encode ; --encode ; /encode ; -encod ; --encod ; /encod ; -enco ; --enco ; /enco ; -enc ; --enc ; /enc ; -en ; --en ; /en ; -ec ; --ec ; /ec </CommandLine>
        </Rule>
        <Rule name="Malicious PowerShell Process - Encoded Command" groupRelation="and">
          <OriginalFileName name="technique_id=T1027,technique_name=Obfuscated Files or Information" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1027,technique_name=Obfuscated Files or Information" condition="contains any"> -encodedcommand ; --encodedcommand ; /encodedcommand ; -encodedcomman ; --encodedcomman ; /encodedcomman ; -encodedcomma ; --encodedcomma ; /encodedcomma ; -encodedcomm ; --encodedcomm ; /encodedcomm ; -encodedcom ; --encodedcom ; /encodedcom ; -encodedco ; --encodedco ; /encodedco ; -encodedc ; --encodedc ; /encodedc ; -encoded ; --encoded ; /encoded ; -encode ; --encode ; /encode ; -encod ; --encod ; /encod ; -enco ; --enco ; /enco ; -enc ; --enc ; /enc ; -en ; --en ; /en ; -ec ; --ec ; /ec </CommandLine>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>