Join our Newsletter — 33% off our NHI Course
Home› Guides› T1611 Escape to Host Defensive Guide: Preventing and…
Guide Attack Techniques & Malware

T1611 Escape to Host Defensive Guide: Preventing and Detecting Container Breakout

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 10 min read
On this page

A container shares its host's kernel, so a workload started with the wrong flags, mounts or socket access is one step from controlling the node and every other container on it. MITRE ATT&CK T1611 Escape to Host covers breaking out of a container, or a virtual machine on ESXi, to reach the underlying host, and sits in the Privilege Escalation tactic (TA0004) in ATT&CK v20. Most real-world escapes do not need a kernel exploit: they use configuration that the platform allows, such as privileged containers, host path mounts or a mounted Docker socket. This guide explains the escape routes as ATT&CK describes them, the admission controls and runtime settings that close them, and the detections that catch the attempts that remain. It is for platform engineers, Kubernetes administrators and detection engineers; it builds on the Container Runtime Security Guide and contains no escape procedures.

Key takeaways

  • Configuration is the main escape route. ATT&CK lists host filesystem bind mounts, privileged containers and mounted container management sockets before kernel exploits.
  • Pod Security Standards close most of it. The Baseline profile forbids privileged containers, host namespaces and hostPath volumes; Restricted adds non-root, no privilege escalation, a seccomp profile and dropping all capabilities.
  • The Docker socket is root on the host. Docker's own documentation says only trusted users should control the daemon, because it can share the host's / directory with a container without restriction.
  • Kernel patching still matters. Containers share one kernel, so a kernel flaw reachable from a container is a host flaw; track kernel CVEs in the CISA KEV catalogue for container nodes.
  • Escape is usually a means to identity. On the host, the prize is kubelet credentials, other pods' service account tokens and cloud instance credentials.

How the attack works

ATT&CK describes T1611 as breaking out of "a container or virtualized environment to gain access to the underlying host". It names several routes. Defensively, they fall into five groups, and each has a matching control.

Route (as ATT&CK describes it)What makes it possibleClosing control
Container that mounts the host filesystem through a bind mounthostPath volumes or -v /:/host style mounts, which let a container write to host paths such as cron directoriesForbid hostPath (Baseline); allow only approved read-only paths through policy exceptions
Privileged container used to run host commands or load a kernel moduleprivileged: true, broad capabilities such as SYS_ADMIN or SYS_MODULE, host PID or network namespacesForbid privileged and host namespaces (Baseline); drop ALL capabilities (Restricted)
Abuse of system calls such as unshare and keyctlNo seccomp profile, unconfined AppArmor or SELinuxSeccomp RuntimeDefault or Localhost (Restricted); mandatory access control profiles
Mounted container management socket such as docker.sock, then T1609 Container Administration CommandSocket mounted into a build or monitoring containerNever mount runtime sockets into workloads; rootless runtimes
T1068 Exploitation for Privilege Escalation, for example via global symbolic links; VM escape on ESXi through a hypervisor vulnerabilityUnpatched kernel, runtime or hypervisorPatch nodes and hypervisors; sandboxed runtimes for untrusted code

ATT&CK v20 maps five mitigations: M1026 Privileged Account Management, M1038 Execution Prevention, M1042 Disable or Remove Feature or Program, M1048 Application Isolation and Sandboxing and M1051 Update Software. The only group it lists for T1611 is TeamTNT, but container escape tooling is widely available and is part of most cluster intrusions that reach node level.

Where it shows up

  • Compromised application pods: an intruder who gains code execution in a pod through a web vulnerability checks what the pod was granted: capabilities, mounts, service account token and the socket list.
  • CI runners and build systems: Docker-in-Docker and socket-mounted builders are a common reason the socket ends up inside a container. See the Kubernetes Security Guide.
  • Exposed container APIs: anyone who reaches the daemon controls the host. In the TeamTNT worm, Docker APIs reachable from the internet without access control let the worm start its own containers on each host, then take AWS credential files.
  • Monitoring and security agents: node agents legitimately run privileged, which makes their images and namespaces a high-value target.
  • Multi-tenant platforms and AI code execution sandboxes: any service that runs customer or model-generated code in containers. See the AI Agent Sandboxing and Code Execution Guide.

