Git Product home page Git Product logo

super-uefiinsecureboot-disk's Introduction

Super UEFIinSecureBoot Disk

Super UEFIinSecureBoot Disk is a proof-of-concept (not actively maintained or enhanced) bootable image with GRUB2 bootloader designed to be used as a base for recovery USB flash drives.

Key feature: disk is fully functional with UEFI Secure Boot mode activated. It can launch any operating system or .efi file, even with untrusted, invalid or missing signature.

Features:

  • GRUB2 Bootloader
  • 32-bit (ia32) / 64-bit (x86_64) UEFI (+ Secure Boot) support
  • BIOS / UEFI CSM support
  • Launch any operating system
  • Launch any .efi executable from GRUB2
  • Launch any .efi executable from another .efi application
  • Load any UEFI drivers

Based on:

Description

Secure Boot is a feature of UEFI firmware which is designed to secure the boot process by preventing the loading of drivers or OS loaders that are not signed with an acceptable digital signature.

Most of modern computers come with Secure Boot enabled by default, which is a requirement for Windows 10 certification process. Although it could be disabled on all typical motherboards in UEFI setup menu, sometimes it's not easily possible e.g. due to UEFI setup password in a corporate laptop which the user don't know.

This disk, after being installed on a USB flash drive and booted from, effectively disables Secure Boot protection features and temporary allows to perform almost all actions with the PC as if Secure Boot is disabled. This could be useful for data recovery, OS re-installation, or just for booting from USB without thinking about additional steps.

Installation

Download image file from releases page, write it to USB flash using one of the following programs:

WARNING: all your USB flash data will be deleted.

The image contains single FAT32 500MiB partition. Use gparted or similar tool to resize it to get full USB drive space.

Usage

First boot on a PC with Secure Boot will show Access Violation message box. Press OK and choose "Enroll cert from file" menu option. Select ENROLL_THIS_KEY_IN_MOKMANAGER.cer and confirm certificate enrolling.

Computers without Secure Boot will boot to GRUB without manual intervention.

FAQ

  • Does this disk work in Secure Boot?
    Yes, it does. It loads any unsigned or untrusted Linux kernel or .efi file or driver, after first-boot manual key enrolling using MokManager software. You don't need to disable Secure Boot to perform fist-boot key enrolling.

  • Does this disk work on UEFI-based computers without Secure Boot, or with Secure Boot disabled?
    Yes, it would work like a stock GRUB2.

  • Does this disk work on older computers with BIOS?
    Yes, it works just as any other GRUB2 bootloader.

  • Can this disk be used to bypass Secure Boot in UEFI bootkit/virus?
    No, not really. This disk requires manual intervention of a physical user on first boot, which eliminates bootkit purpose to be stealth.

  • Can I replace GRUB with another EFI bootloader (rEFInd, syslinux, systemd-boot)?
    Yes, replace grubx64_real.efi/grubia32_real.efi with your files. The bootloader does not require to be signed and should also start any .efi files thanks for Security Policy installed by grubx64.efi/grubia32.efi (PreLoader), just as GRUB2 included in disk.

Technical information

UEFI boot process of this disk is performed in 3 stages.

bootx64.efi (shim) → grubx64.efi (preloader) → grubx64_real.efi (grub2) → EFI file/OS

