Skip to content

Getting past Secure Boot

LogoFAIL: Firmware Image Parser Exploits, Traces and Checks

LogoFAIL flaws in UEFI boot logo parsers let a crafted image run code during boot, past Secure Boot; Bootkitty used one to enroll its key. Exposure and fixes.

Goal
Getting past Secure Boot
Layer
Firmware
Where it acts
UEFI variablesEFI system partitionOn the boot chain map
Platforms
Firmware
Also known as
LogoFAIL
Used by
Bootkitty
Checked by
None: no module reads its traces

Overview

Most PCs show the manufacturer's logo while the firmware starts. Drawing it means decoding an image file (BMP, PNG, JPEG, GIF and others) with a parser that runs inside the firmware during the DXE phase, with full control of the machine, before any boot loader and before Secure Boot has checked anything. In December 2023 Binarly presented LogoFAIL at Black Hat Europe: a set of flaws in those parsers, in firmware from the three main independent BIOS vendors, AMI, Insyde and Phoenix. A crafted image can make the parser write attacker data where it should not, and run attacker code during the DXE phase.

This page covers the technique of using such a flaw: plant a malformed logo where the firmware will read it, and let the firmware run the attacker's code at the next boot. It works at the firmware layer without changing the firmware's code. The image is data, not a signed executable, so neither Secure Boot nor a hardware root of trust checks it. Binarly states that the flaws make "below-the-OS" defences such as Secure Boot, including Intel Boot Guard, ineffective.

The only known use by a catalogue family is Bootkitty, a proof of concept from 2024. CERT/CC lists firmware from AMI, Insyde, Phoenix, Intel and Fujitsu as affected for at least one of the CVEs, and many other manufacturers as unknown; the fix is the device manufacturer's firmware update.

How it works

Where a logo comes from decides who can plant one. From Binarly's research:

Logo sourceWho can change itCovered by Boot Guard?
A firmware volume in the SPI flash (the default)Only someone who can write the flash and pass its verificationOften, when the volume is in the verified range
A fixed path on the EFI system partition (ESP), for example \EFI\OEM\Logo.jpgAnyone with administrator or root rightsNo: it is a file on the disk
An NVRAM variable holding an ESP path, or the image itselfCode that can set that variable, from the OS where the vendor allows itNo
A logo in a firmware capsule, installed with vendor tools from the OSAnyone who can run those toolsDepends on the capsule's checks

Binarly found these customisation paths in firmware from several manufacturers; CERT/CC describes the ESP as the place the boot logo is read from and notes that it is protected from unprivileged access. An attacker therefore needs privileged access to the running system, or physical access, but no firmware write.

The CVEs, at summary level:

CVEVendor and componentSummary
CVE-2023-40238Insyde InsydeH2O, BmpDecoderDxeCrafted BMP logos can copy data to a specific address during DXE, through an integer signedness error in RLE4/RLE8 decoding; fixed in kernel 5.2 to 5.6 builds listed in Insyde's advisory
CVE-2023-39538, CVE-2023-39539AMI Aptio VA user with local access can supply a malicious BMP or PNG logo
CVE-2023-5058Phoenix SecureCore Technology 4Improper input validation of a user-supplied splash screen; denial of service or code execution

What happens after the code runs depends on the attacker. Code in DXE can change UEFI variables, add a key, or load anything else, before Secure Boot checks the boot loader. The firmware code in the flash does not change. Binarly notes that a bootkit can persist through the modified logo on the ESP or in a firmware capsule; in Bootkitty's case, the lasting effect was the key the exploit wrote to MokList.

How families use it

FamilyUseSource
BootkittyA file named logofail.bmp (16 MB) was found with the Bootkitty samples. Binarly showed that it exploits CVE-2023-40238 in Insyde's BMP decoder, and that its shellcode writes the bootkit's certificate into shim's MokList, so shim trusts the self-signed bootkit with Secure Boot on (enrolling an attacker key in shim's MOK list). The shellcode restores the decoder's original code afterwards. Binarly names affected models from Acer, HP, Fujitsu and Lenovo, and notes that the exploit seems tailored to particular hardwareBinarly

