Detection rules › Splunk

Suspicious Child Process for mshta.exe (Windows Event Log)

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

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

References

Telemetry coverage

Rule body

id: '23910.44203'
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_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) "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 event logs
references:
- https://blog.talosintelligence.com/gamaredon-apt-targets-ukrainian-agencies/

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "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.

FieldKindValuesSearch
EventCodeeq
  • 4688 corpus 317 (splunk 283, kusto 33, elastic 1)
field:"EventID" kind:eq value:"4688"
parent_process_nameregex_match
  • "(?i)(mshta.exe)" corpus 2 (splunk 2)
field:"parent_process_name" kind:regex_match
process_pathregex_match
    • "(?i)(cmd|services|powershell|pwsh|(c|w)script)
    • rundll32.exe"
    corpus 2 (splunk 2)
field:"process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4688<"
1"mshta.exe"
1"powershell.exe"
1"pwsh.exe"
1"cmd.exe"
1"rundll32.exe"
1"cscript.exe"
1"wscript.exe"