Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
YellowKey-WinRE-Remediation — PowerShell-based Intune remediation package that detects and removes the vulnerable autofstx.exe BootExecute entry from offline WinRE images, then refreshes BitLocker trust to mitigate the CVE-2026-45585 YellowKey bypass. | Kitploit
Tools/GitHubGitHub/everest90909/yellowkey-winre-remediation
Defensive ToolsVulnerability AnalysisScripting & AutomationConfiguration AuditingIncident Response
GitHubeverest90909/yellowkey-winre-remediation

YellowKey-WinRE-Remediation

PowerShell-based Intune remediation package that detects and removes the vulnerable autofstx.exe BootExecute entry from offline WinRE images, then refreshes BitLocker trust to mitigate the CVE-2026-45585 YellowKey bypass.

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
View Repository
123 months agoNot yet reviewed
Share

YellowKey WinRE Remediation

Intune Remediation package for the CVE-2026-45585 YellowKey BitLocker/WinRE bypass mitigation described in the provided procedure.

This package removes autofstx.exe from the offline WinRE image's BootExecute value and refreshes WinRE registration so BitLocker trust is reestablished.

Contents

root@kitploit:~
YellowKey-WinRE-Remediation/
  scripts/
    Detect-YellowKeyWinRE.ps1
    Remediate-YellowKeyWinRE.ps1
  .editorconfig
  .gitattributes
  .gitignore
  README.md

Intune Settings

Use these settings for the remediation package:

SettingValue
Detection scriptscripts/Detect-YellowKeyWinRE.ps1
Remediation scriptscripts/Remediate-YellowKeyWinRE.ps1
Run this script using the logged-on credentialsNo
Enforce script signature checkNo, unless you sign the scripts
Run script in 64-bit PowerShellYes

Behavior

Detection:

  • Requires elevated local administrator or SYSTEM context.
  • Requires 64-bit PowerShell.
  • Mounts WinRE using reagentc.exe /mountre.
  • Loads the offline WinRE SYSTEM hive under a temporary HKLM name.
  • Checks every offline ControlSet###\Control\Session Manager\BootExecute value for autofstx.exe.
  • Unloads the hive and discards the WinRE mount.
  • Exits 1 when autofstx.exe is found or detection cannot safely complete.
  • Exits 0 when no vulnerable entry is found.

Remediation:

  • Performs the same environment guardrails as detection.
  • Enables WinRE first if it is disabled and can be enabled.
  • Mounts WinRE using reagentc.exe /mountre.
  • Loads the offline WinRE SYSTEM hive.
  • Removes any BootExecute entry containing autofstx.exe from every offline ControlSet.
  • Uses explicit RegistryValueKind.MultiString when writing BootExecute.
  • Refuses to write an empty BootExecute; if filtering would empty it, writes the Windows default autocheck autochk *.
  • Unloads the hive before committing.
  • Commits the WinRE image with reagentc.exe /unmountre /commit.
  • Runs reagentc.exe /disable and reagentc.exe /enable to refresh WinRE registration and BitLocker trust.
  • Cleans up loaded hives and mounted images on failure.

Guardrails

The scripts are intentionally conservative:

  • No BitLocker protectors are suspended, removed, or changed directly.
  • The remediation only edits the offline WinRE image, not the live OS BootExecute value.
  • Temporary hive names and mount paths include random suffixes to avoid collisions.
  • Failure cleanup unloads the temporary hive and discards the WinRE mount.
  • Logs are written to C:\ProgramData\IntuneRemediations\YellowKey.

Logs

Detection log:

root@kitploit:~
C:\ProgramData\IntuneRemediations\YellowKey\Detect.log

Remediation log:

root@kitploit:~
C:\ProgramData\IntuneRemediations\YellowKey\Remediate.log

Local Validation

Run syntax validation without executing remediation:

root@kitploit:~
$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"
    }
}

Run Script Analyzer if installed:

root@kitploit:~
Invoke-ScriptAnalyzer -Path .\scripts -Recurse

Operational Notes

  • Test on a small pilot ring before broad deployment.
  • Confirm WinRE is healthy on representative devices with reagentc.exe /info.
  • Devices with missing or unhealthy WinRE should be remediated separately.
  • If your organization signs Intune scripts, sign both .ps1 files and enable signature enforcement.
  • Keep the remediation assigned only as long as needed, then rely on detection/reporting for compliance tracking.

Exit Codes

ScriptExit 0Exit 1
DetectionCompliant or WinRE disabled/not applicableVulnerable or detection could not safely complete
RemediationRemediation completed successfullyRemediation failed or cleanup was required
Download Tool