Detection rules › Splunk
Suspicious Child Process for mshta.exe (Sysmon)
This use case detects when mshta.exe spawns an unexpected child process. This can indicate process injection/hollowing, masquerading, application allowlist bypass, or other suspicious activity.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule body
id: '23910.44204'
title: Suspicious Child Process for mshta.exe
description: This use case detects when mshta.exe spawns an unexpected child process.
This can indicate process injection/hollowing, masquerading, application allowlist
bypass, or other suspicious activity.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
"mshta.exe" ("powershell.exe" OR "pwsh.exe" OR "cmd.exe" OR "rundll32.exe" OR "cscript.exe"
OR "wscript.exe") | regex parent_process_name="(?i)(mshta\.exe)" | regex process_path="(?i)(cmd|services|powershell|pwsh|(c|w)script)|rundll32\.exe"
| table _time, host, user process, process_*, parent_process_name, parent_process_*
| bin span=1s | stats values(*) as * by _time, host '
techniques:
- execution:command and scripting interpreter
- defense-evasion:system binary proxy execution:mshta
technique_id:
- T1059
- T1218.005
data_category:
- Windows Sysmon
references:
- https://blog.talosintelligence.com/gamaredon-apt-targets-ukrainian-agencies/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") "mshta.exe" ("powershell.exe" OR "pwsh.exe" OR "cmd.exe" OR "rundll32.exe" OR "cscript.exe" OR "wscript.exe")
Stage 2: regex
| regex parent_process_name="(?i)(mshta\.exe)"
Stage 3: regex
| regex process_path="(?i)(cmd|services|powershell|pwsh|(c|w)script)|rundll32\.exe"
Stage 4: table
| table _time, host, user process, process_*, parent_process_name, parent_process_*
Stage 5: bucket
| bin span=1s
Stage 6: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"1" |
parent_process_name | regex_match |
| field:"parent_process_name" kind:regex_match |
process_path | regex_match |
| field:"process_name" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | "mshta.exe" |
| 1 | "powershell.exe" |
| 1 | "pwsh.exe" |
| 1 | "cmd.exe" |
| 1 | "rundll32.exe" |
| 1 | "cscript.exe" |
| 1 | "wscript.exe" |