Skip to content

February 28, 2008


Compromising Disk Encryption Through Cold-boot Key Recovery

Note: This is a 2008 post I managed to recover from my archive of

A team of researchers at Princeton University have devised a way to compromise disk encryption mechanisms, and even other disk image encryption mechanisms, by recovering latent data such as encryption keys, that remain in RAM after a computer has been rebooted/turned off. They’ve tested their attacks against encryption mechanisms such as Microsoft’s BitLocker, TrueCrypt, Linux’s dm-crypt and Apple’s FileVault.

This technique is ingeniously simple, and they’ve written a tool from which they can boot a computer, and do a memory-dump of the latent memory data, which they then run through another utility which searches the memory dump for encryption keys, which can then be used to decrypt the encrypted drive/images.

With regards to Mac OS X 10.4 and 10.5, the group discovered that the system stores multiple copies of users’ login passwords in active memory, making them vulnerable to such imaging attacks. Those passwords are often used to protect the keychain, which stores many of users’ other passwords, including the FileVault password, and potentially other encrypted disk images. This is potentially something Apple should address, and they don’t really want to be storing passwords and keys in memory, if they don’t have to. Keeping as little sensitive data in active memory as possible would greatly reduce the chances of it being compromised in imaging attacks such as these.

Check out their great video below, and read more about it after the jump!

This research was performed by J. Alex Halderman , Seth D. Schoen, Nadia Heninger, William Clarkson, William Paul, Joseph A. Calandrino, Ariel J. Feldman, Jacob Appelbaum, and Edward W. Felten. A combined team from Princeton, the Electronic Frontier Foundation (EFF), and Wind River Systems (specialists in decide software optimisation).

Although their paper focuses on recovering encryption keys, naturally this technique can be applied to any other sensitive information that may be stored in RAM at the time. They’ve also used data reconstructions algorithms to recover data that has already decayed from RAM. According to their paper, keys with 10% of bits decayed can be reconstructed to nearly any 128-bit AES key within a few seconds. On average, they found that memory was legible for up to 20 seconds on some hardware, but this number could extend into several minutes. By drastically reducing the temperature of the memory modules, they were able to reliably recover data up to 10 minutes after removing the RAM chip. Particularly interesting is their research with ECC memory, where they found that machines that support ECC memory tended to wipe RAM upon boot, which is done to avoid errors in the case of uninitialised reads of the memory. Unfortunately this is a characteristic of ECC-enabled machines, and not the memory modules themselves, meaning that ECC memory inserted into non-ECC hardware was still recoverable.

The software developed by the team, presumably with the particular help of Wind River Systems, allowed them to recover the memory dumps in several ways including: over a PXE network boot, which would send the data in UDP packets over the network; using a USB drive to run a small memory-dumping program; or using an EFI bootloader, such as those used on Intel Macs, which also allowed data transfer over netboot.

I highly recommend their paper, particularly the first and last thirds of it, as they are quite legibly written (the middle is mainly about recovering different encryption algorithm keys). It will be interesting to see what kind of innovation will come about in attempts to defend against such attacks. No doubt we will be seeing some papers on that subject soon.

2 Comments Post a comment
  1. Julian Yates
    Feb 12 2011

    Hi. I am pretty new to ‘whole disk encryption’ and in doing research I have found many people talking about this cold boot attacking. One of the first things I thought of to ‘help’ protect against hackers booting either USB/CDROM or PXE was to just turn off those options in the BIOS and then setup a BIOS password. While you could pop the case and reset the BIOS. It still takes time to pop the case, reset the BIOS, reconfigure the BIOS to allow you to boot from USB/CDROM and PXE. This method should be at least a minimal in helping to push the memory retention threshold.

  2. Feb 12 2011

    Hi Julian,

    Indeed you can disable these things in the BIOS, and lock the BIOS. You could even go to the length of physically disabling the USB ports or CDROM drive. Remember that instead of resetting the BIOS, however, an attacker can simply freeze the RAM, pop it out and put it into another laptop that contains pre-installed software to perform the memory extraction. In many cases this would be an extremely fast process, depending on how easy it is to remove RAM (screwdriver skillz?).

    But indeed you are right that any steps you can take to make it more difficult for an attacker gives you just that little bit of extra time to allow for memory decay.

Share your thoughts, post a comment.


Note: HTML is allowed. Your email address will never be published.

Subscribe to comments