EXPLORE
← Back to Explore
splunk_escuHunting

Windows Defender ASR Rules Stacking

The following analytic identifies security events from Microsoft Defender, focusing on Exploit Guard and Attack Surface Reduction (ASR) features. It detects Event IDs 1121, 1126, 1131, and 1133 for blocked operations, and Event IDs 1122, 1125, 1132, and 1134 for audit logs. Event ID 1129 indicates user overrides, while Event ID 5007 signals configuration changes. This detection uses a lookup to correlate ASR rule GUIDs with descriptive names. Monitoring these events is crucial for identifying unauthorized operations, potential security breaches, and policy enforcement issues. If confirmed malicious, attackers could bypass security measures, execute unauthorized actions, or alter system configurations.

MITRE ATT&CK

execution

Detection Query

`ms_defender` EventCode IN (1121, 1122, 1125, 1126, 1129, 1131, 1132, 1133, 1134, 5007)
  | stats count min(_time) as firstTime max(_time) as lastTime
    BY host Parent_Commandline, Process_Name,
       Path, ID, EventCode
  | lookup asr_rules ID OUTPUT ASR_Rule
  | fillnull value=NULL
  | `security_content_ctime(firstTime)`
  | `security_content_ctime(lastTime)`
  | rename host as dest
  | `windows_defender_asr_rules_stacking_filter`

Author

Michael Haag, Splunk

Created

2026-02-25

Data Sources

Windows Event Log Defender 1121Windows Event Log Defender 1122Windows Event Log Defender 1125Windows Event Log Defender 1126Windows Event Log Defender 1129Windows Event Log Defender 1131Windows Event Log Defender 1133Windows Event Log Defender 1134Windows Event Log Defender 5007

Tags

Windows Attack Surface Reduction
Raw Content
name: Windows Defender ASR Rules Stacking
id: 425a6657-c5e4-4cbb-909e-fc9e5d326f01
version: 7
date: '2026-02-25'
author: Michael Haag, Splunk
status: production
type: Hunting
data_source:
    - Windows Event Log Defender 1121
    - Windows Event Log Defender 1122
    - Windows Event Log Defender 1125
    - Windows Event Log Defender 1126
    - Windows Event Log Defender 1129
    - Windows Event Log Defender 1131
    - Windows Event Log Defender 1133
    - Windows Event Log Defender 1134
    - Windows Event Log Defender 5007
description: The following analytic identifies security events from Microsoft Defender, focusing on Exploit Guard and Attack Surface Reduction (ASR) features. It detects Event IDs 1121, 1126, 1131, and 1133 for blocked operations, and Event IDs 1122, 1125, 1132, and 1134 for audit logs. Event ID 1129 indicates user overrides, while Event ID 5007 signals configuration changes. This detection uses a lookup to correlate ASR rule GUIDs with descriptive names. Monitoring these events is crucial for identifying unauthorized operations, potential security breaches, and policy enforcement issues. If confirmed malicious, attackers could bypass security measures, execute unauthorized actions, or alter system configurations.
search: |-
    `ms_defender` EventCode IN (1121, 1122, 1125, 1126, 1129, 1131, 1132, 1133, 1134, 5007)
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY host Parent_Commandline, Process_Name,
           Path, ID, EventCode
      | lookup asr_rules ID OUTPUT ASR_Rule
      | fillnull value=NULL
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | rename host as dest
      | `windows_defender_asr_rules_stacking_filter`
how_to_implement: The following analytic requires collection of Windows Defender Operational logs in either XML or multi-line. To collect, setup a new input for the Windows Defender Operational logs. In addition, it does require a lookup that maps the ID to ASR Rule name. Note that Audit and block Event IDs have different fields, therefore the analytic will need to be modified for each type of event. The analytic can be modified to look for specific ASR rules, or to look for specific Event IDs. EventID 5007 is a change in the registry, and may be a false positive. This can be removed from the search if desired.
known_false_positives: False positives are not expected with this analytic, since it is a hunting analytic. It is meant to show the use of ASR rules and how they can be used to detect malicious activity.
references:
    - https://asrgen.streamlit.app/
    - https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction?view=o365-worldwide
tags:
    analytic_story:
        - Windows Attack Surface Reduction
    asset_type: Endpoint
    atomic_guid: []
    mitre_attack_id:
        - T1566.001
        - T1566.002
        - T1059
    product:
        - Splunk Enterprise
        - Splunk Enterprise Security
        - Splunk Cloud
    security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059/defender/asr_defender_operational.log
          source: WinEventLog:Microsoft-Windows-Windows Defender/Operational
          sourcetype: XmlWinEventLog