
CVE-2026-45585 (YellowKey) に対する BitLocker TPM+PIN ハードニング
WinRE BitLockerバイパスに対する自動緩和策 — 完全なパッチはまだ提供されていません
YellowKey は、公開されたBitLockerバイパス手法です。物理的アクセスを持つ攻撃者は、回復キーもPINも資格情報も一切使わずに、BitLockerで保護されたWindows 11ドライブ上で制限なしのシェルを取得できます。
Windows回復環境(WinRE)内のコンポーネント(autofstx.exe)がTransactional NTFSのリプレイ処理を実行し、winpeshl.iniを削除します。その副作用として、復号済みボリュームへの完全なアクセス権を持つシェルが起動します。攻撃者は、フォルダをUSBドライブ(またはEFIパーティションに直接)にコピーし、WinREで再起動してCTRLキーを押し続けるだけで、この攻撃を発動できます。
TPMのみからTPM+PINに切り替えることで、この攻撃を完全にブロックできます。起動時にPINが必要になるため、攻撃者がどのようにWinREシェルを起動してもドライブを復号できません。正しいPINなしではTPMがボリュームマスターキーを解放しないからです。
TPMのみのBitLockerは、同じハードウェアでの起動時に自動的にロックを解除します。TPM+PINはユーザーだけが知る秘密情報を必要とするため、YellowKeyの隙間を塞ぎます。
このスクリプトは、デフォルトではmanage-bdeがPINプロテクタを追加できないようにしているグループポリシーの前提条件を処理し、その後ドライブをTPMのみからTPM+PINへ1回の実行で安全に移行します。
Run Add-BitLockerTPMPin.ps1 (admin)
│
▼
[Version Check] ──→ exits gracefully on Windows 10 (not affected)
│
▼
[BitLocker Status Check] ──→ confirms encryption is active on C:
│
▼
[Group Policy Fix] ──→ sets UseAdvancedStartup + UseTPMPIN + UseEnhancedPin
│ (required — manage-bde rejects TPM+PIN without these)
▼
[gpupdate /force] ──→ applies policy immediately without reboot
│
▼
[manage-bde -protectors -add C: -TPMAndPIN] ──→ prompts for PIN interactively
│
▼
[List Protectors] ──→ shows all current protectors for verification
│
▼
[Remove TPM-only Protector] ──→ optional, prompted with confirmation
# Run these as two separate commands in an elevated PowerShell prompt:
Set-ExecutionPolicy Bypass -Scope Process -Force
# All BitLocker-protected drives (auto-detected):
.\Add-BitLockerTPMPin.ps1
# Or target a specific drive:
.\Add-BitLockerTPMPin.ps1 -Drive C
.\Add-BitLockerTPMPin.ps1 -Drive D
ドライブごとにPINを設定する対話式プロンプトが表示されます。英数字PINに対応しています(スクリプトがレジストリ経由で拡張PINを有効化します)。
注: TPM+PINプロテクタはOSドライブのみ(TPMを通じて起動するドライブ)に適用されます。データドライブ(D:、E:など)はパスワードまたは回復キープロテクタを使用するため、スクリプトはそれらを自動的に検出してスキップします。
BitLocker-protected drives found:
C:\ FullyEncrypted Protection: On
D:\ FullyEncrypted Protection: On
Group Policy keys set. Refreshing policy...
==============================
Drive: C:\
==============================
Adding TPM+PIN protector. You will be prompted for a PIN.
PIN must be 6+ characters. Alphanumeric is supported.
Type the PIN to use to protect the volume:
Confirm the PIN by typing it again:
Key Protectors Added:
TPM And PIN:
ID: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
Current protectors on C:\:
...
TPM-only protector found: {YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY}
Remove TPM-only protector on C:\? This leaves only TPM+PIN. (y/N): y
TPM-only protector removed.
==============================
Drive: D:\
==============================
D:\ has no TPM protector — TPM+PIN applies to the OS drive only. Skipping.
Done. Verify with: manage-bde -status <drive>
manage-bde -status C:
# Should show: Key Protectors: TPM And PIN
# Protection Status: Protection On
実行前に回復キーを用意してください。 このスクリプトは、TPM+PINプロテクタが正常に追加されたことを確認した後でのみTPMのみのプロテクタを削除します。ただし、実行途中でマシンが再起動された場合や、manage-bde -addステップが部分的に失敗した場合は、ドライブのロックを解除するために回復キーが必要になります。
今すぐ回復キーを取得してください:
# Print recovery key to console (store it somewhere safe)
manage-bde -protectors -get C: -Type RecoveryPassword
または、Microsoftアカウントの account.microsoft.com/devices/recoverykey で確認できます。
PINの選択は重要です。 短い数字のみのPINは、標的型の物理的攻撃に対して弱い保護しか提供しません。最低8文字以上を使用してください。英数字PINはスクリプトによって有効化されます。
このスクリプトは、HKLM:\SOFTWARE\Policies\Microsoft\FVE の下に4つのレジストリ値を設定します:
これらは、Windowsのグループポリシー(gpedit.msc)が書き込むキーとまったく同じものです。レジストリ経由で設定することは、MMCスナップインでポリシーを構成するのと同等です。
個別に手順を実行したい場合は:
# 1. Set Group Policy registry keys
$p = "HKLM:\SOFTWARE\Policies\Microsoft\FVE"
if (-not (Test-Path $p)) { New-Item -Path $p -Force }
Set-ItemProperty -Path $p -Name "UseAdvancedStartup" -Value 1 -Type DWord -Force
Set-ItemProperty -Path $p -Name "UseTPMPIN" -Value 2 -Type DWord -Force
Set-ItemProperty -Path $p -Name "UseTPM" -Value 2 -Type DWord -Force
Set-ItemProperty -Path $p -Name "UseEnhancedPin" -Value 1 -Type DWord -Force
gpupdate /force
# 2. Add TPM+PIN protector
manage-bde -protectors -add C: -TPMAndPIN
# 3. Find the TPM-only protector ID
manage-bde -protectors -get C:
# 4. Remove it (replace GUID with the ID from step 3)
manage-bde -protectors -delete C: -id {YOUR-TPM-ONLY-GUID}
# 5. Verify
manage-bde -status C:
yellowkey-mitigation/
├── Add-BitLockerTPMPin.ps1 # Main mitigation script
└── README.md
このスクリプトは**Claude(Anthropic)**と共同開発されました。すべてのロジックは作者によってWindows 11上でレビューおよびテスト済みです。
MIT — 自由に使用、変更、配布できます。
| 詳細 |
|---|
| CVE | CVE-2026-45585 |
| CVSSスコア | 6.8(中) |
| CVSSベクター | CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CWE | CWE-77(コマンドインジェクション) |
| 攻撃ベクトル | 物理的アクセスが必要 |
| 公開日 | 2026年5月19日 |
| パッチ | まだ提供なし — Microsoftは手動による緩和策のみを公開 |
| MSRCアドバイザリ | msrc.microsoft.com/update-guide/vulnerability/CVE-2026-45585 |
| PoC | 公開済み(Nightmare-Eclipse/YellowKey) |
| 影響を受けるOS | Windows 11(24H2、25H2、26H1)、Windows Server 2022/2025 |
| 影響を受けないOS | Windows 10 |
| キー | 値 | 目的 |
|---|
UseAdvancedStartup | 1 | 「起動時に追加の認証を要求する」ポリシーを有効化 — これがないと、すべての UseTPM* キーは無視される |
UseTPMPIN | 2 | 0 = ブロック、1 = 必須、2 = TPM+PINを許可 |
UseTPM | 2 | PINと併せてTPMのみも許可(ポリシーの競合を防ぐ) |
UseEnhancedPin | 1 | PINでの英数字の使用を許可 |