You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ramleak works when I disable Secure Boot and then Bitlocker the device. However, I can not get Win PE to boot with the modified BCD file if Secure Boot is already enabled.
Actually, I should make a correction. I got past Secure Boot but then I get the Windows Bitlocker pre-boot screen. However, it's not the typical display and looks more like what you see below.
I only got to this point by doing the following:
Obtained from the Windows debugging tools the files symchk.exe, symsrv.dll, symsrv.yes, symstore.exe and copied those into my Windows\System32 folder (because I was receiving an error about missing symbols)
Installed Microsoft Visual C++ 2015-2022 Redistributable
Replaced in iso\EFI\boot the bootx64.efi with one that worked with Secure Boot
Ran the scripts, rebuilt the ISO file, and copied everything to my USB flash drive
I was able to get this working with Secure Boot BitLocker validation, but had the same results described with BitLocker without Secure Boot. I haven't had much success yet playing around with this PoC or trying other methods (PXE soft reboot), but I'm guessing the issue is that legacy integrity validation doesn't work with the PoC even when using the target bootmgfw.efi. Do correct me if I'm wrong, though. I am very much interested in seeing if this vulnerability works consistently under legacy validation.
For legacy integrity validation, you have to use the exact same bootmgfw.efi from your target system's EFIESP, as the hash of that gets extended into a PCR used for unsealing the VMK from TPM in that scenario.
The rest of the legacy validation checks are effectively skipped, as they're only performed after successful boot application load. The code flow is as follows:
default boot application launch, VMK is derived at this point
it tries to load "\" as a file, this fails and returns failure with VMK derived
recovery boot application launch, ramdisks are created which reads the file to leak into memory
second stage boot application is loaded, validation checks are performed which wipes the derived VMK from memory and caps PCR11 to lock out VMK unsealing until reset
second stage boot application loads with leaked file in memory.
For pre-UEFI legacy BIOS boot (including CSM), you need to boot from a drive where the MBR and NTFS partition boot sector and bootmgr file is identical to your target system's, as the code flow here is: BIOS extends hash of MBR sector into TPM PCR, MBR extends hash of NTFS partition boot sector into TPM PCR, NTFS partition boot sector extends hash of bootmgr into TPM PCR, that TPM PCR is used as part of VMK unsealing from TPM. The PoC doesn't do this and supports only EFI boot.
Sticking strictly with the PoC, I made sure I was on legacy integrity validation with TPM only, used the appropriate rawdevice GUIDs from the original BCD as instructed in the readme, successfully created the new BCD with no errors from the .bat, copied all the files from \ramleak\iso to a USB with the target system's original bootmgfw.efi and tried booting from the USB, but I still get the same error screen shown earlier. For bootmgfw.efi, I tried renamed it to bootx64.efi and replacing that with the one in the USB's \EFI\boot, as well as just using bootmgfw.efi and editing the new BCD's {bootmgr} path parameter to use it at \EFI\Microsoft\Boot\bootmgfw.efi like normal, both both produced the same error.
BitLocker with Secure Boot validation works without issue using the PoC as instructed on the same VM I am testing with if I switch back to enabling Secure Boot and using 7 and 11 protectors.
so you still get an error when copying target system EFIESP \EFI\Microsoft\Boot\bootmgfw.efi to USB \efi\boot\bootx64.efi ?
Does EFIESP \efi\boot\bootx64.efi exist? If so, and it's different from EFIESP \EFI\Microsoft\Boot\bootmgfw.efi, try using that.
If that doesn't work, then try copying the PoC data (move BCD out of the way, copy BCD, copy everything that isn't the \EFI\ directory) directly to EFIESP and booting from EFIESP. The PoC data is ~40MB so should fit on EFIESP partition.
Why does the command line output the following when I run build_bcd.bat?
1 file(s) copied.
Ensuring symbols are present...done
The entry {bootmgr} was successfully created.
Ensuring symbols are present...done
The entry {00000000-0000-0000-0000-000000000001} was successfully created.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The specified device is invalid.
Run "bcdedit /?" for command line help.
Parameter error.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The entry {00000000-0000-0000-0000-000000000002} was successfully created.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The specified device is invalid.
Run "bcdedit /?" for command line help.
Parameter error.
I ran bcdedit /store Z:\EFI\Microsoft\Boot\BCD /enum /raw within WinRE,
retrieved the partex and hd gpt sig for the device in the Windows boot loader, and configured build_config.bat by placing the hd gpt sig into the part2[hd[gpt position and the partex into the gptsig position.
I ran bcdedit /store Z:\EFI\Microsoft\Boot\BCD /enum /raw within WinRE, retrieved the partex and hd gpt sig for the device in the Windows boot loader, and configured build_config.bat by placing the hd gpt sig into the part2[hd[gpt position and the partex into the gptsig position.
I ran bcdedit /store Z:\EFI\Microsoft\Boot\BCD /enum /raw within WinRE, retrieved the partex and hd gpt sig for the device in the Windows boot loader, and configured build_config.bat by placing the hd gpt sig into the part2[hd[gpt position and the partex into the gptsig position.
what does your build_config.bat look like?
@echo off
set RAWDEVICE=part2[hd[gpt[{18F10914-AD50-5BB9-94CC-0FD5D808AA47}]],gptsig[{78DA17C3-4E7F-5D22-805D-A6CC080607B1}]]
set FILETOLEAK=\windows\system32\config\SYSTEM
set BEM=bcdeditmod\bcdeditmod /store iso\efi\microsoft\boot\bcd /offline
The correct config filename is bcd_config.bat, not build_config.bat.
Your RAWDEVICE works for me.
What is your runtime environment? I'm working on Windows 11 25H2; why can't I get it to run successfully on my computer? My filename is exactly bcd_config.bat.
Activity
Wack0 commentedon Jun 5, 2026
what error do you get? you might need to use the bootmgfw.efi file from the device, the PoC provides the latest version of bootmgfw_ex.
chickenjudo68 commentedon Jun 7, 2026
Actually, I should make a correction. I got past Secure Boot but then I get the Windows Bitlocker pre-boot screen. However, it's not the typical display and looks more like what you see below.
I only got to this point by doing the following:
Thanks.
Wack0 commentedon Jun 7, 2026
you might need to use the exact bootmgfw.efi from your target system here, it depends how bitlocker was set up.
Quaelopec commentedon Jun 15, 2026
I was able to get this working with Secure Boot BitLocker validation, but had the same results described with BitLocker without Secure Boot. I haven't had much success yet playing around with this PoC or trying other methods (PXE soft reboot), but I'm guessing the issue is that legacy integrity validation doesn't work with the PoC even when using the target bootmgfw.efi. Do correct me if I'm wrong, though. I am very much interested in seeing if this vulnerability works consistently under legacy validation.
Wack0 commentedon Jun 15, 2026
For legacy integrity validation, you have to use the exact same bootmgfw.efi from your target system's EFIESP, as the hash of that gets extended into a PCR used for unsealing the VMK from TPM in that scenario.
The rest of the legacy validation checks are effectively skipped, as they're only performed after successful boot application load. The code flow is as follows:
For pre-UEFI legacy BIOS boot (including CSM), you need to boot from a drive where the MBR and NTFS partition boot sector and bootmgr file is identical to your target system's, as the code flow here is: BIOS extends hash of MBR sector into TPM PCR, MBR extends hash of NTFS partition boot sector into TPM PCR, NTFS partition boot sector extends hash of bootmgr into TPM PCR, that TPM PCR is used as part of VMK unsealing from TPM. The PoC doesn't do this and supports only EFI boot.
Quaelopec commentedon Jun 21, 2026
Sticking strictly with the PoC, I made sure I was on legacy integrity validation with TPM only, used the appropriate rawdevice GUIDs from the original BCD as instructed in the readme, successfully created the new BCD with no errors from the .bat, copied all the files from \ramleak\iso to a USB with the target system's original bootmgfw.efi and tried booting from the USB, but I still get the same error screen shown earlier. For bootmgfw.efi, I tried renamed it to bootx64.efi and replacing that with the one in the USB's \EFI\boot, as well as just using bootmgfw.efi and editing the new BCD's {bootmgr} path parameter to use it at \EFI\Microsoft\Boot\bootmgfw.efi like normal, both both produced the same error.
BitLocker with Secure Boot validation works without issue using the PoC as instructed on the same VM I am testing with if I switch back to enabling Secure Boot and using 7 and 11 protectors.
Wack0 commentedon Jun 21, 2026
so you still get an error when copying target system EFIESP \EFI\Microsoft\Boot\bootmgfw.efi to USB \efi\boot\bootx64.efi ?
Does EFIESP \efi\boot\bootx64.efi exist? If so, and it's different from EFIESP \EFI\Microsoft\Boot\bootmgfw.efi, try using that.
If that doesn't work, then try copying the PoC data (move BCD out of the way, copy BCD, copy everything that isn't the \EFI\ directory) directly to EFIESP and booting from EFIESP. The PoC data is ~40MB so should fit on EFIESP partition.
wayne4321-bit commentedon Jul 9, 2026
Why does the command line output the following when I run build_bcd.bat?
1 file(s) copied.
Ensuring symbols are present...done
The entry {bootmgr} was successfully created.
Ensuring symbols are present...done
The entry {00000000-0000-0000-0000-000000000001} was successfully created.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The specified device is invalid.
Run "bcdedit /?" for command line help.
Parameter error.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The entry {00000000-0000-0000-0000-000000000002} was successfully created.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The operation completed successfully.
Ensuring symbols are present...done
The specified device is invalid.
Run "bcdedit /?" for command line help.
Parameter error.
I ran
bcdedit /store Z:\EFI\Microsoft\Boot\BCD /enum /rawwithin WinRE,retrieved the
partexandhd gpt sigfor the device in the Windows boot loader, and configuredbuild_config.batby placing thehd gpt siginto thepart2[hd[gptposition and thepartexinto thegptsigposition.Wack0 commentedon Jul 9, 2026
what does your
build_config.batlook like?wayne4321-bit commentedon Jul 10, 2026
@echo off
set RAWDEVICE=part2[hd[gpt[{18F10914-AD50-5BB9-94CC-0FD5D808AA47}]],gptsig[{78DA17C3-4E7F-5D22-805D-A6CC080607B1}]]
set FILETOLEAK=\windows\system32\config\SYSTEM
set BEM=bcdeditmod\bcdeditmod /store iso\efi\microsoft\boot\bcd /offline
Wack0 commentedon Jul 10, 2026
The correct config filename is
bcd_config.bat, notbuild_config.bat.Your RAWDEVICE works for me.
wayne4321-bit commentedon Jul 10, 2026
What is your runtime environment? I'm working on Windows 11 25H2; why can't I get it to run successfully on my computer? My filename is exactly
bcd_config.bat.Wack0 commentedon Jul 10, 2026
I'm running on win10 IoTEnterpriseS (1904x).
I'm not sure why it doesn't work for you, everything looks good to me. The errors specifically are related to bad RAWDEVICE...