Stage 1: motherboard loads shim. Shim is a special loader which just loads next executable, grubx64.efi (preloader) in our case. Shim is signed with Microsoft key, which allows it to be launched in Secure Boot mode on all stock PC motherboards.
Shim contains embedded Fedora certificate (because it's extracted from Fedora repository). If Secure Boot is enabled, since grubx64.efi is not signed with embedded Fedora certificate, shim boots another executable, MokManager.efi, which is a special shim key management software. MokManager asks user to proceed with key or hash enrolling process.
Newer versions of shim install hooks for UEFI LoadImage, StartImage, ExitBootServices and Exit functions to "Harden against non-participating bootloaders", which should be bypassed for this disk use-case. Fedora's shim does not install custom UEFI security policies, that's why it's not possible to load self-signed efi files from second stage bootloader, even if you add their hashes or certificates using MokManager.

Stage 2: preloader is a software similar to shim. It also performs executable validation and loads next efi file. Preloader included in this disk is a stripped down version which performs only one function: install allow-all UEFI security policy. This permits loading of arbitrary efi executables with LoadImage/StartImage UEFI functions even outside GRUB (for example, in UEFI Shell), and bypasses shim hardening.

Stage 3: GRUB2 is a well-known universal bootloader. It has been patched to load Linux kernel without additional vertification (linux/linuxefi commands), load .efi binaries into memory and jump into its entry point (chainloader command), and to mimic "participating bootloader" for shim.

Additional information

Read my article on this topic: Exploiting signed bootloaders to circumvent UEFI Secure Boot (also available in Russian)

Notes

Super UEFIinSecureBoot Disk GRUB2 sets suisbd=1 variable. It could be used to detect disk's patched GRUB2 in a grub.conf shared between multiple bootloaders.

Since version 3, GRUB uses stock UEFI .efi file loader, as there are some problems with internal loader implementation. To use internal loader, add set efi_internal_loader=1 into GRUB configuration file. Both methods can load untrusted .efi files.

super-uefiinsecureboot-disk's People

Contributors

valdikss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

super-uefiinsecureboot-disk's Issues

Is it possible to install this image on windows 10-11?

ENG: Is it possible to install this image on Windows 10-11 as a rEFInd in a hidden partition and NOT on a flash drive?
If so, how different is the installation?

RU: Можно ли установить этот образ на Windows 10-11 как rEFInd в скрытый раздел, а НЕ на флешку?
Если да, то насколько отличается установка?

Quick Question about installing

Hello, i have been looking a solution to install linux by bypassing secure boot. Can you tell me how to use this exactly? because i thought it requires to put an .iso in /iso/ folder i.e kali, I'm currently using this with ventoy or should i need to copy files from ./Boot folder into another /Boot folder (in Parrot Os's .iso) and paste them to bypass signature error ? Because i enrolled the certificate via efi and nothing changed at all. I mean, i don't probably know how to use and i really wanted to. Best regards

Ошибка `failed to start grubx64_real.efi: (14) Not Found` при попытке запуска через pxe.

Перенёс файловую структуру в корень tftp-сервера, дополнительно скопировав все файлы из EFI/BOOT и каталог EFI/grub в корень. DHCP-сервер настроен так:

} elsif substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
                next-server 10.10.10.10;
                option option-66 "10.10.10.10";
        if option arch = 00:06 {
                filename "bootia32.efi";
        } elsif option arch = 00:07 {
                filename "bootx64.efi";
        } else {
                filename "pxelinux.0";
        }

После добавления ключей через MOK (аддон через ZeroNet скачал, но пока не добавлял) происходит загрузка, но пишет ошибку failed to start grubx64_real.efi: (14) Not Found

Кусок syslog:

in.tftpd[16105]: remap: input: bootx64.efi
in.tftpd[16105]: remap: done
in.tftpd[16105]: RRQ from 10.10.10.112 filename bootx64.efi
in.tftpd[16105]: tftp: client does not accept options
in.tftpd[16106]: remap: input: bootx64.efi
in.tftpd[16106]: remap: done
in.tftpd[16106]: RRQ from 10.10.10.112 filename bootx64.efi
in.tftpd[16108]: remap: input: grubx64.efi

Если делать как написано тут - меню grub появляется, ubuntu начинает ставиться и в syslog гораздо больше информации о запрошенных файлах.

Boot from another ext4 partition

Hi. I'm trying to boot a customized distro that I made without luck.
I put your image in a usb drive via dd and then added a new partition with gparted.
I then changed the grub.cfg file in order to search the root filesystem by label to complete boot.

When I start the pc some screen flashes occurs and the a message says that /vmlinux was not found.
pressing a key appears a message that says that both default and fallback entries failed.
Then my grub menu is shown but if I try to go ahead a new /vmlinux was not found message is printed.

Can you help me?
Thanks in advance

A

O

Black screen on 3840x1600 wide screen display

I have a Dell AW3821DW 3840x1600 wide-screen gaming monitor connected to a Nvidia RTX 3080 GPU over a DisplayPort connection.

When initially booting into Ventoy with Secure Boot enabled in BIOS, I expected the UEFIinSecureBoot to indicate a boot security failure and bring up the screens for the initial MOK registration.

However, I only see a black screen, without a cursor.

When I disconnected the 3840x1600 wide screen and connected an old 1024x1280 screen to my GPU over an HDMI connection, I do see the expected UEFIinSecureBoot boot security failure displays when I rebooted Ventoy.

Something is preventing the UEFIinSecureBoot from displaying properly on my 3840x1600 display.

Screen Freezes on "Perform MOK management" screen

I have an MSI X570 ACE motherboard with a 5950X processor and the latest MSI BIOS firmware loaded.

