Detection rules › Splunk

Modify Registry Key (Windows Event Log)

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

Adversaries may interact with the Windows Registry to hide configuration information within Registry keys, remove information as part of cleaning up, or as part of other techniques to aid in persistence and execution

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1112 Modify Registry
Defense ImpairmentT1112 Modify Registry

References

Event coverage

Rule body yaml

id: '8335.10406'
title: Modify Registry Key
description: 'Adversaries may interact with the Windows Registry to hide configuration
  information within Registry keys, remove information as part of cleaning up, or
  as part of other techniques to aid in persistence and execution. Threat Actor Association:
  APT27/Emissary Panda, APT29/Nobelium, APT30, APT41, APT43, Flax Typhoon, InvisiMole,
  Kimsuky, Lazarus, MuddyWater, RedEyes, REvil, Velvet Cholllima -- Software Association:
  Avos, BabyShark, BadRabbit, BianLian, BlackByte, DarkWatchman, Dharma, Dridex, Karius,
  Koxic, LockBit, Play, QBot/Qakbot, Ransom Cartel, SunBurst, Trojan.Killdisk/HermeticWiper,
  Trigona, Ursnif, VawTrack'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4657) OR
  "<EventID>4657<") Operation_Type="Existing registry value modified" | table _time,
  host, user parent_*, process, process_*, signature_id, Object_*, Operation_*, New_*,
  Old_*| eval note=Object_Name | bin span=1s | stats values(*) as * by _time, host
  | fields - Operation_*, New_*, Old_* `hec_collect`'
techniques:
- defense-evasion:modify registry
technique_id: 
- T1112
data_category:
- File monitoring
- Windows event logs
references:
- https://blog.trendmicro.com/trendlabs-security-intelligence/poweliks-malware-hides-in-windows-registry/
- https://www.netwrix.com/how_to_detect_modification_to_startup_items.html
- https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/5d497aefe58b7e00011f6947/1565096688890/Windows+Registry+Auditing+Cheat+Sheet+ver+Aug+2019.pdf

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4657) OR "<EventID>4657<") Operation_Type="Existing registry value modified"

Stage 2: table

| table _time, host, user parent_*, process, process_*, signature_id, Object_*, Operation_*, New_*, Old_*

Stage 3: eval

| eval note=Object_Name

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host

Stage 6: fields

| fields - Operation_*, New_*, Old_* `hec_collect`

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)
Operation_Typeeq
  • "Existing registry value modified"

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>4657<"