Detection rules › Splunk
regsvr32 Referencing Unusual Paths (Windows Event Log)
Adversaries may abuse regsvr32.exe to proxy execution of malicious code. regsvr32 is a command-line program used to register and unregister object linking and embedding controls including .dlls. This use case detects executions of regsvr32 involving frequently abused file paths as observed with the DarkWatchMan remote access trojan. Applications with normal use from AppData\Local should be whitelisted using the full file path. LOLBAS/LOLBINS
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1218.010 System Binary Proxy Execution: Regsvr32 |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
id: '21595.38143'
title: regsvr32 Referencing Unusual Paths
description: Adversaries may abuse regsvr32.exe to proxy execution of malicious code.
regsvr32 is a command-line program used to register and unregister object linking
and embedding controls including .dlls. This use case detects executions of regsvr32
involving frequently abused file paths as observed with the DarkWatchMan remote
access trojan. Applications with normal use from AppData\Local should be whitelisted
using the full file path. LOLBAS/LOLBINS
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) TERM(regsvr32) ("\\Temp\\" OR "\\AppData\\Local"
OR "\\Users\\Public") | where (match(process, "(?i)\x5c(Temp|Appdata\x5cLocal|Users\x5cPublic)")
and match(process_name, "(?i)regsvr32\.exe")) | table _time, host, user, signature_id,
process, process_*, parent_* | bin span=1s | stats values(*) as * by _time, host '
techniques:
- defense-evasion:system binary proxy execution:regsvr32
technique_id:
- T1218.010
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://www.virustotal.com/gui/file/d439a3ce7353ef96cf3556abba1e5da77eac21fdba09d6a4aad42d1fc88c1e3c/behavior
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) TERM(regsvr32) ("\\Temp\\" OR "\\AppData\\Local" OR "\\Users\\Public")
Stage 2: where
| where (match(process, "(?i)\x5c(Temp|Appdata\x5cLocal|Users\x5cPublic)") and match(process_name, "(?i)regsvr32\.exe"))
Stage 3: table
| table _time, host, user, signature_id, process, process_*, parent_*
Stage 4: bucket
| bin span=1s
Stage 5: 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 |
|
process | match |
|
process_name | match |
|
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>4688<" |
| 1 | TERM |
| 1 | regsvr32 |
| 1 | "\\Temp\\" |
| 1 | "\\AppData\\Local" |
| 1 | "\\Users\\Public" |