/
windows_defender_asr_registry_modification.yml
62 lines (62 loc) · 3.39 KB
/
windows_defender_asr_registry_modification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Windows Defender ASR Registry Modification
id: 6a1b6cbe-6612-44c3-92b9-1a1bd77412eb
version: 1
date: '2023-11-27'
author: Michael Haag, Splunk
status: production
type: Hunting
data_source:
- Windows Event Log Defender 5007
description: 'This detection searches for Windows Defender ASR registry modification 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 registry modification events that are generated when a process or application attempts to modify a registry key that is blocked by an ASR rule. Typically, these will be enabled in block most after auditing and tuning the ASR rules themselves. Set to TTP once tuned.'
search: '`ms_defender` EventCode IN (5007)
| rex field=New_Value "0x(?<New_Registry_Value>\\d+)$"
| rex field=Old_Value "0x(?<Old_Registry_Value>\\d+)$"
| rex field=New_Value "Rules\\\\(?<ASR_ID>[A-Fa-f0-9\\-]+)\\s*="
| lookup asr_rules ID AS ASR_ID OUTPUT ASR_Rule
| 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")
| 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")
| stats count min(_time) as firstTime max(_time) as lastTime by host, New_Value, Old_Value, Old_Registry_Value, New_Registry_Value, ASR_Rule
| `security_content_ctime(firstTime)`| rename host as dest | `security_content_ctime(lastTime)`
| `windows_defender_asr_registry_modification_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.
known_false_positives: False positives are expected from legitimate applications generating events that are similar to those generated by malicious activity. For example, Event ID 5007 is generated when a process attempts to modify a registry key that is related to ASR rules. This can be triggered by legitimate applications that attempt to modify registry keys that are not blocked by ASR rules.
references:
- https://asrgen.streamlit.app/
tags:
analytic_story:
- Windows Attack Surface Reduction
asset_type: Endpoint
atomic_guid: []
confidence: 100
impact: 50
message: ASR registry modification event, $ASR_Rule$, was triggered on $dest$.
mitre_attack_id:
- T1112
observable:
- name: ASR_Rule
type: Unknown
role:
- Other
- name: dest
type: Endpoint
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
risk_score: 50
required_fields:
- host
- New_Value
- Old_Value
- Old_Registry_Value
- New_Registry_Value
- 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_registry.log
source: WinEventLog:Microsoft-Windows-Windows Defender/Operational
sourcetype: xmlwineventlog