Trusted Design

T1611 - Escape to Host

概要

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.(Citation: Docker Overview)

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.(Citation: Docker Bind Mounts)(Citation: Trend Micro Privileged Container)(Citation: Intezer Doki July 20)(Citation: Container Escape)(Citation: Crowdstrike Kubernetes Container Escape)(Citation: Keyctl-unmask)

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.(Citation: Container Escape) 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.(Citation: Windows Server Containers Are Open)

In ESXi environments, an adversary may exploit a vulnerability in order to escape from a virtual machine into the hypervisor.(Citation: Broadcom VMSA-2025-004)

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.

管理者によるコメント

T1611は「Escape to Host(ホストへのエスケープ)」として定義されている、クラウドやコンテナ環境(Docker、Kubernetes、各種仮想化ハイパーバイザーなど)において最も深刻かつ警戒すべき「特権昇格(Privilege Escalation)」および「横展開(Lateral Movement)」のテクニックです。

隔離された環境であるはずの「コンテナ(または仮想マシン:VM)」の内部に侵入した攻撃者が、その境界線を物理的に突破し、コンテナを動かしている土台である「ホストOS(物理サーバーやノード)」の制御権(root)を奪取する手法、いわゆる「コンテナエスケープ」を指します。

1. 概要(攻撃者は何を実現できるのか?)

この手法で攻撃者は、「1つのアプリの檻から脱出し、同じサーバー上で動く他のすべてのコンテナや、クラウドインフラ全体の支配権を一網打尽に奪うこと」を実現します。

2. 攻撃の仕組みと流れ(悪用の3大パターン)

コンテナエスケープは、主に「コンテナの設定ミス(過剰な特権)」または「Linuxカーネルの脆弱性」を突いて実行されます。ここでは、実戦で最も頻出する不適切な特権コンテナ(Privileged Container)の設定ミスを突いたエスケープの流れを解説します。

  1. 初期侵入:
    コンテナ上で動作しているWebアプリケーションの脆弱性(RCEなど)を突き、コンテナの内部に一般ユーザーまたはrootとして侵入します。

  2. 環境調査(特権の確認):
    攻撃者は自分がいるコンテナが、ホストのデバイスに直接アクセスできる「--privileged(特権モード)」で起動されていないか調査します。

  3. エクスプロイト・脱出コマンドの実行(トリガー):
    特権コンテナである場合、コンテナ内からホストOSの物理ディスクドライブ(/dev/sda1 など)が直接見えています。攻撃者はこれを利用し、ホストOSのハードディスクをコンテナ内の適当なフォルダに強引にマウント(接続)します。

    • エスケープコマンドの例:
      mkdir /mnt/host
      mount /dev/sda1 /mnt/host
  4. ホストOSの書き換え:
    マウントしたことで、コンテナ内にいながらにしてホストOSの核心部(/etc/shadow パスワードファイルや、ホスト側の cron ジョブスケジュールなど)を自由に変更できるようになります。攻撃者はホスト側の自動起動ジョブ(/mnt/host/etc/cron.d/malware)に、自身のC2サーバーへ接続するリバースシェルを書き込みます。

  5. ホストの掌握(目的達成):
    数分後、ホストOS側でリバースシェル(cron)が実行され、攻撃者はコンテナの壁を完全に越えて、ホストOSの最高権限(root)の奪取に成功します。

3. 防御・対策

コンテナ環境の安全は、「過剰な権限を与えない設定(堅牢化)」がすべてと言っても過言ではありません。

4. 重要ポイント

5. 関連する主なCWE

6. 関連する代表的なCVE

T1611(Escape to Host)を極めて凶悪なものにする、コンテナの歴史の分岐点となった超有名な脆弱性(既知のエクスプロイト)です。

実務上のアドバイス

クラウド/コンテナ運用の現場やペネトレーションテストにおいて、「Webサーバーの入ったコンテナ1台が踏み台にされた」という報告を受けた際、「まあコンテナの中だし、機密データはそこにはないから大丈夫だろう」と楽観視するのは極めて危険です。

攻撃者がこの T1611 を使って数秒でホストノードにエスケープしていた場合、そのノード上で動く他のお客様のWebサイトや、背後の認証トークン経由でAWS / Azureの全インフラがすでに陥落している可能性があります。

コンテナのインシデント対応では、「エスケープされた形跡(ホスト側ログでの不審なプロセス起動など)がないか」を直ちに確認することが、被害を最小限に食い止めるための最大のブレイクスルーとなります。

分析

この攻撃手法を利用する脅威アクター

この攻撃手法を利用する脅威アクターは登録されていません。

関連する CVE

攻撃手法 – 脅威アクター Graph


← Technique一覧に戻る ← Tactics一覧に戻る