5007 Defender log · Configuration Change medium severity low volume

Defender Event ID 5007 — Microsoft Defender configuration changed

A Microsoft Defender Antivirus setting was changed — for example an added scan exclusion (path, process, or extension), a disabled feature, or a changed cloud-protection level. Records the value name plus old and new values.

Why event 5007 matters

Attackers add exclusions so Defender ignores their payload directory or process (Set-MpPreference -ExclusionPath / -ExclusionProcess). Exclusion additions for user-writable paths, script interpreters, or wide roots (C:\) are strong indicators of evasion.

How to detect it

Alert on new exclusions, especially for user-writable or overly broad paths and for interpreters (powershell, cmd, wscript). Correlate with 4688 command lines and 4657 registry writes to Exclusions keys.

Log source
Microsoft-Windows-Windows Defender/Operational
On by default where Microsoft Defender Antivirus is active; ensure the Operational channel is collected.
Fields to pivot on
ValueNew ValueOld Value

MITRE ATT&CK mapping

Tactic Technique
Defense Evasion Disable or Modify Tools (T1562.001)

Detection queries

Starting points — adapt the log source, projected fields and thresholds for your environment.

Sigma rule
title: Defender Exclusion Or Config Change
status: experimental
logsource:
  product: windows
  service: windefend
detection:
  sel:
    EventID: 5007
  keywords:
    - 'Exclusions'
  condition: sel and keywords
level: medium
Sentinel / Defender KQL
Event
| where EventLog == "Microsoft-Windows-Windows Defender/Operational" and EventID == 5007   // Microsoft Defender configuration changed
// EventData holds: Value, New Value, Old Value
| project TimeGenerated, Computer, RenderedDescription
| sort by TimeGenerated desc
Splunk SPL
index=* sourcetype="WinEventLog:Microsoft-Windows-Windows Defender/Operational" EventCode=5007
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count   `# Microsoft Defender configuration changed — add EventData fields: Value, New Value, Old Value`
Hunt event 5007 in Sentinel/Defender →
Build a KQL query for this event in the KQL Query Builder.
Search all event IDs →
Open the interactive Windows Event ID lookup.

References

Related Configuration Change events

5001 Microsoft Defender real-time protection disabled

Frequently asked questions

What is Defender Event ID 5007?

Microsoft Defender configuration changed. A Microsoft Defender Antivirus setting was changed — for example an added scan exclusion (path, process, or extension), a disabled feature, or a changed cloud-protection level. Records the value name plus old and new values.

Which log records event 5007?

Event 5007 is written to the Microsoft-Windows-Windows Defender/Operational channel by Microsoft-Windows-Windows Defender. On by default where Microsoft Defender Antivirus is active; ensure the Operational channel is collected.

What MITRE ATT&CK techniques map to event 5007?

Event 5007 is associated with: Disable or Modify Tools (T1562.001).

How do you detect activity around event 5007?

Alert on new exclusions, especially for user-writable or overly broad paths and for interpreters (powershell, cmd, wscript). Correlate with 4688 command lines and 4657 registry writes to Exclusions keys.