Detection rules › Splunk

Defender Registry Values Modified (Windows Event Log)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

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

References

Event coverage

Rule body yaml

id: '31402.56381'
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_winevent` ((TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) ("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=4657) OR "<EventID>4657<")
  ("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:
- Process command-line parameters
- Windows event logs
- 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_winevent` ((TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) ("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=4657) OR "<EventID>4657<") ("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.

FieldKindValues
EventCodeeq
  • 4657 corpus 17 (splunk 14, kusto 3)
  • 4688 corpus 313 (splunk 283, kusto 30)

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.

StageTerm
1TERM
1"<EventID>4688<"
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"
1TERM
1"<EventID>4657<"
1"SOFTWARE\\Microsoft\\Windows Defender\\Reporting"
1"SOFTWARE\\Microsoft\\Windows Defender\\Spynet"
1"SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection"