Detection rules › Splunk
Process Executed with Null Command Line (Windows Event Log)
Adversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. Process injection is a method of executing arbitrary code in the address space of a separate live process. Running code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via process injection may also evade detection from security products since the execution is masked under a legitimate process. For some Windows processes, execution with a null command line is not expected activity and may be an indication of process injection.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | T1055 Process Injection |
| Stealth | T1055 Process Injection |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
id: '16076.24078'
title: Process Executed with Null Command Line
description: Adversaries may inject code into processes in order to evade process-based
defenses as well as possibly elevate privileges. Process injection is a method of
executing arbitrary code in the address space of a separate live process. Running
code in the context of another process may allow access to the process's memory,
system/network resources, and possibly elevated privileges. Execution via process
injection may also evade detection from security products since the execution is
masked under a legitimate process. For some Windows processes, execution with a
null command line is not expected activity and may be an indication of process injection.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) ("backgroundtaskhost.exe" OR "svchost.exe" OR
"dllhost.exe" OR "werfault.exe" OR "searchprotocolhost.exe" OR "wuauclt.exe" OR
"spoolsv.exe" OR "rundll32.exe" OR "regasm.exe" OR "regsvr32.exe" OR "regsvcs.exe")
| regex process="(?i)((backgroundtaskhost|svchost|dllhost|werfault|searchprotocolhost|wuauclt|spoolsv|rundll32|regasm|regsvr32|regsvcs)\.exe\"?)$"
| table _time, host, user process, process_*, parent_process_*, signature_id | bin
span=1s | stats values(*) as * by _time, host '
techniques:
- defense-evasion:process injection
technique_id:
- T1055
data_category:
- Windows event logs
- Process command-line parameters
references:
- https://redcanary.com/threat-detection-report/techniques/process-injection/
- https://detection.fyi/sigmahq/sigma/windows/process_creation/proc_creation_win_susp_bad_opsec_sacrificial_processes/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) ("backgroundtaskhost.exe" OR "svchost.exe" OR "dllhost.exe" OR "werfault.exe" OR "searchprotocolhost.exe" OR "wuauclt.exe" OR "spoolsv.exe" OR "rundll32.exe" OR "regasm.exe" OR "regsvr32.exe" OR "regsvcs.exe")
Stage 2: regex
| regex process="(?i)((backgroundtaskhost|svchost|dllhost|werfault|searchprotocolhost|wuauclt|spoolsv|rundll32|regasm|regsvr32|regsvcs)\.exe\"?)$"
Stage 3: table
| table _time, host, user process, process_*, parent_process_*, signature_id
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.
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 | "backgroundtaskhost.exe" |
| 1 | "svchost.exe" |
| 1 | "dllhost.exe" |
| 1 | "werfault.exe" |
| 1 | "searchprotocolhost.exe" |
| 1 | "wuauclt.exe" |
| 1 | "spoolsv.exe" |
| 1 | "rundll32.exe" |
| 1 | "regasm.exe" |
| 1 | "regsvr32.exe" |
| 1 | "regsvcs.exe" |