Detection: Windows Defender ASR Rule Disabled

Description

The following analytic identifies when a Windows Defender ASR rule disabled events. ASR is a feature of Windows Defender Exploit Guard that prevents actions and apps that are typically used by exploit-seeking malware to infect machines. ASR rules are applied to processes and applications. When a process or application attempts to perform an action that is blocked by an ASR rule, an event is generated. This detection searches for ASR rule disabled events that are generated when an ASR rule is disabled.

 1`ms_defender` EventCode IN (5007) 
 2| rex field=New_Value "0x(?<New_Registry_Value>\\d+)$" 
 3| rex field=Old_Value "0x(?<Old_Registry_Value>\\d+)$" 
 4| rex field=New_Value "Rules\\\\(?<ASR_ID>[A-Fa-f0-9\\-]+)\\s*=" 
 5| eval New_Registry_Value=case(New_Registry_Value=="0", "Disabled", New_Registry_Value=="1", "Block", New_Registry_Value=="2", "Audit", New_Registry_Value=="6", "Warn") 
 6| eval Old_Registry_Value=case(Old_Registry_Value=="0", "Disabled", Old_Registry_Value=="1", "Block", Old_Registry_Value=="2", "Audit", Old_Registry_Value=="6", "Warn") 
 7| search New_Registry_Value="Disabled" 
 8| stats count min(_time) as firstTime max(_time) as lastTime by host, New_Value, Old_Value, Old_Registry_Value, New_Registry_Value, ASR_ID 
 9| lookup asr_rules ID AS ASR_ID OUTPUT ASR_Rule 
10| `security_content_ctime(firstTime)` 
11| `security_content_ctime(lastTime)`
12| rename host as dest 
13| `windows_defender_asr_rule_disabled_filter`

Data Source

Name Platform Sourcetype Source
Windows Event Log Defender 5007 Windows icon Windows 'xmlwineventlog' 'WinEventLog:Microsoft-Windows-Windows Defender/Operational'

Macros Used

Name Value
ms_defender source="WinEventLog:Microsoft-Windows-Windows Defender/Operational"
windows_defender_asr_rule_disabled_filter search *
windows_defender_asr_rule_disabled_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1112 Modify Registry Defense Evasion
KillChainPhase.EXPLOITAITON
NistCategory.DE_CM
Cis18Value.CIS_10
APT19
APT32
APT38
APT41
Aquatic Panda
Blue Mockingbird
Dragonfly
Earth Lusca
Ember Bear
FIN8
Gamaredon Group
Gorgon Group
Indrik Spider
Kimsuky
LuminousMoth
Magic Hound
Patchwork
Saint Bear
Silence
TA505
Threat Group-3390
Turla
Volt Typhoon
Wizard Spider

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

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.

Known False Positives

False positives may occur if applications are typically disabling ASR rules in the environment. Monitor for changes to ASR rules to determine if this is a false positive.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
ASR rule disabled event, $ASR_Rule$, was triggered on $dest$. 100 100 100
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset WinEventLog:Microsoft-Windows-Windows Defender/Operational XmlWinEventLog
Integration ✅ Passing Dataset WinEventLog:Microsoft-Windows-Windows Defender/Operational XmlWinEventLog

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 4