Windows Defender ASR Rules Stacking

Original Source: [splunk source]
Name:Windows Defender ASR Rules Stacking
id:425a6657-c5e4-4cbb-909e-fc9e5d326f01
version:4
date:2024-10-17
author:Michael Haag, Splunk
status:production
type:Hunting
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.
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
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
drilldown_searches:
  :
tags:
  analytic_story:
    - 'Windows Attack Surface Reduction'
  asset_type:Endpoint
  atomic_guid:
  confidence:100
  impact:50
  message:An ASR rule, $ASR_Rule$, was triggered on $dest$.
  mitre_attack_id:
    - 'T1566.001'
    - 'T1566.002'
    - 'T1059'
  observable:
    name:'ASR_Rule'
    type:'Unknown'
    - role:
      - 'Attacker'
    name:'dest'
    type:'Endpoint'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  risk_score:50
  required_fields:
    - 'host'
    - 'Parent_Commandline'
    - 'Target_Commandline'
    - 'ID'
    - 'EventCode'
    - 'ASR_Rule'
  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
manual_test:None

Related Analytic Stories


Windows Attack Surface Reduction