Impact

  • Node control: root on the host, with the ability to persist outside any container (for example through cron or systemd on the node).
  • Neighbour compromise: access to other containers' filesystems, environment variables and mounted secrets on the same node.
  • Credential theft: kubelet client credentials, projected service account tokens and the cloud instance identity attached to the node.
  • Cluster escalation: from node credentials towards the control plane, especially where nodes can read secrets broadly. See the Kubernetes Cluster Compromise Playbook.
  • Hypervisor reach: a VM escape on ESXi exposes every virtual machine on the host.

Detection

ATT&CK's detection strategy for T1611 looks for anomalous mount configurations (hostPath to / or /proc), unexpected privileged launches and container administration commands at the orchestration layer, and for unshare, mount, keyctl and setns calls by containerised processes followed by process activity on the host.

LayerSourceWhat to alert on
AdmissionKubernetes API server audit log; Pod Security Admission audit annotationsPods created with privileged, hostPID, hostNetwork, hostIPC, hostPath volumes or added capabilities outside the system namespaces that need them
AdmissionAudit logpods/exec and pods/attach into privileged or node-agent pods; new DaemonSets
RuntimeDocker daemon events, containerd or CRI-O logsContainer create with the privileged flag, host volume mount or docker.sock mount
Kernelauditd or eBPF sensorsunshare, setns, mount, keyctl, init_module or finit_module from processes in container namespaces
HostEDR or eBPF process lineageProcesses whose ancestry starts in a container but which run in the host's namespaces; writes to host /etc, cron or systemd paths from container processes
IdentityCloud audit logs; Kubernetes auditNode instance credentials or kubelet credentials used from unexpected addresses, or used to list secrets
Windows containersSecurity 4688, Sysmon 11Container processes touching host system directories

Metrics

  • Enforcement coverage: percentage of namespaces with pod-security.kubernetes.io/enforce set to baseline or restricted.
  • Exceptions: number of workloads running privileged, with host namespaces or with hostPath, each with an owner and review date.
  • Socket exposure: workloads mounting a container runtime socket, target zero outside approved node agents.
  • Kernel currency: percentage of nodes on a kernel with no open KEV-listed vulnerabilities.
  • Runtime sensor coverage: share of nodes reporting system call telemetry to the SOC.

Prevention and hardening

Pod Security Standards

ControlBaselineRestricted (in addition)
Privileged containersMust be disallowedSame
Host namespaceshostNetwork, hostPID and hostIPC disallowedSame
HostPath volumesForbiddenOnly listed volume types allowed
Windows HostProcessDisallowedSame
CapabilitiesAdditions limited to a default listMust drop ALL; only NET_BIND_SERVICE may be added back
SeccompMust not be set to UnconfinedMust be set explicitly to RuntimeDefault or Localhost
Privilege escalationNot restrictedallowPrivilegeEscalation must be false
Running as non-rootNot restrictedrunAsNonRoot must be true

Pod Security Admission applies these per namespace in three modes: enforce rejects violating pods, audit adds an annotation to the audit event, and warn returns a warning to the user. Use them as a rollout sequence.

Rollout

  1. Measure: label every application namespace with audit=restricted and warn=restricted, and collect the violations for two to four weeks.
  2. Fix the easy ones: add runAsNonRoot, allowPrivilegeEscalation: false, seccompProfile: RuntimeDefault and drop: ["ALL"] to workload templates.
  3. Enforce Baseline on all application namespaces, then Restricted namespace by namespace. Pin the policy version label so upgrades do not change behaviour unexpectedly.
  4. Handle exceptions: keep node agents that need privilege in dedicated namespaces with tight RBAC, and use a policy engine for finer-grained exceptions. See the Kubernetes Admission Control Guide.
  5. Roll back a namespace by changing its enforce label back to the previous level; audit and warn can stay on.

