Getting past Secure Boot
Secure Boot Rollback: Vulnerable Signed Boot Managers
How BlackLotus booted an old, Microsoft-signed boot manager to get past Secure Boot (CVE-2022-21894), what revocation changes, and how to check a Windows host.
- Goal
- Getting past Secure Boot
- Layer
- Boot
- Where it acts
- EFI system partitionOn the boot chain map
- Platforms
- Windows
- Also known as
- Secure Boot rollback, boot manager downgrade
- Used by
- BlackLotus
- Checked by
- EFI system partitionMeasured Boot logs
Overview
Secure Boot decides whether to run a boot loader by its signature. The firmware's db lists the certificates it trusts, such as Microsoft Windows Production PCA 2011, and dbx lists what it no longer trusts. A boot manager that Microsoft signed years ago still carries a valid signature after Microsoft fixes a flaw in it. Until that old binary, or its signing certificate, is revoked in dbx, the firmware will run it.
This technique uses that gap. An attacker with administrator rights copies an old, vulnerable, Microsoft-signed Windows Boot Manager to the EFI system partition (ESP) and boots through it. Secure Boot stays on and accepts every file it checks, and the old flaw lets the attacker's code run before Windows. It is a boot-layer bypass of the trust model: patching the boot manager on disk does not help while the vulnerable copy can be brought back.
BlackLotus made the technique concrete in 2022–2023 with CVE-2022-21894. The same class of problem hit Linux in 2020 with BootHole, described as context below.
How it works
At summary level, from Microsoft's advisories and ESET's report:
| Step | What happens | Why Secure Boot does not stop it |
|---|---|---|
| 1. Staging | Old, Microsoft-signed boot applications and an attacker BCD are written to the ESP | Writing files needs administrator rights, not a signature |
| 2. Boot | The firmware starts a Windows Boot Manager vulnerable to CVE-2022-21894 | Its signature is valid and it is not in dbx |
| 3. Policy removed | ESET's summary: the vulnerable boot applications can be made, through a BCD memory option, to drop the serialized Secure Boot policy from memory, so settings Secure Boot normally forbids (test signing, no integrity checks, boot debugging) take effect | The flaw is in signed code that the firmware trusts |
| 4. Attacker code | Self-signed attacker code runs before ExitBootServices, while firmware variables reserved to boot time can still be written | Nothing checks it once the policy is gone |
Microsoft fixed CVE-2022-21894 on 11 January 2022. ESET pointed out that a year later the validly signed vulnerable binaries were still not revoked, which is what made the attack work on fully updated Windows 11. Microsoft's answer, CVE-2023-24932, is described in KB5025885 as a publicly disclosed Secure Boot bypass used by BlackLotus, whose fix "requires revoking boot managers". The steps, which Microsoft interlocks so they apply in order:
- add Windows UEFI CA 2023 to
db; - install a boot manager signed by that CA;
- add Windows Production PCA 2011 to
dbx, which distrusts every boot manager signed by it, old or new; - optionally, set a Secure Version Number (SVN) in firmware, so a boot manager older than that number refuses to run.
These mitigations are not enabled by default. KB5025885 dates the deployment phase from July 2024 and says the enforcement phase, which will add PCA 2011 to dbx automatically on capable devices, will not begin before January 2026; at the page's latest update, 30 September 2026, its date was still to be announced.
The 2011 certificates also expire: Microsoft's certificate expiration article gives June 2026 for the KEK CA 2011 and UEFI CA 2011, and 19 October 2026 for Windows Production PCA 2011. Devices without the 2023 certificates keep booting, but can no longer receive new early-boot protections, including boot manager and dbx updates.
Context: BootHole and SBAT. In July 2020 Eclypsium reported BootHole (CVE-2020-10713), a buffer overflow in how signed GRUB2 parsed grub.cfg on the ESP. CERT/CC's advisory stresses the same point: until vulnerable versions are added to dbx, attackers can still use them. Shim's SBAT document notes that the BootHole revocation alone added 3 certificates and 150 image hashes to dbx, using about 10 kB of the typical 32 kB. SBAT replaces per-hash revocation for shim and GRUB with generation numbers in a .sbat section and a minimum level in the SbatLevel variable. Windows' SVN plays a similar role for the boot manager.
How families use it
| Family | Use | Source |
|---|---|---|
| BlackLotus | Exploits CVE-2022-21894 once, at installation, from a staging folder ESP:\system32\ holding vulnerable boot files (bootmgr.efi, hvloader.efi and others) and an attacker BCD. The exploit enrolls the attacker's certificate in shim's MokList; later boots go through shim, not the vulnerable boot manager | ESET, Microsoft |
Part of BlackLotus's source code was published on GitHub in July 2023, as reported at the time, so copies are possible. One consequence of the design matters for remediation: ESET notes that if the revocations are applied after the bootkit is installed, it keeps working, because its persistence relies on shim and the enrolled key (see enrolling an attacker key in shim's MOK list).
Traces it leaves
| Where | What | Source |
|---|---|---|
ESP:\system32\ | Staging folder for the vulnerable boot files and a second bcd; files deleted after installation, folder left behind, deleted entries possibly recoverable | ESET, Microsoft |
\EFI\Microsoft\Boot\BCD during installation | Points the boot manager at another BCD store (bcdfilepath); the attacker store sets memory truncation options and test signing or no integrity checks; ESET reports the original kept as BCDR | ESET |
| ESP, any folder | A Microsoft-signed boot application whose version is older than the copy in C:\Windows\Boot\EFI | General: the signature alone does not show it |
| Firmware NVRAM | Attacker certificate in MokList | ESET |
| SYSTEM hive, event logs | HVCI turned off; Defender reporting that protection stopped, System event 7023 | Microsoft |
| System log | Absence of the KB5025885 servicing events: 1036 (DB updated), 1799 (2023-signed boot manager applied), 1037 (DBX updated), 1042 (SVN applied) | Microsoft |
The last row is about exposure, not compromise.
How to check a host
Exposure, live, from an elevated PowerShell prompt, with the commands KB5025885 gives:
[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI db).bytes) -match 'Windows UEFI CA 2023'
(Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\Servicing").UEFICA2023Status
[System.Text.Encoding]::ASCII.GetString((Get-SecureBootUEFI dbx).bytes) -match 'Microsoft Windows Production PCA 2011'
True, Updated and True mean the 2023 CA is trusted, the new boot manager is installed and PCA 2011 is revoked. A False on the last line means old boot managers still boot on this device.
Compromise, offline. Image the ESP and look for the staging folder and its deleted entries; read every BCD store on the ESP with bcdedit /store <copy> /enum all /v; list the file version and signer of every boot application and compare them with C:\Windows\Boot\EFI; read the Measured Boot logs in C:\Windows\Logs\MeasuredBoot\ for the boot applications Microsoft says appear after a BlackLotus infection. The collection steps are in How to check the EFI system partition offline.
What these checks cannot prove: a valid Microsoft signature proves nothing here, which is the point of the technique. The installer cleans up the exploit stage, leaving the empty folder and the enrolled key. And Get-SecureBootUEFI answers from a system the bootkit may control; read the Secure Boot databases from trusted boot media if the host is suspect.
What the checker looks for
The esp module sees the installation stage and its leftovers:
- "A system32 folder at the root of the EFI system partition" for any file left in
ESP:\system32\(an emptied folder only shows in a partition image); - in a BCD that still carries the installer's settings: "The boot manager is told to load another BCD store", "The BCD sets truncatememory" or
avoidlowmemory, "The BCD enables test signing", "The BCD disables integrity checks"; - "BCDR does not belong in the Windows boot folder".
It also lists each boot application's file version and, for the Windows Boot Manager at \EFI\Microsoft\Boot\bootmgfw.efi signed through PCA 2011, adds a "Revocation" note; an old boot manager staged under another name gets no such note: once the KB5025885 mitigations are applied, firmware distrusts it, but a file check cannot tell whether this host's db and dbx carry the revocation. It has no trust store and no list of vulnerable versions, so the old boot managers the exploit uses pass as validly signed. Where a .sbat section exists (shim, GRUB), it shows the SBAT data without judging it.
The measuredboot module sees what follows: "\EFI\Microsoft\Boot\grubx64.efi was started from the Windows boot folder", and the same for winload.efi. It shows when the boot revocation list in use was created, but does not judge the boot manager's SVN. Secure Boot stays on, so its Secure Boot findings stay quiet.
Mitigation and recovery
Prevent:
- apply the KB5025885 steps after testing one device of each model: update recovery and installation media first, back up BitLocker recovery keys, and know that the revocations cannot be undone while Secure Boot is in use;
- make sure each device receives the 2023 certificates, so it can keep receiving
dbxand boot manager updates after the 2011 certificates expire; - on machines that do not need it, remove the Microsoft third-party UEFI CA: Microsoft says this blocks BlackLotus from working but does not remove the vulnerability;
- limit administrator rights. The NSA's guide warns that patching alone gives a false sense of security and recommends watching the boot partition's integrity.
Recover as for BlackLotus: preserve the ESP and logs, reformat the OS partition and the ESP or restore a clean backup that includes it, remove the attacker's key from the MOK list with mokutil (it survives a disk wipe), then apply the revocations so the same path cannot be used again.
Sources
Primary public reports, newest first.
- 2026-09-30How to manage the Windows Boot Manager revocations for Secure Boot changes associated with CVE-2023-24932 (KB5025885)Microsoft
- 2025-06-26Windows Secure Boot certificate expiration and CA updatesMicrosoft
- 2023-06-22BlackLotus Mitigation GuideNSA
- 2023-05-09CVE-2023-24932: Secure Boot Security Feature Bypass VulnerabilityMicrosoft
- 2023-04-11Guidance for investigating attacks using CVE-2022-21894: The BlackLotus campaignMicrosoft
- 2023-03-01BlackLotus UEFI bootkit: Myth confirmedESET
- 2022-01-11CVE-2022-21894: Secure Boot Security Feature Bypass VulnerabilityMicrosoft
- 2020-07-29GRUB2 bootloader is vulnerable to buffer overflow (VU#174059, BootHole)CERT/CC
See also
Related techniques
- Enrolling an attacker key in shim's MOK listGetting past Secure Boot
- Replacing or patching the ESP boot managerPersisting in the boot chain
- Firmware image parser exploits (LogoFAIL)Getting past Secure Boot
- Turning off driver signing from the boot chainTaking over the boot
Families that use it
- BlackLotusUEFI bootkit