Escape to Host

T1611

Technique.View on attack.mitre.org

About this technique

Adversaries may break out of a container or virtualized environment to gain access to the underlying host. This can allow an adversary access to other containerized or virtualized resources from the host level or to the host itself. In principle, containerized / virtualized resources should provide a clear separation of application functionality and be isolated from the host environment.

There are multiple ways an adversary may escape from a container to a host environment. Examples include creating a container configured to mount the host’s filesystem using the bind parameter, which allows the adversary to drop payloads and execute control utilities such as cron on the host; utilizing a privileged container to run commands or load a malicious kernel module on the underlying host; or abusing system calls such as `unshare` and `keyctl` to escalate privileges and steal secrets.

Additionally, an adversary may be able to exploit a compromised container with a mounted container management socket, such as `docker.sock`, to break out of the container via a Container Administration Command. Adversaries may also escape via Exploitation for Privilege Escalation, such as exploiting vulnerabilities in global symbolic links in order to access the root directory of a host machine.

In ESXi environments, an adversary may exploit a vulnerability in order to escape from a virtual machine into the hypervisor.

Gaining access to the host may provide the adversary with the opportunity to achieve follow-on objectives, such as establishing persistence, moving laterally within the environment, accessing other containers or virtual machines running on the host, or setting up a command and control channel on the host.

Detection rules5

Rules on DetectionCode tagged with T1611.

Sigma2

RuleLevelLog source
Container With A hostPath Mount Createdlowkubernetes / application
Privileged Container Deployedlowkubernetes / application

Splunk3

RuleTypeRiskData source
Cisco IOS XE Guestshell Activation and DestroyAnomalyNULLCisco IOS Logs
Cisco Isovalent - Potential Escape to HostAnomalyNULLCisco Isovalent Process Exec
Linux Docker Root Directory MountTTPNULLSysmon for Linux EventID 1

Groups1

Software4

Campaigns0

None recorded.

Procedure examples5

Groups1

Used byProcedure example
GroupTeamTNT

TeamTNT has deployed privileged containers that mount the filesystem of victim machine.

Software4

Used byProcedure example
MalwareDoki

Doki’s container was configured to bind the host root directory.

MalwareHildegard

Hildegard has used the BOtB tool that can break out of containers.

ToolPeirates

Peirates can gain a reverse shell on a host node by mounting the Kubernetes hostPath.

MalwareSiloscape

Siloscape maps the host’s C drive to the container by creating a global symbolic link to the host through the calling of NtSetInformationSymbolicLink.

References9

  1. Broadcom VMSA-2025-004 Open source
    Broadcom. (2025, March 6). VMSA-2025-0004: Questions & Answers. Retrieved March 26, 2025.
  2. Container Escape Open source
    0xn3va. (n.d.). Escaping. Retrieved May 27, 2022.
  3. Crowdstrike Kubernetes Container Escape Open source
    Manoj Ahuje. (2022, January 31). CVE-2022-0185: Kubernetes Container Escape Using Linux Kernel Exploit. Retrieved July 6, 2022.
  4. Docker Bind Mounts Open source
    Docker. (n.d.). Use Bind Mounts. Retrieved March 30, 2021.
  5. Docker Overview Open source
    Docker. (n.d.). Docker Overview. Retrieved March 30, 2021.
  6. Intezer Doki July 20 Open source
    Fishbein, N., Kajiloti, M.. (2020, July 28). Watch Your Containers: Doki Infecting Docker Servers in the Cloud. Retrieved March 30, 2021.
  7. Keyctl-unmask Open source
    Mark Manning. (2020, July 23). Keyctl-unmask: "Going Florida" on The State Of Containerizing Linux Keyrings. Retrieved July 6, 2022.
  8. Trend Micro Privileged Container Open source
    Fiser, D., Oliveira, A.. (2019, December 20). Why a Privileged Container in Docker is a Bad Idea. Retrieved March 30, 2021.
  9. Windows Server Containers Are Open Open source
    Daniel Prizmant. (2020, July 15). Windows Server Containers Are Open, and Here's How You Can Break Out. Retrieved October 1, 2021.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.