MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry coverage
Rule body
id: '1125.1203'
title: File Execution (Unix)
description: 'Detect when a file has been executed -- Threat Actor Association: TeamTNT,
Winnti Group - Software Association: Mélofée, Ransom Cartel -- Atomics T1548.003
Test#1 Atomics T1548.003 Test#2'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_unix` (type=execve OR type=proctitle
OR sourcetype=bash_history) AND ("./" OR "/") AND NOT ("/usr/bin/" OR "/bin/" OR
"/sbin/" OR "/usr/libexec/") | rex field=_raw "(?i)proctitle\=(?<command_type>\.\/.+)"|
eval process=mvappend(process, command_type)| regex process="^(\.)?\/.+" | table
_time, host, user process | bin span=300s | stats values(*) as * by _time, host,process
| eventstats dc(host) as dc_host, c(process) as c_process by process| where dc_host=1
and c_process<3 '
techniques:
- execution:command and scripting interpreter:unix shell
technique_id:
- T1059.004
data_category:
- Process command-line parameters
- Linux audit logs
references: null
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_unix` (type=execve OR type=proctitle OR sourcetype=bash_history) AND ("./" OR "/") AND NOT ("/usr/bin/" OR "/bin/" OR "/sbin/" OR "/usr/libexec/")
Stage 2: rex
| rex field=_raw "(?i)proctitle\=(?<command_type>\.\/.+)"
Stage 3: eval
| eval process=mvappend(process, command_type)
Stage 4: regex
| regex process="^(\.)?\/.+"
Stage 5: table
| table _time, host, user process
Stage 6: bucket
| bin span=300s
Stage 7: stats
| stats values(*) as * by _time, host,process
Stage 8: eventstats
| eventstats dc(host) as dc_host, c(process) as c_process by process
Stage 9: where
| where dc_host=1 and c_process<3
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
c_process | lt |
| field:"c_process" kind:lt value:"3" |
dc_host | eq |
| field:"dc_host" kind:eq value:"1" |
process | regex_match |
| field:"CommandLine" kind:regex_match |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"bash_history" |
type | eq |
| field:"type" kind:eq |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "./" |
| 1 | "/" |