Detect Proc Filesystem in Microsoft Sentinel
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/
KQL Detection Query
let ProcMemAccess = DeviceFileEvents
| where Timestamp > ago(24h)
| where FolderPath matches regex @"/proc/\d+/mem"
or FolderPath matches regex @"/proc/\d+/maps"
or FolderPath matches regex @"/proc/\d+/environ"
| where InitiatingProcessFileName !in~ ("gdb", "strace", "ltrace", "python3", "python")
or InitiatingProcessCommandLine has_any ("sshd", "gnome-keyring", "kwallet", "su", "sudo")
| project Timestamp, DeviceName, AccountName, FolderPath, FileName,
InitiatingProcessFileName, InitiatingProcessCommandLine;
let MimiPenguinPattern = DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any (
"mimipenguin", "MimiPenguin",
"/proc/", "gnome-keyring",
"sshd", "kwallet-daemon"
)
and ProcessCommandLine has "/proc/"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine;
let LaZagneLinux = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "python3" or FileName =~ "python"
| where ProcessCommandLine has "lazagne" and ProcessCommandLine has_any ("memory", "all")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine;
union ProcMemAccess, MimiPenguinPattern, LaZagneLinux
| sort by Timestamp desc Detects Linux /proc filesystem credential dumping via direct file access to /proc/<PID>/mem and /proc/<PID>/maps by unexpected processes, MimiPenguin execution patterns targeting sshd and gnome-keyring, and LaZagne Linux memory extraction modules. These file access patterns indicate in-memory credential harvesting from running Linux processes.
Data Sources
Required Tables
False Positives & Tuning
- GDB debugger sessions legitimately accessing /proc/<PID>/mem when debugging application crashes or memory issues
- Security tools like Valgrind, Sanitizers, or custom profilers reading process memory maps for performance analysis
- Legitimate Python debugging frameworks (pdb, pydevd) accessing /proc for process introspection
- System monitoring tools (htop, systemd-coredump) reading /proc/<PID>/maps for process information display
- Container orchestration tools like containerd or Docker reading /proc entries for container lifecycle management
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.