Skip to content
RCE Write-up Advanced

Exploiting AMI Aptio Firmware on Example of Intel NUC

The Intel NUC firmware, based on AMI Aptio, lacks SPI Protected Ranges and Intel BootGuard, so any arbitrary SMM code execution vulnerability can be used to overwrite the entire platform firmware with a persistent rootkit. The author found four such vulnerabilities and demonstrated a backdoor infection.

blog.cr4.sh

Published on blog.cr4.sh

Hi, everyone! This blog post is another usual article about firmware security of x86 compatible machines.

The author, on blog.cr4.sh

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the AMI Aptio firmware base did not enable SPI Protected Ranges or Intel BootGuard, leaving firmware write protection dependent solely on SMM code, which any SMM vulnerability can subvert.

Impact

An attacker with an SMM code execution vulnerability could overwrite the entire platform firmware with a persistent rootkit that survives operating system reinstall, because the NUC lacks SPI Protected Ranges and BootGuard.

What the attacker needed

Physical access to flash chip; SPI flash programmer; SMM code execution vulnerability

How it was found

  1. Use CHIPSEC to check BIOS write protection and SPI Protected Ranges on the Intel NUC.
  2. Connect an FT2232H programmer to the SPI flash chip and read the firmware image with flashrom.
  3. Extract an SMM driver (NvramSmi) from the firmware image using UEFITool.
  4. Infect the extracted driver with the UEFI SMM backdoor using SmmBackdoor.py.
  5. Integrate the infected driver back into the flash image with UEFITool and write it to the flash chip using flashrom.
  6. Boot the modified firmware and use SmmBackdoor.py to dump SMRAM for analysis.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

System Management Mode (SMM) is a special high-privilege mode in Intel processors that runs firmware code invisible to the operating system. If an attacker can run their own code in SMM, they can bypass protections that normally stop software from modifying the computer's firmware chip. This report shows that on the Intel NUC, missing hardware protections meant such an SMM bug could let an attacker permanently infect the firmware.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.