Detection rules › Splunk

Suspicious Registry Key Created (Windows Event Log)

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

Adversaries may achieve persistence by adding a program or referencing it with a Registry run key or by utilizing content triggered by Image File Execution Options (IFEO) debugger keys. Run keys may exist under multiple hives and IFEOs can also enable an arbitrary monitor program to be launched when a specified program silently exits. Multiple APTs leverage these Hives in order to establish persistence or execute additional payloads that appear to blend in with normal traffic. -- Threat Group Association: APT29/Nobelium/Cozy Bear, APT31, Kimsuky, TA505, Wizard Spider

MITRE ATT&CK coverage

References

Telemetry coverage

Rule body

id: '5857.6155'
title: Suspicious Registry Key Created
description: 'Adversaries may achieve persistence by adding a program or referencing
  it with a Registry run key or by utilizing content triggered by Image File Execution
  Options (IFEO) debugger keys. Run keys may exist under multiple hives and IFEOs
  can also enable an arbitrary monitor program to be launched when a specified program
  silently exits. Multiple APTs leverage these Hives in order to establish persistence
  or execute additional payloads that appear to blend in with normal traffic. -- Threat
  Group Association: APT29/Nobelium/Cozy Bear, APT31, Kimsuky, TA505, Wizard Spider
  -- Software Association: BABYSHARK, Bazar, DirtyMoe, GhostShell, TrickBot -- Atomics
  T1003 Test #2 Atomic T1574.012 Test#1 Atomic T1574.012 Test#2'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4657) OR
  "<EventID>4657<") Operation_Type="New registry value created" (TERM(vbs) OR TERM(dll))|
  regex New_Value="\.(vbs|dll)" | table _time, host, user parent_*, process, process_*,
  signature_id, Object_*, Operation_*, New_* | bin span=60s | stats values(*) as *
  by _time, host, process_name | where event_count < 3 | fields - Object_*, Operation_*,
  New_* `hec_collect`'
techniques:
- persistence:boot or logon autostart execution:registry run keys / startup folder
- persistence:event triggered execution:image file execution options injection
- privilege-escalation:boot or logon autostart execution:registry run keys / startup
  folder
- privilege-escalation:event triggered execution:image file execution options injection
technique_id:
- T1547.001
- T1546.012
data_category:
- File monitoring
- Windows event logs
references:
- https://blog.talosintelligence.com/2021/09/tinyturla.html

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4657) OR "<EventID>4657<") Operation_Type="New registry value created" (TERM(vbs) OR TERM(dll))

Stage 2: regex

| regex New_Value="\.(vbs|dll)"

Stage 3: table

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

Stage 4: bucket

| bin span=60s

Stage 5: stats

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

Stage 6: where

| where event_count < 3

Stage 7: fields

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

Indicators

These rows show field, operator, and value matches.

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4657<"
1vbs
1dll