Detection rules › Splunk

Explorer Child Process with Suspicious Command Line Padding (Sysmon)

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

Threat actors may abuse command-line padding with whitespace or non-printable control characters to hide malicious commands beyond the UI-visible limit, often using LNK files to launch payloads via explorer.exe. This technique enables stealthy execution by concealing the true command from the user's view. This use case detects processes launched by explorer.exe where the command line contains excessive whitespace padding, suggesting hidden execution activity consistent with LNK-based attacks. Note: Due to command line logging normalization/sanitization in other log sources, Sysmon or EDR logging is recommended for detection. This logic was verified with CrowdStrike FDR logs; if your organization uses a different EDR vendor, it is strongly recommended to perform the test found in the Threat Examples to validate that your logging source is not removing the whitespace padding.

MITRE ATT&CK coverage

References

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

id: '44252.86793'
title: Explorer Child Process with Suspicious Command Line Padding
description: 'Threat actors may abuse command-line padding with whitespace or non-printable
  control characters to hide malicious commands beyond the UI-visible limit, often
  using LNK files to launch payloads via explorer.exe. This technique enables stealthy
  execution by concealing the true command from the user''s view. This use case detects
  processes launched by explorer.exe where the command line contains excessive whitespace
  padding, suggesting hidden execution activity consistent with LNK-based attacks.
  Note: Due to command line logging normalization/sanitization in other log sources,
  Sysmon or EDR logging is recommended for detection. This logic was verified with
  CrowdStrike FDR logs; if your organization uses a different EDR vendor, it is strongly
  recommended to perform the test found in the Threat Examples to validate that your
  logging source is not removing the whitespace padding.'
logic_format: Splunk
logic: ' `get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
  (TERM(explorer) OR "explorer.exe") | where match(process, "[\x09\x0A\x0B\x0C\x0D\x11\x12\x13]|(\n){5,}")
  and parent_process_name="explorer.exe" | table _time, host, user, process, process_path,
  process_name, parent_process_name, parent_process | bin span=1s | stats values(*)
  as * by _time, host '
techniques:
- execution:command and scripting interpreter
- execution:user execution:malicious file
technique_id:
- T1059
- T1204.002
data_category:
- Windows Sysmon
references:
- https://www.trendmicro.com/en_us/research/25/c/windows-shortcut-zero-day-exploit.html

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") (TERM(explorer) OR "explorer.exe")

Stage 2: where

| where match(process, "[\x09\x0A\x0B\x0C\x0D\x11\x12\x13]|(\n){5,}") and parent_process_name="explorer.exe"

Stage 3: table

| table _time, host, user, process, process_path, process_name, parent_process_name, parent_process

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 1 corpus 241 (splunk 225, kusto 15, elastic 1)
field:"EventID" kind:eq value:"1"
parent_process_nameeq
  • "explorer.exe" corpus 51 (elastic 50, splunk 1)
field:"parent_process_name" kind:eq
processregex_match
    • "[\x09\x0A\x0B\x0C\x0D\x11\x12\x13]
    • (\n){5,}"
field:"CommandLine" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>1<"
1explorer
1"explorer.exe"