> For the complete documentation index, see [llms.txt](https://www.syswow64.co.uk/syswow64/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.syswow64.co.uk/syswow64/blog/cve-2023-24932/part-1-bootx64.efi-windows-uefi-2023-ca-signed.md).

# Part 1: Bootx64.efi: Windows UEFI 2023 CA signed

#### Pre-requisite Actions: Lets get your computer ready

Ensure that the latest Windows Assessment and Deployment Kit (ADK) is installed. This includes having the latest Deployment Tools and Windows Preinstallation Environment (WinPE) add-ons.

For downloading the latest Windows Assessment and Deployment Kit (ADK) and Windows Preinstallation Environment (WinPE) add-ons, visit the [Microsoft Download Center](https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install).

Once the mitigation is applied your boot media will need have the Bootx64.efi Windows UEFI 2023 CA signed, otherwise Secure Boot will fail. To do this we need to mount the default WinPE.wim and extract the Bootx64.efi and other files. \
\
Microsoft have provided manual steps [here ](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive?view=windows-11)for reference however, I have produced a nice script. Once the script is complete we will have access to both Windows UEFI 2011 CA signed and Windows UEFI 2023 CA signed files or Pre and Post Remediation scenarios.

{% code overflow="wrap" lineNumbers="true" fullWidth="true" %}

```powershell
#Update these to suit your environment
$MountDir = "C:\WinPE_x64_MountDir"
#remove-item $WinPE_x64WorkSpace -Force

#Default ADK Paths
$ADKPath = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit"
$ADKPathPE = "$ADKPath\Windows Preinstallation Environment"


if (Test-Path -Path $ADKPathPE){
    Write-Host "Found ADK PE: $ADKPathPE" -ForegroundColor Green
    $ADKImage = Get-WindowsImage -ImagePath "$ADKPathPE\amd64\en-us\winpe.wim" -Index 1
}
else {
    Write-Host "Did not detect ADK in path $ADKPathPE"
    throw
}

if (!(test-path -path "$MountDir")){New-Item -Path $MountDir -ItemType Directory | Out-Null}


#Mount WinPE Image To create Windows UEFI 2023 CA signed Windows PE boot media
#https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-create-usb-bootable-drive?view=windows-11
Write-Host "Mounting winpe.wim from $ADKPathPE" -ForegroundColor Green
Mount-WindowsImage -Path $MountDir -ImagePath "$ADKPathPE\amd64\en-us\winpe.wim" -Index 1 | out-null

Copy-Item "$MountDir\Windows\Boot\EFI_EX\bootmgr_EX.efi" "$ADKPathPE\amd64\Media\bootmgr.efi" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\EFI_EX\bootmgfw_EX.efi" "$ADKPathPE\amd64\Media\EFI\Boot\bootx64.efi" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\chs_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\chs_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\cht_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\cht_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\jpn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\jpn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\kor_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\kor_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\malgun_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\malgun_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\malgunn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\malgunn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\meiryo_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\meiryo_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\meiryon_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\meiryon_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msjh_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msjh_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msjhn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msjhn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msyh_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msyh_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\msyhn_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\msyhn_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\segmono_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\segmono_boot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\segoe_slboot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\segoe_slboot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\segoen_slboot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\segoen_slboot.ttf" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\Fonts_EX\wgl4_boot_EX.ttf" "$ADKPathPE\amd64\Media\EFI\Microsoft\Boot\Fonts\wgl4_boot.ttf" -Force -Verbose

#To create Windows UEFI 2011 CA signed Windows PE boot media
#While we have the WinPE.wim mounted Ive extracted the Windows UEFI 2011 CA signed files to easily use in future. 
Copy-Item "$MountDir\Windows\Boot\EFI\bootmgr.efi" "$ADKPathPE\amd64\Media\bootmgr.efi.2011" -Force -Verbose
Copy-Item "$MountDir\Windows\Boot\EFI\bootmgfw.efi" "$ADKPathPE\amd64\Media\EFI\Boot\bootx64.efi.2011" -Force -Verbose


Dismount-WindowsImage -Path $MountDir -save
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.syswow64.co.uk/syswow64/blog/cve-2023-24932/part-1-bootx64.efi-windows-uefi-2023-ca-signed.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