Runtime and host

  • Rootless or remapped runtimes: Docker's rootless mode runs both the daemon and containers inside a user namespace; userns-remap remaps container users while the daemon stays root.
  • No sockets in workloads: Docker notes the API uses a Unix socket so that file permissions can limit access; do not undo that by mounting it into containers or exposing the daemon over TCP.
  • Mandatory access control: AppArmor or SELinux profiles for containers. See the seccomp Guide and the AppArmor Guide.
  • Sandboxed runtimes (a user-space kernel or lightweight VM per pod) for untrusted or multi-tenant code, accepting the performance cost (M1048).
  • Node hygiene: minimal container-optimised host operating systems, fast kernel patching, and no long-lived cloud credentials on nodes beyond the instance identity.

Small and large platforms

A small team running one cluster gets most of the value from enforcing Baseline everywhere, Restricted for internet-facing workloads, and removing any Docker socket mounts. A large platform adds a policy engine for exceptions, eBPF runtime detection on every node, sandboxed runtimes for tenant or AI-generated code, and node pools separated by trust level so an escape on one pool cannot reach sensitive workloads.

Where identity fits

After an escape the intruder holds the node's identities: kubelet credentials, every pod's projected service account token on that node and the cloud instance role. Limit what each can do: scope service account RBAC tightly, disable token automounting where pods do not call the API, use workload identity federation with per-pod roles rather than broad node roles, and rotate node credentials after any suspected escape. See the Kubernetes Service Account Token Guide and the Kubernetes NHI Security Guide.

Framework mapping

FrameworkRelevant items
MITRE ATT&CK v20TA0004 Privilege Escalation; T1611; related T1609 Container Administration Command, T1610 Deploy Container, T1068
MITRE D3FENDD3-SCA System Call Analysis, D3-PA Process Analysis
NIST SP 800-53 Rev. 5SC-39 Process Isolation, CM-7 Least Functionality, AC-6 Least Privilege, SI-4 System Monitoring, RA-5 Vulnerability Monitoring and Scanning
NIST SP 800-190Application Container Security Guide (host OS, runtime and orchestrator countermeasures). See the NIST SP 800-190 Container Security Guide.
NIST CSF 2.0PR.PS-01 (configuration management), DE.CM-09 (runtime environments monitored), ID.RA-01 (vulnerabilities identified)
CIS Controls v8.1Control 4 Secure Configuration, Control 7 Continuous Vulnerability Management

Common failure patterns

  • Audit mode forever: namespaces labelled audit=restricted whose violations nobody reviews give a false sense of coverage.
  • System namespaces as a dumping ground: privileged exceptions granted to kube-system attract unrelated workloads, and anyone who can create pods there inherits the exception.
  • Socket mounts for convenience: build and monitoring containers given the runtime socket "temporarily" become the easiest escape on the node.
  • Patching images but not nodes: image scanning is mature in most teams, while node kernels and runtimes lag, yet the kernel is the shared boundary.
  • Broad node identities: a node cloud role that can read every secret store turns a single escape into a cloud account compromise.

Practitioner checklist

  • Label every namespace with Pod Security Admission audit and warn at restricted, and enforce at least baseline.
  • Remove every container runtime socket mount outside approved node agents.
  • Require seccompProfile: RuntimeDefault, drop: ["ALL"] and runAsNonRoot in workload templates.
  • Alert on privileged, host namespace and hostPath pods outside system namespaces.
  • Collect container-aware system call telemetry for unshare, setns, mount and module loading.
  • Patch node kernels and runtimes against KEV-listed vulnerabilities on a defined deadline.
  • Use sandboxed runtimes for untrusted or AI-generated code.
  • Scope node and service account identities so an escape does not give cluster-wide secrets.

Standards and references

Related NHI Mgmt Group resources: Container Runtime Security Guide · Top 10 Container Security Risks · Kubernetes RBAC Guide · T1543 Create or Modify System Process Defensive Guide · Container Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.