Detect Proc Filesystem in Elastic Security
Adversaries on Linux systems read process memory directly via the /proc filesystem to extract credentials from running processes. By accessing /proc/<PID>/maps to identify memory regions and /proc/<PID>/mem to read those regions, attackers dump credentials from processes like sshd, su, sudo, gnome-keyring, and KWallet without injecting code or using ptrace. Tools include MimiPenguin (specifically targeting sshd and gnome-keyring), LaZagne (Linux edition), and PACEMAKER. This technique requires root privileges or the same UID as the target process. Used by threat actors targeting Linux servers where traditional Windows credential tools don't apply.
MITRE ATT&CK
- Tactic
- Credential Access
- Technique
- T1003 OS Credential Dumping
- Sub-technique
- T1003.007 Proc Filesystem
- Canonical reference
- https://attack.mitre.org/techniques/T1003/007/
Elastic Detection Query
sequence by host.name with maxspan=5m
[file where event.type in ("access", "open") and
file.path : ("/proc/*/mem", "/proc/*/maps", "/proc/*/environ") and
not process.name in ("gdb", "strace", "ltrace") and
not process.executable in ("/usr/bin/gdb", "/usr/bin/strace", "/usr/bin/ltrace", "/usr/bin/cat", "/usr/bin/ls")
] by process.pid
[process where event.type == "start" and
(process.args : ("/proc/*/mem", "/proc/*/maps") or
process.name in ("mimipenguin", "lazagne", "pacemaker"))
] by process.pid
OR
process where event.type == "start" and
(
(process.name in ("python3", "python") and
process.args : "lazagne" and
process.args : ("memory", "all"))
or
process.name : "mimipenguin*"
or
(process.args : "/proc/*/mem" and
process.args : ("sshd", "gnome-keyring", "kwallet", "su", "sudo"))
) Detects /proc filesystem-based credential dumping on Linux hosts by identifying direct file access to /proc/<PID>/mem, /proc/<PID>/maps, and /proc/<PID>/environ by non-debugger processes, as well as execution of known credential dumping tools such as MimiPenguin, LaZagne, and PACEMAKER. Covers T1003.007 — Proc Filesystem credential access.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate debuggers (gdb, strace, ltrace) accessing /proc/<PID>/mem during authorized debugging sessions — excluded by process name filter but may appear if called indirectly
- System monitoring tools such as htop, procps, or performance agents (Datadog, New Relic, Dynatrace) that enumerate /proc for resource tracking
- Python-based administration scripts that iterate /proc for process management or monitoring, particularly in containerized environments
Other platforms for T1003.007
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.
- Test 1MimiPenguin Linux Credential Dump
Expected signal: Auditd SYSCALL events for openat on /proc/<PID>/mem with exe=/usr/bin/python3. DeviceFileEvents (if MDE Linux agent present) for /proc/*/mem access by python3. Syslog entries if gnome-keyring or sshd crash due to memory access attempt.
- Test 2Manual /proc/mem Credential Extraction
Expected signal: Auditd SYSCALL openat events for /proc/<PID>/maps with exe=/bin/cat or /bin/bash. Process creation event for pgrep sshd. DeviceProcessEvents for pgrep and cat with /proc path arguments.
- Test 3LaZagne Linux Memory Module
Expected signal: DeviceProcessEvents for lazagne binary execution with 'memory' argument. Auditd execve event for /tmp/lazagne. Auditd openat events for /proc/*/mem if memory module runs. Network connection to GitHub for download (DeviceNetworkEvents).
References (6)
- https://attack.mitre.org/techniques/T1003/007/
- https://github.com/huntergregal/mimipenguin
- https://github.com/AlessandroZ/LaZagne
- https://security.stackexchange.com/questions/91040/what-is-proc-pid-mem
- https://www.slideshare.net/roottoor1/linux-credential-access-techniques
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.007/T1003.007.md
Unlock Pro Content
Get the full detection package for T1003.007 including response playbook, investigation guide, and atomic red team tests.