Back

Leo Smith's Secure Boot research shows shim borrowing and MOK enrollment
SiTech AI Team2 min read

Leo Smith's Secure Boot research shows shim borrowing and MOK enrollment

Leo Smith's blog post explains how Secure Boot's Microsoft third-party keys, shim, and MOK enrollment can be used to boot an enrolled-key operating system, with p3ng0s V2 support planned.

Leo Smith published a blog post about Secure Boot research and a teaser for p3ng0s V2. The post describes how Microsoft third-party keys, a shim, and MOK enrollment can be used to boot an operating system whose key is enrolled by the user.

Misconceptions about Secure Boot

Smith says his earlier view was that Secure Boot locked down which operating system could run. He states the actual purpose is ensuring the integrity of the booting OS, not targeting consumers or physical access, and that it was meant to stop EFI malware. Microsoft Corporation UEFI CA 2011 signs third-party operating systems, and users who can access BIOS settings can enroll their own keys.

Shim and MOK enrollment

The post explains that Microsoft-signed shims handle changing boot software while keys remain stable. If a GRUB image is signed with an unrecognized key, the shim fails and boots into MOK software, where a matching key can be chosen. Smith notes this creates a path to boot an OS on hardware with Secure Boot enabled.

Borrowing and installing shims

Smith describes finding shim-signed packages on pkgs.org and borrowing a Microsoft-signed shim. The installation steps include generating MOK keys, signing the kernel and GRUB, renaming EFI files, placing the shim as BOOTx64.EFI, adding mmx64.efi, and converting a certificate to DER format.

Abusing Secure Boot and p3ng0s

With the prepared drive, a user can select it from a boot device menu, fail GRUB signing, enroll the key through MOK software, then continue booting. Smith also says p3ng0s users can use the V2 branch by placing shim and MOK manager files in overlay/airootfs/etc/p3ng0s/shim.

Sources: leosmith.wtf

SiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.