I am attempting to register the ENROLL_THIS_KEY_IN_MOKMANAGER.cer keys in MOK Manager.

With SECURE BOOT=STANDARD (Enabled) in the UEFI BIOS, I booted from a USB drive loaded with the Super-UEFIinSecureBoot-Disk_v3 image.

When my system boots up, I see the expected Access Denied error message. But when I get to the Perform MOK management screen and select Enroll key from disk, the screen freezes and I have to power down the PC to reboot. I can't get to the screen that shows the ENROLL_THIS_KEY_IN_MOKMANAGER.cer file selection to register the keys.

boot windows BIOS

Hello.
First of all, thanks for creating this rep it's really helpful.

i want to asking about is there anyway to chainload a windows booted by BIOS in (if [ "${grub_platform}" == "efi" ])?

when i use ntldr /bootmgr,i get error :can't find command 'ntldr'

wimboot support ?

sorry if i asking in wrong place.. it's possible to boot winpe using grub2 in uefi with wimboot ?? if so how ?

Super UEFIinSecureBoot Disk вопрос использования

Распотрошил Super UEFIinSecureBoot Disk, скопировал на ssd, прописал через mokmanager сертификат.

Грузится до grubx64_real.efi, дальше ядро не грузит.

Если grubx64_real.efi из Super UEFIinSecureBoot Disk, то ядро не грузит (ошибку забыл но не shim_lock). Может надо через chainloader дальше грузить мой grub2 а потом уже ядро?

Если grubx64_real.efi подменяю своим (неподписанным), то grub и меню нормально запускаются, но ошибка shim_lock protocol not found при загрузке ядра.

Warning: Fedora's current UEFI Shim fails on some motherboards

Since this project is using Fedora's shim, beware that the shim that shipped with Fedora 37 and 38 doesn't work on some motherboards. Fedora 36 was the last working shim. They're working on Microsoft certification of the fixed shim. So be sure that this project doesn't use any of the broken shims. :)

Here's the upstream info:

A problem was identified and fixed in Fedora's "shim" UEFI bootloader. Unfortunately, due to a difficult certification process for this component, the fix isn’t present on Fedora 37 nor Fedora 38 install media.

https://discussion.fedoraproject.org/t/install-media-dont-boot-in-uefi-mode-on-certain-motherboards/71376

https://bugzilla.redhat.com/show_bug.cgi?id=2113005

Obsolete link and package name

Hello. At that platform page, link "from Fedora" is obsolete. that is the valid link for Packages section. As noticeable, a search against the package named shim-signed won't return match, therefore that package name too is obsolete.

linux16 missing

grub command linux16 is missing

not a big deal, just copy it from other sources, but it would be better to include it

Kali linux Secure boot

Hi, i have a laptop Aorus 17G XC and its my fifth day of trying to boot a live version of kali linux. I have tried every possible tutorial and and i cannot get trough. Right now im stuck at error: prohibited by secure boot policy in grub and have no idea what to do next. Ive read somewhere that you can help directly with the issue so ive decided to write here. I tried many manual fixes but lastly i tried ventoy with secure boot support enabled. It launches nicely and then when the grub shows up with the menu to start live or smth like that it just shows this "error: prohibited by secure boot policy". Have you got any clue what am i doing wrong?

Silent-UEFIinSecureBoot-Disk

git clone /home/smopro/ZeroBundle/ZeroNet/data/1KVD7PxZVke1iq4DKb4LNwuiHS4UzEAdAv/silent-uefiinsecureboot-disk.git 
fatal: репозиторий «/home/smopro/ZeroBundle/ZeroNet/data/1KVD7PxZVke1iq4DKb4LNwuiHS4UzEAdAv/silent-uefiinsecureboot-disk.git» не существует

Арч линукс, зеро нет Version: 0.6.5 r3862, Python 2.7.11

shim needs to be updated because the Fedora v13 shim is signed with Microsoft UEFI CA 2011 certificate which was revoked by Microsoft and put in the revocation list of new motherboards

Hello,
On new motherboards such as Gigabyte B550 Vision D-P, the UEFI comes out of the box with Microsoft UEFI CA issued in 2011 in the revoked keys list, so all such motherboards will refuse to boot the shim version used in this project.

It is recommended to use the shim version of a recent linux distribution such as ubuntu or opensuse.

Details about the revocation:
https://support.microsoft.com/en-us/topic/microsoft-guidance-for-applying-secure-boot-dbx-update-kb4575994-e3b9e4cb-a330-b3ba-a602-15083965d9ca

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.