T1055.009 Splunk · SPL

Detect Proc Memory in Splunk

Adversaries may inject malicious code into processes via the /proc filesystem in order to evade process-based defenses as well as possibly elevate privileges. Proc memory injection involves enumerating the memory of a process via the /proc filesystem (/proc/[pid]) then crafting a return-oriented programming (ROP) payload with available gadgets/instructions. Each running process has its own directory, which includes memory mappings. Proc memory injection is commonly performed by overwriting the target processes' stack using memory mappings provided by the /proc filesystem. This information can be used to enumerate offsets (including the stack) and gadgets otherwise hidden by ASLR. Once enumerated, the target processes' memory map within /proc/[pid]/maps can be overwritten using dd.

MITRE ATT&CK

Tactic
Defense Evasion Privilege Escalation
Technique
T1055 Process Injection
Sub-technique
T1055.009 Proc Memory
Canonical reference
https://attack.mitre.org/techniques/T1055/009/

SPL Detection Query

Splunk (SPL)
spl
index=linux sourcetype="linux:audit" (type=SYSCALL OR type=PATH)
| eval is_proc_mem=if(match(name, "/proc/[0-9]+/mem$") OR match(path, "/proc/[0-9]+/mem$"), 1, 0)
| eval is_proc_maps=if(match(name, "/proc/[0-9]+/maps$") OR match(path, "/proc/[0-9]+/maps$"), 1, 0)
| where is_proc_mem=1 OR is_proc_maps=1
| eval exe_name=mvindex(split(exe, "/"), -1)
| search NOT exe_name IN ("ps", "top", "htop", "gdb", "strace", "ltrace", "perf", "systemd", "dockerd", "containerd")
| eval target_pid=replace(coalesce(name, path), "/proc/(\d+)/.*", "\1")
| eval access_type=if(is_proc_mem=1, "/proc/pid/mem (direct memory access)", "/proc/pid/maps (memory layout enumeration)")
| eval InjectionRisk=if(is_proc_mem=1, "HIGH - Direct memory write capability", "MEDIUM - Memory layout reconnaissance")
| table _time, host, auid, uid, exe, pid, target_pid, access_type, InjectionRisk
| sort - _time
high severity medium confidence

Detects access to /proc/[pid]/mem and /proc/[pid]/maps via Linux auditd. Distinguishes between memory layout enumeration (maps - reconnaissance) and direct memory access (mem - injection capability). Filters out known system tools that legitimately read procfs. Access to /proc/[pid]/mem enables writing to another process's memory without ptrace, making it a potent injection vector.

Data Sources

File: File AccessLinux auditdPATH audit records

Required Sourcetypes

linux:audit

False Positives & Tuning

  • System monitoring tools reading /proc/pid/maps for memory statistics
  • Container runtimes accessing /proc for cgroup and namespace management
  • Performance profiling and tracing tools
  • Security tools scanning process memory for malware indicators
Download portable Sigma rule (.yml)

Other platforms for T1055.009


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Read Target Process Memory Maps

    Expected signal: auditd: open() syscall on /proc/<pid>/maps with the calling process (shell) details. The maps output shows memory regions including stack address needed for injection.

  2. Test 2DD-based /proc/pid/mem Write Simulation

    Expected signal: auditd: open() on /proc/<pid>/maps. In a real injection: write() syscall to /proc/<pid>/mem would be logged. The dd command itself generates process creation events.

  3. Test 3Check /proc Hardening Configuration

    Expected signal: No security telemetry — this is a configuration check. The output shows current hardening level.

Unlock Pro Content

Get the full detection package for T1055.009 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections