A pod is a set of containers on a worker node, and the same misconfigurations that make a container escapable make a pod escape to its node. The routes are the Kubernetes expression of the container-escape primitives: a pod with privileged: true, a hostPath volume mounting the node filesystem, shared host namespaces, or reachable kubelet credentials. Escaping to the node is high-value because the node runs every pod scheduled to it, so node root exposes all their secrets and tokens, and the node's own kubelet identity pivots toward the cluster.
Check the pod's security context for the easy routes:
grep -E 'CapEff|Seccomp' /proc/self/status; cat /proc/self/uid_map
mount | grep -vE 'overlay|proc|sysfs|tmpfs|cgroup' | head # hostPath mounts
ls /dev | grep -E 'sd|nvme' ; ls /var/run/secrets/kubernetes.io/serviceaccount/
readlink /proc/1/exe # host init => shared PID ns
Subtopics#
- Privileged pod: a pod with the privileged security context.
- hostPath mount: a volume mounting the node filesystem.
- Host namespaces: hostPID, hostNetwork, and hostIPC pods.
- Kubelet credential theft: stealing the node's kubelet identity.