C
月内に
Hack The Boxの「MonitorsFour」マシンを題材に、WSLコンテナからホストのWindows OSへ権限昇格する手法を解説した記事です
📌 一言でいうと
Hack The Boxの「MonitorsFour」マシンを題材に、WSLコンテナからホストのWindows OSへ権限昇格する手法を解説した記事です。Docker Engine APIがホストネットワークで公開されている脆弱性を利用し、Cドライブをマウントした新しいコンテナを作成することでホストファイルシステムへのアクセスを可能にします。最終的にスケジューラスクリプトの書き換えを通じて管理者権限を奪取するプロセスが示されています。
🔍該当判定
- Windows OS上でWSL (Windows Subsystem for Linux) を利用している
- Docker Desktopをインストールし、コンテナを運用している
- Docker APIを外部またはホストネットワークからアクセス可能な状態で公開している
上記いずれにも該当しない → 静観でOK
✅該当時の対応
Docker Engine APIを外部または信頼できないネットワークに公開しないこと。APIアクセス制御を厳格に行い、コンテナの特権モードやホストディレクトリのマウント制限を適切に設定してください。
📧 メール案を見る (管理者向け)
⚠️ これは AI が生成した参考例です。配信前に必ず内容をご確認のうえ、貴社の状況に合わせて編集してご利用ください。実際の被害状況や自社の利用環境を踏まえた判断は、貴社のセキュリティ責任者にご確認ください。
件名: 【共有】Docker Engine APIの不適切な公開によるホスト権限奪取について
お疲れさまです。Docker APIの脆弱な設定を利用した権限昇格手法に関する情報共有です。
■ 概要
WSLコンテナ環境において、Docker Engine APIがホストネットワークで公開されている場合、攻撃者が任意のコンテナを作成し、ホストのファイルシステム(Cドライブ等)をマウントすることで、ホストOSの機密ファイル操作や権限昇格が可能になります。
■ 影響範囲
- Docker Engine APIをネットワーク公開設定にしているWindows/WSL環境
■ 対応手順
1. Docker APIがTCPポート(デフォルト2375/2376)で不必要に公開されていないか確認する
2. APIを公開する必要がある場合は、TLS認証を有効にし、アクセス元IPを制限する
3. コンテナ実行時の `--privileged` フラグやホストパスのマウント設定を最小限に制限する
■ 参考情報
- Docker Security Documentation
対応優先度: 高
対応期限: 速やかに確認してください
お疲れさまです。Docker APIの脆弱な設定を利用した権限昇格手法に関する情報共有です。
■ 概要
WSLコンテナ環境において、Docker Engine APIがホストネットワークで公開されている場合、攻撃者が任意のコンテナを作成し、ホストのファイルシステム(Cドライブ等)をマウントすることで、ホストOSの機密ファイル操作や権限昇格が可能になります。
■ 影響範囲
- Docker Engine APIをネットワーク公開設定にしているWindows/WSL環境
■ 対応手順
1. Docker APIがTCPポート(デフォルト2375/2376)で不必要に公開されていないか確認する
2. APIを公開する必要がある場合は、TLS認証を有効にし、アクセス元IPを制限する
3. コンテナ実行時の `--privileged` フラグやホストパスのマウント設定を最小限に制限する
■ 参考情報
- Docker Security Documentation
対応優先度: 高
対応期限: 速やかに確認してください
Subject: [Security Advisory] Host Privilege Escalation via Exposed Docker Engine API
Dear IT/Security Team,
We are sharing technical information regarding a privilege escalation vector from WSL containers to Windows hosts.
■ Overview
If the Docker Engine API is exposed on the host network, an attacker within a container can create a new container that mounts the host's root directory (e.g., C: drive). This allows the attacker to modify system files, such as scheduled task scripts, to achieve full administrative access to the host OS.
■ Scope
- Windows/WSL environments with Docker Engine API exposed to the network.
■ Mitigation Steps
1. Verify that the Docker API is not unnecessarily exposed on TCP ports 2375/2376.
2. If network access is required, enforce TLS authentication and implement strict IP whitelisting.
3. Restrict the use of privileged containers and avoid mounting sensitive host directories.
■ Reference
- Docker Security Documentation
Priority: High
Deadline: Immediate review recommended
Dear IT/Security Team,
We are sharing technical information regarding a privilege escalation vector from WSL containers to Windows hosts.
■ Overview
If the Docker Engine API is exposed on the host network, an attacker within a container can create a new container that mounts the host's root directory (e.g., C: drive). This allows the attacker to modify system files, such as scheduled task scripts, to achieve full administrative access to the host OS.
■ Scope
- Windows/WSL environments with Docker Engine API exposed to the network.
■ Mitigation Steps
1. Verify that the Docker API is not unnecessarily exposed on TCP ports 2375/2376.
2. If network access is required, enforce TLS authentication and implement strict IP whitelisting.
3. Restrict the use of privileged containers and avoid mounting sensitive host directories.
■ Reference
- Docker Security Documentation
Priority: High
Deadline: Immediate review recommended