Nistar36 - Silent & Secure

A computer designed especially for you.

23 October 2026 · 10 min read

An old MacBook, a firmware password and LUKS: how much do they really protect

A firmware password and full-disk encryption protect an old MacBook against theft, but not against someone who deliberately and quietly gets their hands on the hardware. Below we look at exactly where that line runs.

The starting point

Many people have an Intel MacBook from a decade ago sitting in a drawer. With a new battery and Debian installed with LUKS encryption, such a computer still works well for email, web browsing and even as a light server.

Our example is an 11" MacBook Air from 2014 (model A1465), without the T2 chip, running Debian on an encrypted NVMe drive. The conclusions apply to most Intel Macs from before 2018, because those do not have the T2 chip.

The question is: what happens when someone gains physical access to such a computer? We look at what a firmware password gives you, what LUKS protects against and where the limits of this hardware lie.

Firmware password: the equivalent of a BIOS password

On Intel Macs without the T2 chip, a firmware password blocks booting from any device other than the selected startup disk, as well as access to macOS Recovery. Without the password you also cannot start single-user mode or Target Disk Mode, and the NVRAM reset shortcut stops working.

The password has two modes:

- command (the default): the password is required only when someone tries to change how the computer starts; a normal start goes ahead without asking. This is the equivalent of a BIOS setup password on PCs.

- full: the password is required at every start. This is the equivalent of a power-on password.

An important difference in the Mac's favour: on many PCs the BIOS password can be cleared by removing the CMOS battery or moving a jumper. On Macs since 2011 the password is stored in the firmware flash memory (the SPI chip), so neither disconnecting the battery nor resetting NVRAM removes it.

Officially, a forgotten password can only be removed by Apple or an authorised service provider. With a computer a decade old this may be difficult, and the only alternative is reprogramming the SPI chip at an electronics repair shop. So you need to be absolutely sure you remember the password.

How to set a firmware password

The password is set from macOS Recovery. If the drive holds only Linux, Recovery has to be downloaded from the internet, which writes nothing to the drive.

1. Shut down the computer. When turning it on, hold Cmd+Option+R until a spinning globe appears.

2. Connect to a network. Firmware from those years may not support WPA3, so Wi-Fi with WPA2 or a wired Thunderbolt-Ethernet adapter is most likely to work.

3. In the Recovery window, do not choose any of the four options. "Reinstall macOS" and "Disk Utility" can overwrite the Linux drive.

4. From the Utilities menu in the top bar, choose Startup Security Utility. That is its name in Big Sur Recovery; in older versions it is "Firmware Password Utility". On a Mac without T2 it contains the firmware password setting.

5. Turn the password on, enter it twice, close the utility and restart the computer from the Apple menu.

You can do the same in Terminal (Utilities menu):

firmwarepasswd -setpasswd

The full mode has one catch. Running firmwarepasswd -setmode full right after setting the password returns the error "Can't set a mode when firmware password is not set", because the new password only takes effect after a restart. So you need to start Recovery again (this time a padlock screen asking for the password will appear), open Terminal and only then enter:

firmwarepasswd -setmode full

firmwarepasswd -check

firmwarepasswd -mode

The correct result is "Password Enabled: Yes" and "Mode: full". After the next restart the computer asks for the password at every start and, once it is entered, boots Linux as before.

Two practical notes:

- Use only Latin letters and digits. The EFI password screen has limited support for keyboard layouts, so national characters and symbols may be entered differently than you expect.

- In full mode the computer will not start on its own after a power cut. If it works as a server that has to come back up unattended, switch back to command mode (firmwarepasswd -setmode command).

Cold boot and DMA: here the old MacBook does quite well

A cold boot attack consists of reading the contents of RAM before the data in it fades. In a running computer with LUKS, the memory holds the disk encryption key, so capturing it opens the whole drive.

The attack has two variants:

- Moving the modules. The attacker cools the memory chips, removes them and reads them in another machine. In the MacBook Air the memory is soldered to the motherboard, so this variant is ruled out.

- Restarting on the spot. The attacker quickly boots the same computer from their own device, which dumps the contents of RAM. This variant is blocked by the firmware password, because without it you cannot boot from someone else's USB stick.

Do not count on the DDR3 memory scrambling that Intel has used since Sandy Bridge processors. It mixes the data rather than encrypting it, and research from 2016 showed that it can be reversed.

The simplest protection is shutting the computer down instead of putting it to sleep. During sleep the LUKS key stays in memory, unless you install the cryptsetup-suspend package, which removes the key from RAM when the computer goes to sleep.

A separate threat is the Thunderbolt 2 port. A device connected to a running computer can read and write memory directly via DMA, without a restart. This vector is limited by the IOMMU: processors of this generation support VT-d, and all you need is to add the intel_iommu=on parameter to the kernel command line. You can check whether the IOMMU is working with dmesg | grep -i dmar.

