Name:Linux Binary Launched Process with Null Argv id:0085652a-e682-45a2-a40c-5bb68b8f260e version:2 date:None author:Raven Tait, Splunk status:production type:TTP Description:The following analytic detects kernel-level events where a setuid binary launches a shell or interpreter with a NULL argument vector, which occurs when a privilege escalation exploit gains root and executes a process via execve() without constructing a legitimate argument array. Data_source:
-Linux Messages Syslog
search:`linux_syslog` "NULL argv" "empty string added" | rex field=_raw "process '(?<launching_process>[^']+)' launched '(?<launched_process>[^']+)' with NULL argv" | where isnotnull(launching_process) AND isnotnull(launched_process) | stats count AS occurrences, min(_time) AS firstTime, max(_time) AS lastTime, values(_raw) AS message, values(host) AS dest by host, launching_process, launched_process | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | table dest, launching_process, launched_process, firstTime, lastTime, occurrences, message | `linux_binary_launched_process_with_null_argv_filter`
how_to_implement:To successfully implement this search, you need to have relevant kernel logs ingested with the Splunk Add-On for Unix and Linux (https://splunkbase.splunk.com/app/833). known_false_positives:Legitimate false positives are rare but can occur when custom or poorly written setuid binaries, PAM modules, or login frameworks invoke shells programmatically without constructing a proper argv array. However, mainstream setuid binaries like su, sudo, and pkexec on modern Linux distributions always pass arguments, so any hit involving those specific processes should be treated as high confidence. References: -https://www.elastic.co/security-labs/copy-fail-dirtyfrag-linux-page-bugs-in-the-wild drilldown_searches: name:'View the detection results for - "$dest$"' search:'%original_detection_search% | search dest = "$dest$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$dest$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'7d' latest_offset:'0' analytic_story:['Linux Privilege Escalation']