PowerShell Defender Exclusion via Set/Add-MpPreference Command-Line Flags (Windows)

Detects PowerShell commands that add or set Microsoft Defender exclusions using Add/Set-MpPreference parameters.

FreeReviewedSigma · Medium · v1
Product
windows
Category
process_creation
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2021-04-29
Updated
2026-07-30

ATT&CK techniques

  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Defense Evasion

  8. Cred Access

  9. Discovery

  10. Lateral Movement

  11. Collection

  12. C2

  13. Exfiltration

  14. Impact

What it detects

This rule flags PowerShell process creation where the command line uses Microsoft Defender cmdlets Add-MpPreference or Set-MpPreference with parameters that configure antivirus exclusions. Attackers can use exclusion settings to reduce detection coverage by causing Defender to skip scanning specific files, extensions, processes, or IP-related items. It relies on Windows process creation telemetry and matches command-line substrings for the relevant Defender exclusion switches.

Related detections9 linkedT1685 — drag to rearrange
Malicious Microsoft Defender Tampering via PowerShell Preference Cmdlets
Suspicious Windows Defender Exclusion via Add-MpPreference (via process_creation)
Malicious Windows Defender Service Tampering via PowerShell (via process_creation)
Windows Defender Disabled via DisableAntiSpyware Registry Key
Suspicious Vulnerable Intel Ethernet Driver Load for BYOVD via SCATTERED SPIDER (via driver_load)
Malicious Defender Disable And Executable Exclusion Via Registry
Malicious UAC Disable via EnableLUA Registry Modification (via registry_set)
Malicious AMSI and ETW Patching via PowerShell Script
Malicious PowMix AMSI Bypass via amsiInitFailed
PowerShell Defender Exclusion via Set/Add-MpPreference Command-Line Flags (Windows)
Pivot detection · T1685 · 9 related

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.