Evil maid: here the firmware password does not help

An evil maid attack assumes that someone has access to the computer while the owner is away: in a hotel room, during a border check, when the equipment briefly disappears into a back room. Against this kind of attack the old MacBook is weaker than a modern PC, despite a firmware password that is hard to clear.

The simplest scenario bypasses the firmware password altogether:

1. The attacker unscrews the bottom cover and removes the NVMe drive.

2. In another computer, they replace the bootloader on the unencrypted EFI partition.

3. They put the drive back and screw the cover back on.

4. The owner starts the computer, enters the firmware password and then the LUKS password. However, they type it into the modified bootloader, which records it.

Booting without network access does not change this, because a classic evil maid attack assumes two visits. The captured password is stored locally, for example on the EFI partition or in NVRAM variables, and the attacker collects it during a second visit to the computer. A modified initramfs can also leave a backdoor in the decrypted system that will send data out once the computer is online.

Why this hardware cannot defend itself:

- No Secure Boot. The firmware of Macs without T2 does not check the bootloader's signature, so a replaced GRUB will start without any warning.

- No TPM. There is no measured boot, which means unlocking the drive cannot be tied to the state of the boot chain.

- No firmware updates. The last firmware fixes came with macOS Big Sur. Vulnerabilities discovered later, including those from the family of Thunderbolt attacks such as Thunderstrike, will remain open.

By comparison, a modern PC with Secure Boot using your own keys and a TPM 2.0 chip can make unlocking LUKS depend on an unchanged boot chain (for example with systemd-cryptenroll bound to PCR registers). Laptops with Heads firmware (coreboot) go further: at every start they verify the firmware and bootloader with a USB key before the user enters any password.

There is also a variant that no software protects against: a hardware implant, for example a keylogger fitted under the keyboard. The only things that help here are seals on the screws, for example glitter nail varnish whose pattern you photograph and compare, or simply never letting the hardware out of your sight.

Monitoring the EFI partition: value and limits

A popular answer to evil maid is a script that, after login, calculates checksums of the files on the EFI partition and compares them with a reference. If /boot is inside the encrypted partition, the EFI partition is the only unencrypted part of the boot process, so it is the right place to watch.

Such a script will detect a clumsy replacement. It has, however, one fundamental weakness: it runs in a system started by a potentially modified bootloader. At the moment the drive is decrypted, malicious code has full access to the root partition, so it can:

- after capturing the password, restore the original bootloader files, and then the checksums match

- change the script itself or the reference checksums stored in it

That is why Heads and TPM measure the boot chain before decryption, not after. On hardware without these mechanisms you can get close to that effect manually:

1. Keep the reference checksums outside the computer, on a device you carry with you.

2. After any suspicious situation (the computer was out of your sight), boot a trusted system from a USB stick, for example Tails, and check the EFI partition before you enter the LUKS password.

The check from the trusted system, with the partition mounted read-only:

mount -o ro /dev/nvme0n1p1 /mnt

cd /mnt && find . -type f -exec sha256sum {} + | sort -k2 > /tmp/now.txt

diff /media/reference.txt /tmp/now.txt

This is the only verification that a modified bootloader cannot fake, because at that moment it is not running at all. The reference is created with the same command right after every bootloader or kernel update.

A more radical solution is to move the bootloader and kernel to a USB stick you carry with you, so that only the encrypted partition remains on the drive. This, however, requires discipline at every system update.

Summary

For typical risks, that is theft or loss of the computer, a firmware password and LUKS are entirely sufficient. Against deliberate, covert physical access, this hardware has gaps that cannot be closed by configuration.

Theft or loss of the computer: the firmware password protects partly, LUKS protects. Shutting down instead of sleeping also helps.

Booting from an external device: both the firmware password and LUKS protect.

Cold boot by moving the memory: the firmware password does not apply, LUKS does not protect. The memory soldered to the board does.

Cold boot by restarting from a device: the firmware password protects, LUKS does not. cryptsetup-suspend helps.

DMA via Thunderbolt: neither the firmware password nor LUKS protects. The IOMMU (intel_iommu=on) helps.

Bootloader replacement (evil maid): neither the firmware password nor LUKS protects. Checking the EFI partition from a trusted system before decryption helps.

Hardware implant: neither the firmware password nor LUKS protects. Seals on the screws and control over the hardware help.

Being forced to give the password: neither the firmware password nor LUKS protects. A detached LUKS header (--header) helps.

Anyone working in an environment where physical access to their equipment is a real threat should consider different hardware: a laptop with Heads or a modern PC with Secure Boot using their own keys and a TPM. When travelling, the simplest solution remains Tails, started from a USB stick you carry with you, because then there is nothing on the computer that could be modified.

Sources

← All articles