Technique.View on attack.mitre.org
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.
Rules on DetectionCode tagged with T1611.
| Rule | Level | Log source |
|---|---|---|
| Container With A hostPath Mount Created | low | kubernetes / application |
| Privileged Container Deployed | low | kubernetes / application |
| Rule | Type | Risk | Data source |
|---|---|---|---|
| Cisco IOS XE Guestshell Activation and Destroy | Anomaly | NULL | Cisco IOS Logs |
| Cisco Isovalent - Potential Escape to Host | Anomaly | NULL | Cisco Isovalent Process Exec |
| Linux Docker Root Directory Mount | TTP | NULL | Sysmon for Linux EventID 1 |
None recorded.
| Used by | Procedure example |
|---|---|
| GroupTeamTNT | TeamTNT has deployed privileged containers that mount the filesystem of victim machine. |
| Used by | Procedure 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 |
Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.