<!--
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">
        <!-- (Add-MpPreference OR Set-MpPreference) AND (-Exclusion OR -ControlledFolderAccessAllowedApplications OR -AttackSurfaceReductionOnlyExclusions) -->
        <!-- Expanded into DNF: 2 cmdlet values x 3 exclusion parameter values x 2 match methods (Image/OriginalFileName for powershell.exe) = 12 flat Rules -->

        <!-- Add-MpPreference + -Exclusion* via Image -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <Image name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="end with">powershell.exe</Image>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Add-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-Exclusion</CommandLine>
        </Rule>
        <!-- Add-MpPreference + -ControlledFolderAccessAllowedApplications via Image -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <Image name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="end with">powershell.exe</Image>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Add-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-ControlledFolderAccessAllowedApplications</CommandLine>
        </Rule>
        <!-- Add-MpPreference + -AttackSurfaceReductionOnlyExclusions via Image -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <Image name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="end with">powershell.exe</Image>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Add-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-AttackSurfaceReductionOnlyExclusions</CommandLine>
        </Rule>
        <!-- Set-MpPreference + -Exclusion* via Image -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <Image name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="end with">powershell.exe</Image>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Set-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-Exclusion</CommandLine>
        </Rule>
        <!-- Set-MpPreference + -ControlledFolderAccessAllowedApplications via Image -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <Image name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="end with">powershell.exe</Image>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Set-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-ControlledFolderAccessAllowedApplications</CommandLine>
        </Rule>
        <!-- Set-MpPreference + -AttackSurfaceReductionOnlyExclusions via Image -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <Image name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="end with">powershell.exe</Image>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Set-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-AttackSurfaceReductionOnlyExclusions</CommandLine>
        </Rule>
        <!-- Add-MpPreference + -Exclusion* via OriginalFileName -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <OriginalFileName name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Add-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-Exclusion</CommandLine>
        </Rule>
        <!-- Add-MpPreference + -ControlledFolderAccessAllowedApplications via OriginalFileName -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <OriginalFileName name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Add-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-ControlledFolderAccessAllowedApplications</CommandLine>
        </Rule>
        <!-- Add-MpPreference + -AttackSurfaceReductionOnlyExclusions via OriginalFileName -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <OriginalFileName name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Add-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-AttackSurfaceReductionOnlyExclusions</CommandLine>
        </Rule>
        <!-- Set-MpPreference + -Exclusion* via OriginalFileName -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <OriginalFileName name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Set-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-Exclusion</CommandLine>
        </Rule>
        <!-- Set-MpPreference + -ControlledFolderAccessAllowedApplications via OriginalFileName -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <OriginalFileName name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Set-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-ControlledFolderAccessAllowedApplications</CommandLine>
        </Rule>
        <!-- Set-MpPreference + -AttackSurfaceReductionOnlyExclusions via OriginalFileName -->
        <Rule name="Add or Set Windows Defender Exclusion" groupRelation="and">
          <OriginalFileName name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="is">PowerShell.EXE</OriginalFileName>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">Set-MpPreference </CommandLine>
          <CommandLine name="technique_id=T1685,technique_name=Add or Set Windows Defender Exclusion" condition="contains">-AttackSurfaceReductionOnlyExclusions</CommandLine>
        </Rule>
      </ProcessCreate>
    </RuleGroup>
  </EventFiltering>
</Sysmon>