Bind Mounts
Adversaries may abuse bind mounts on Linux file structures to hide malicious process activity from native utilities such as ps, top, and /proc filesystem inspection. A bind mount maps a directory or file from one location to another using mount --bind, mount -B, or mount -o bind. By overlaying a benign process's /proc entry on top of a malicious process's /proc directory (e.g., mount --bind /proc/<benign_pid> /proc/<malicious_pid>), adversaries cause the kernel to present false process metadata to monitoring utilities. This technique requires root or sudo privileges and has been observed in active campaigns including Commando Cat (Docker container abuse) and cryptomining attacks documented by AhnLab.
// Primary: Detect mount --bind / -B targeting /proc paths via Microsoft Defender for Endpoint (Linux)
DeviceProcessEvents
| where TimeGenerated > ago(24h)
| where FileName == "mount"
| where ProcessCommandLine has_any ("--bind", "-o bind", "-obind")
or (ProcessCommandLine has " -B " and ProcessCommandLine has "/proc/")
or (ProcessCommandLine has "-B/" and ProcessCommandLine has "/proc/")
| where ProcessCommandLine contains "/proc/"
| extend BindMountType = case(
ProcessCommandLine has "--bind", "long-form --bind",
ProcessCommandLine has "-o bind", "option -o bind",
ProcessCommandLine has "-obind", "compressed -obind",
ProcessCommandLine has " -B ", "short-form -B",
"unknown"
)
| extend TargetProc = extract(@"(/proc/\d+)", 1, ProcessCommandLine)
| extend SourcePath = extract(@"mount[^/]+(/[^\s]+)\s+(/proc/\d+)", 1, ProcessCommandLine)
| extend IsEmptyDirMount = SourcePath !contains "/proc/" and isnotempty(TargetProc)
| extend IsProcOverProc = SourcePath contains "/proc/" and isnotempty(TargetProc)
| project TimeGenerated, DeviceName, AccountName, AccountDomain,
ProcessCommandLine, InitiatingProcessFileName,
InitiatingProcessCommandLine, InitiatingProcessAccountName,
BindMountType, TargetProc, SourcePath, IsEmptyDirMount, IsProcOverProc
| sort by TimeGenerated desc Data Sources
Required Tables
False Positives
- Container runtimes (Docker, containerd, podman) legitimately use bind mounts for volume mapping, though these typically target /var, /tmp, or application directories rather than /proc
- System administrators or SREs using bind mounts during chroot or namespace operations for legitimate troubleshooting or environment setup
- Configuration management tools (Ansible, Chef) mounting /proc inside test containers or build environments during CI/CD pipelines
- Linux Live CD / forensic boot environments that bind-mount host /proc into investigation chroot environments
References (9)
- https://attack.mitre.org/techniques/T1564/013/
- https://www.cadosecurity.com/blog/the-nine-lives-of-commando-cat-analysing-a-novel-malware-campaign-targeting-docker
- https://asec.ahnlab.com/en/51908/
- https://man7.org/linux/man-pages/man8/mount.8.html
- https://man7.org/linux/man-pages/man2/mount.2.html
- https://www.kernel.org/doc/html/latest/filesystems/sharedsubtree.html
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.013/T1564.013.md
- https://learn.microsoft.com/en-us/azure/sentinel/connect-syslog
- https://docs.splunk.com/Documentation/AddOns/released/LinuxAudit/Configureinputs
Unlock Pro Content
Get the full detection package for T1564.013 including response playbook, investigation guide, and atomic red team tests.