ESET's own Bootkitty report does not mention LogoFAIL; the link comes from Binarly's analysis of the file. Neither report says where the image would sit on a target machine. ESET and Binarly later reported that Bootkitty was written as a project in Korea's Best of the Best training programme; the reports cited here describe no use of LogoFAIL in a real attack.

Traces it leaves

WhereWhatSource
ESPA logo image in an OEM logo path, unusually large or malformed (Bootkitty's was 16 MB, with abnormal dimensions in its header)Binarly
NVRAMA vendor logo variable holding an image or a path; and whatever the shellcode wrote (for Bootkitty, an extra certificate in MokList)Binarly
Firmware capsuleA logo inside a capsule flashed from the OSBinarly
SPI flashNothing, in the Bootkitty case: the vulnerable decoder is the vendor's, unchangedBinarly
MemoryNothing durable: Bootkitty's shellcode restored the patched decoder codeBinarly
What followsThe bootkit or implant the exploit enabled, on the ESP or in the OSESET

How to check a host

Exposure. This is the main check. Note the board or model and the BIOS version (Get-CimInstance Win32_BIOS on Windows, sudo dmidecode -t bios on Linux), then read the manufacturer's LogoFAIL advisory for that model: Insyde's SA-2023053, AMI's AMI-SA-2023009, Phoenix's CVE-2023-5058 notice, and the OEM advisories they lead to. CERT/CC's VU#811862 lists vendor status. If the installed version predates the fix, the device is exposed.

Compromise. Look for what the exploit needs and what it leaves:

  • on the ESP, image files under OEM folders, and their size and time compared with what the manufacturer installs;
  • the logo customisation setting or variables the manufacturer documents;
  • what the exploit enabled: mokutil --list-enrolled for an unknown MOK certificate, the ESP for a self-signed loader, the boot files for the bootkit.

What these cannot prove: a firmware version later than the fix shows exposure was closed, not that it was never used before. An image file on the ESP is not malicious by itself, and the reports give no general signature for a malicious logo. The exploit runs and cleans up during boot, so a live system shows only its results.

What the checker looks for

None of the checker's modules can detect a LogoFAIL exploit, so checks is empty for this technique. The flaw is in firmware code, and the checker does not parse images or read NVRAM.

  • esp lists every file on the partition with its size, time and hash. An image under \EFI\ is listed without a finding; one outside the folders boot loaders use raises "An unexpected file on the EFI system partition", a low finding. Neither says anything about the image's contents.
  • What the exploit leads to can show up: for Bootkitty, esp raises "A self-signed signature on" \EFI\ubuntu\grubx64.efi when its certificate is itself self-signed, and measuredboot records the Secure Boot state and boot applications.
  • The checker cannot tell whether the firmware is vulnerable; that is the manufacturer's advisory and update.

Mitigation and recovery

Prevent:

  • install the manufacturer's firmware update that fixes the parser. Binarly confirmed that Insyde's patch stops the Bootkitty exploit, but also that LogoFAIL remained unpatched on hundreds of devices a year after disclosure: a fix reaches a machine only through its manufacturer's update;
  • set a firmware administrator password;
  • limit administrator and root rights, which writing to the ESP or to logo variables needs;
  • watch MOK lists and ESP contents for changes.

Recover:

  1. Preserve the ESP image, the logo files and variables, and the mokutil output.
  2. Update the firmware first, so the same image cannot run again.
  3. Remove the planted image and restore the manufacturer's logo settings.
  4. Undo what the exploit did: remove unknown MOK certificates (mokutil --delete or --reset, confirmed at the console), rebuild the ESP and reinstall the operating system.

Sources

Primary public reports, newest first.

  1. 2024-11-29LogoFAIL Exploited to Deploy Bootkitty, the first UEFI bootkit for LinuxBinarly
  2. 2024-11-27Bootkitty: Analyzing the first UEFI bootkit for LinuxESET
  3. 2023-12-07CVE-2023-40238 (LogoFAIL in Insyde BmpDecoderDxe)NVD
  4. 2023-12-06LogoFAIL: Image files in UEFI can be abused to modify boot behavior (VU#811862)CERT/CC
  5. 2023-12-06Finding LogoFAIL: The Dangers of Image Parsing During System BootBinarly

See also

Related techniques

Families that use it