适用于 CVE-2026-45585 YellowKey BitLocker/WinRE 绕过缓解措施的 Intune 修复包,按照提供的步骤执行。
该包从离线 WinRE 映像的 BootExecute 值中移除 autofstx.exe,并刷新 WinRE 注册,从而重新建立 BitLocker 信任。
YellowKey-WinRE-Remediation/
scripts/
Detect-YellowKeyWinRE.ps1
Remediate-YellowKeyWinRE.ps1
.editorconfig
.gitattributes
.gitignore
README.md
针对修复包使用以下设置:
| 设置 | 值 |
|---|---|
| 检测脚本 | scripts/Detect-YellowKeyWinRE.ps1 |
| 修复脚本 | scripts/Remediate-YellowKeyWinRE.ps1 |
| 使用登录凭据运行此脚本 | 否 |
| 强制执行脚本签名检查 | 否,除非你签署了脚本 |
| 在 64 位 PowerShell 中运行脚本 | 是 |
检测:
reagentc.exe /mountre 挂载 WinRE。SYSTEM 配置单元。ControlSet###\Control\Session Manager\BootExecute 值是否包含 autofstx.exe。autofstx.exe 或检测无法安全完成时,退出 1。0。修复:
reagentc.exe /mountre 挂载 WinRE。SYSTEM 配置单元。autofstx.exe 的 BootExecute 条目。BootExecute 时使用显式的 RegistryValueKind.MultiString。BootExecute;如果过滤后导致其为空,则写入 Windows 默认值 autocheck autochk *。reagentc.exe /unmountre /commit 提交 WinRE 映像。reagentc.exe /disable 和 reagentc.exe /enable 以刷新 WinRE 注册和 BitLocker 信任。脚本有意保持保守:
BootExecute 值。C:\ProgramData\IntuneRemediations\YellowKey。检测日志:
C:\ProgramData\IntuneRemediations\YellowKey\Detect.log
修复日志:
C:\ProgramData\IntuneRemediations\YellowKey\Remediate.log
运行语法验证而不执行修复:
$paths = @(
'.\scripts\Detect-YellowKeyWinRE.ps1',
'.\scripts\Remediate-YellowKeyWinRE.ps1'
)
foreach ($path in $paths) {
$tokens = $null
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile($path, [ref] $tokens, [ref] $errors) | Out-Null
if ($errors.Count -gt 0) {
$errors | Format-Table
throw "Parse failed: $path"
}
}
如果已安装,则运行脚本分析器:
Invoke-ScriptAnalyzer -Path .\scripts -Recurse
reagentc.exe /info 确认代表性设备上的 WinRE 健康状态。.ps1 文件并启用签名强制。| 脚本 | 退出 0 | 退出 1 |
|---|---|---|
| 检测 | 合规或 WinRE 已禁用/不适用 | 易受攻击或检测无法安全完成 |
| 修复 | 修复成功完成 | 修复失败或需要清理 |