Detection rules › Splunk
Add DLL_EXE Registry Value (Sysmon)
Adding an entry to the "run keys" in the Registry or startup folder will cause the program referenced to be executed when a user logs in
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder |
| Privilege Escalation | T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 13 | RegistryEvent (Value Set) |
Rule body yaml
id: '1093.1147'
title: Add DLL_EXE Registry Value
description: 'Adding an entry to the "run keys" in the Registry or startup folder
will cause the program referenced to be executed when a user logs in. -- Threat
Actor Association: CL-STA-0043, FamousSparrow, FIN6, Flax Typhoon, WIRTE -- Software
Association: Blackbyte'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` ( signature_id=13 AND (TERM(HKU)
OR TERM(HKCU) OR TERM(HKLM)) AND (registry_value_name="*\\Temp\\*.exe" OR registry_value_name="*\\Temp\\*.dll"
OR registry_value_name="*\\Common Files\\*.dll" OR registry_value_name="*\\Common
Files\\*.exe") ) | table _time, host, user, process process_name, parent_process_name,
signature_id, dest_ip, registry_value_name | bin span=1s | stats values(*) as *
by _time, host | table _time, host, user, process process_name, parent_process_name,
signature_id dest_ip registry_value_name `hec_collect`'
techniques:
- persistence:boot or logon autostart execution:registry run keys / startup folder
technique_id:
- T1547.001
data_category:
- Windows Registry
- Windows Sysmon
references:
- https://www.hackingarticles.in/multiple-ways-to-persistence-on-windows-10-with-metasploit/
- https://blog.talosintelligence.com/2021/09/tinyturla.html
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` ( signature_id=13 AND (TERM(HKU) OR TERM(HKCU) OR TERM(HKLM)) AND (registry_value_name="*\\Temp\\*.exe" OR registry_value_name="*\\Temp\\*.dll" OR registry_value_name="*\\Common Files\\*.dll" OR registry_value_name="*\\Common Files\\*.exe") )
Stage 2: table
| table _time, host, user, process process_name, parent_process_name, signature_id, dest_ip, registry_value_name
Stage 3: bucket
| bin span=1s
Stage 4: stats
| stats values(*) as * by _time, host
Stage 5: table
| table _time, host, user, process process_name, parent_process_name, signature_id dest_ip registry_value_name `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.
| Field | Kind | Values |
|---|---|---|
registry_value_name | eq |
|
signature_id | 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 | HKU |
| 1 | TERM |
| 1 | HKCU |
| 1 | TERM |
| 1 | HKLM |