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 Vulnerable Driver Service Creation for BYOVD (via process_creation)
Malicious Microsoft Defender Disabled via Registry DisableAntiSpyware (via process_creation)
Suspicious Termination of Defender Tray Process via Taskkill
Malicious Windows Defender Disablement via MpCmdRun RemoveDefinitions
Malicious Unsigned VIB Installation on ESXi Host via esxcli (via process_creation)
Suspicious In-Memory PowerShell Execution from Web Server via Automation Assembly (via image_load)
Malicious EDR Evasion Driver Load from AnyDesk Directory via k.sys (via image_load)
Malicious Zemana Vulnerable Driver Load for EDR Termination (via image_load)
Suspicious EDRKillShifter Vulnerable Driver Load from User Temp Directory (via image_load)
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.