<!--
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">
        <!-- process_powershell macro resolves to: process_name IN ("powershell.exe","powershell_ise.exe") OR original_file_name IN ("PowerShell.EXE","powershell_ise.EXE") -->
        <!-- Each of the 4 threat-action parameters is OR'd; all must co-occur with Set-MpPreference and " 6" in the same command line -->
        <!-- Expanded into DNF: (Image/OriginalFileName) x (4 threat params) x (Set-MpPreference) x (" 6") = 16 flat AND Rules -->

        <!-- powershell.exe Image x -HighThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-HighThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell.exe Image x -ModerateThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-ModerateThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell.exe Image x -LowThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-LowThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell.exe Image x -SevereThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-SevereThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell_ise.exe Image x -HighThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-HighThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell_ise.exe Image x -ModerateThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-ModerateThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell_ise.exe Image x -LowThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-LowThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- powershell_ise.exe Image x -SevereThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-SevereThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName PowerShell.EXE x -HighThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-HighThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName PowerShell.EXE x -ModerateThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-ModerateThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName PowerShell.EXE x -LowThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-LowThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName PowerShell.EXE x -SevereThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-SevereThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName powershell_ise.EXE x -HighThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-HighThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName powershell_ise.EXE x -ModerateThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-ModerateThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName powershell_ise.EXE x -LowThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-LowThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

        <!-- OriginalFileName powershell_ise.EXE x -SevereThreatDefaultAction -->
        <Rule name="Powershell Defender Threat Actions Set to Allow" 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">Set-MpPreference</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains">-SevereThreatDefaultAction</CommandLine>
          <CommandLine name="technique_id=T1059.001,technique_name=Command and Scripting Interpreter: PowerShell" condition="contains"> 6</CommandLine>
        </Rule>

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