Docker socket exposed in pod → host root
A workload mounts /var/run/docker.sock for convenience; spawn a container with the host root mounted, then chroot in for root on the node.
§ Context
Assumed environment: target deployment mounts the Docker socket (common in CI runners, build pods, monitoring agents). PodSecurityStandards permissive.
§ Steps
- 01RCE in the podInitial AccessT1190— Exploit Public-Facing Application
- 02Find /var/run/docker.sockInitial AccessK-DOCKER-SOCK— Docker Socket Exposed
- 03Read kubelet kubeconfigDiscoveryK-SA-TOKEN— ServiceAccount Token Theft
- 04docker run -v /:/host --privileged alpinePrivilege EscalationK-PRIV-CONTAINER— Privileged Container Escape
- 05chroot /host → root on nodePrivilege EscalationK-HOSTPATH-MOUNT— hostPath Volume Mount
- 06Pivot across the clusterPersistenceK-CRONJOB-PERSIST— Malicious CronJob / DaemonSet
§ References
§ Frequently asked
- What is the "Docker socket exposed in pod → host root" attack path?
- A workload mounts /var/run/docker.sock for convenience; spawn a container with the host root mounted, then chroot in for root on the node. It chains 6 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is RCE in the pod (T1190) — a initial access primitive. Assumed environment: target deployment mounts the Docker socket (common in CI runners, build pods, monitoring agents).
- What is the final impact of this kill-chain?
- The final step lands on Pivot across the cluster (K-CRONJOB-PERSIST), which falls under Persistence. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques3
ArgoCD weak RBAC → cluster admin via custom Application
ArgoCD installed with the default admin user and broad RBAC. Attacker creates an Application pointing at attacker manifests — ArgoCD syncs them with cluster-admin.
- Shared techniques2
Privileged pod escape → cluster admin
GenericWrite on a Deployment in the kube-system namespace lets you launch a privileged pod; the pod mounts the host filesystem and steals the kubeconfig of cluster-admin.
- Shared techniques2
CVE-2024-21626 (Leaky Vessels) → container escape
Outdated runc lets a malicious image escape during 'docker build' or 'docker run' via a leaked file descriptor pointing at the host filesystem.