Detection rules › Splunk

Parent in Public Folder Suspicious Process (Windows Event Log)

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

Adversaries may attempt to hide artifacts associated with their behaviors to evade detection. Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. This use case detects suspicious processes with a parent process in the Users\Public directory.

MITRE ATT&CK coverage

References

Telemetry coverage

Rule body

id: '30578.54661'
title: Parent in Public Folder Suspicious Process
description: Adversaries may attempt to hide artifacts associated with their behaviors
  to evade detection. Adversaries may abuse command and script interpreters to execute
  commands, scripts, or binaries. This use case detects suspicious processes with
  a parent process in the Users\Public directory.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) "\\Users\\Public" ("powershell" OR "pwsh" OR "wscript.exe"
  OR "cscript.exe" OR "bitsadmin" OR "certutil" OR "mshta.exe") OR ("cmd.exe" (" /c
  " OR " /r " OR " /k " )) | regex parent_process_path="^C:\x5cUsers\x5cPublic"| table
  _time, host, user, parent_process_name, parent_process_path, process_name, process_path,
  process | bin span=1s | stats values(*) as * by _time, host '
techniques:
- execution:command and scripting interpreter
- defense-evasion:hide artifacts
technique_id: 
- T1059
- T1564
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://detection.fyi/sigmahq/sigma/windows/process_creation/proc_creation_win_susp_execution_from_public_folder_as_parent/
- https://attack.mitre.org/techniques/T1564/
- https://attack.mitre.org/techniques/T1059/

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "\\Users\\Public" ("powershell" OR "pwsh" OR "wscript.exe" OR "cscript.exe" OR "bitsadmin" OR "certutil" OR "mshta.exe") OR ("cmd.exe" (" /c " OR " /r " OR " /k " ))

Stage 2: regex

| regex parent_process_path="^C:\x5cUsers\x5cPublic"

Stage 3: table

| table _time, host, user, parent_process_name, parent_process_path, process_name, process_path, 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
  • 4688 corpus 317 (splunk 283, kusto 33, elastic 1)
field:"EventID" kind:eq value:"4688"
parent_process_pathregex_match
  • "^C:\x5cUsers\x5cPublic" corpus 2 (splunk 2)
field:"parent_process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4688<"
1"\\Users\\Public"
1"powershell"
1"pwsh"
1"wscript.exe"
1"cscript.exe"
1"bitsadmin"
1"certutil"
1"mshta.exe"
1"cmd.exe"
1" /c "
1" /r "
1" /k "