Detection rules › Splunk
Defender Registry Values Modified (Sysmon)
Adversaries may interact with the Windows Registry to disable security tools to avoid possible detection of their malware/tools and activities. They may interact directly with the registry via command line interpreters or they may abuse system utilities to achieve the same goals, such as SystemSettingsAdminFlows.exe. This use case detects commands for registry modifications targeting Windows Defender capabilities.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1112 Modify Registry |
| Stealth | T1562.001 Impair Defenses: Disable or Modify Tools |
| Defense Impairment | T1112 Modify Registry |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Sysmon | Event ID 13 | RegistryEvent (Value Set) |
Rule body yaml
id: '31402.56382'
title: Defender Registry Values Modified
description: Adversaries may interact with the Windows Registry to disable security
tools to avoid possible detection of their malware/tools and activities. They may
interact directly with the registry via command line interpreters or they may abuse
system utilities to achieve the same goals, such as SystemSettingsAdminFlows.exe.
This use case detects commands for registry modifications targeting Windows Defender
capabilities.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` ((TERM(EventCode=1) OR "<EventID>1<")
("cmd.exe" OR "powershell.exe" OR "pwsh.exe") "Defender" (("DisableEnhancedNotifications"
OR "RTP") "1") OR (("SubmitSamplesConsent" OR "SpynetReporting") "0") OR (("Set-ItemProperty"
OR "sp " OR "ADD ") ("SOFTWARE\\Microsoft\\Windows Defender\\Reporting" OR "SOFTWARE\\Microsoft\\Windows
Defender\\Spynet" OR "SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection")))
OR ((TERM(EventCode=13) OR "<EventID>13<") ("SOFTWARE\\Microsoft\\Windows Defender\\Reporting"
OR "SOFTWARE\\Microsoft\\Windows Defender\\Spynet" OR "SOFTWARE\\Microsoft\\Windows
Defender\\Real-Time Protection")) | table _time, host, user, process, process_name,
registry_* | bin span=1s | stats values(*) as * by _time, host '
techniques:
- defense-evasion:modify registry
- defense-evasion:impair defenses:disable or modify tools
technique_id:
- T1112
- T1562.001
data_category:
- Windows Sysmon
- Windows Registry
references:
- https://attack.mitre.org/techniques/T1562/001/
- https://attack.mitre.org/techniques/T1112/
- https://www.huntress.com/blog/lolbin-to-inc-ransomware
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` ((TERM(EventCode=1) OR "<EventID>1<") ("cmd.exe" OR "powershell.exe" OR "pwsh.exe") "Defender" (("DisableEnhancedNotifications" OR "RTP") "1") OR (("SubmitSamplesConsent" OR "SpynetReporting") "0") OR (("Set-ItemProperty" OR "sp " OR "ADD ") ("SOFTWARE\\Microsoft\\Windows Defender\\Reporting" OR "SOFTWARE\\Microsoft\\Windows Defender\\Spynet" OR "SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection"))) OR ((TERM(EventCode=13) OR "<EventID>13<") ("SOFTWARE\\Microsoft\\Windows Defender\\Reporting" OR "SOFTWARE\\Microsoft\\Windows Defender\\Spynet" OR "SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection"))
Stage 2: table
| table _time, host, user, process, process_name, registry_*
Stage 3: bucket
| bin span=1s
Stage 4: stats
| stats values(*) as * by _time, host
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>1<" |
| 1 | "cmd.exe" |
| 1 | "powershell.exe" |
| 1 | "pwsh.exe" |
| 1 | "Defender" |
| 1 | "DisableEnhancedNotifications" |
| 1 | "RTP" |
| 1 | "1" |
| 1 | "SubmitSamplesConsent" |
| 1 | "SpynetReporting" |
| 1 | "0" |
| 1 | "Set-ItemProperty" |
| 1 | "sp " |
| 1 | "ADD " |
| 1 | "SOFTWARE\\Microsoft\\Windows Defender\\Reporting" |
| 1 | "SOFTWARE\\Microsoft\\Windows Defender\\Spynet" |
| 1 | "SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection" |
| 1 | TERM |
| 1 | "<EventID>13<" |
| 1 | "SOFTWARE\\Microsoft\\Windows Defender\\Reporting" |
| 1 | "SOFTWARE\\Microsoft\\Windows Defender\\Spynet" |
| 1 | "SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection" |