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

Event coverage

Rule body yaml

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

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.

FieldKindValues
EventCodeeq
  • 4688 corpus 313 (splunk 283, kusto 30)
parent_process_nameregex_match
  • "(?i)(mshta.exe)" corpus 2 (splunk 2)
process_pathregex_match
    • "(?i)(cmd|services|powershell|pwsh|(c|w)script)
    • rundll32.exe"
    corpus 2 (splunk 2)

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.

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