Cold Reboot Attacks on Disk Encryption 398
jcrouthamel writes "Contrary to popular assumption, DRAMs used in most modern computers retain their contents for seconds to minutes after power is lost, even at operating temperatures and even if removed from a motherboard. Although DRAMs become less reliable when they are not refreshed, they are not immediately erased, and their contents persist sufficiently for malicious (or forensic) acquisition of usable full-system memory images. We show that this phenomenon limits the ability of an operating system to protect cryptographic key material from an attacker with physical access. We use cold reboots to mount attacks on popular disk encryption systems — BitLocker, FileVault, dm-crypt, and TrueCrypt — using no special devices or materials. We experimentally characterize the extent and predictability of memory remanence and report that remanence times can be increased dramatically with simple techniques. We offer new algorithms for finding cryptographic keys in memory images and for correcting errors caused by bit decay. Though we discuss several strategies for partially mitigating these risks, we know of no simple remedy that would eliminate them."
Re:Fascinating... (Score:5, Informative)
Re:only useful if you start off unencrypted (Score:2, Informative)
Re:Physical Access (Score:5, Informative)
Re:Physical Access (Score:5, Informative)
Except, apparently, it didn't. With the new scenario, the thief takes the cover off the machine and then pulls the battery. They then cool the RAM chips and dump the contents. They can then scan through the dump looking for the decryption key. Once they've found it, they mount the encrypted volume from another OS and get at all of your confidential data.
Re:Secure DRAM (Score:5, Informative)
Re:Fascinating... (Score:5, Informative)
I ran those tests because we were using a large chunk of SDRAM (16MB) as a RAM disk to capture log data on an embedded platform. On system failures we had the logs that led to the failure plus a small crash dump to support debugging. The hardware restart cycle was always fast enough to preserve the RAM disk image. I became curious as to how close we were to the edge, so tried a series of experiments, including extracting the blade from the chassis, watching the sweep hand on my watch, and reinserting the blade to let it boot. Even in a temperature chamber (60C is really warm...) the RAM FS was sane after a four second pack pull, allowing about two seconds for the power management to reboot the pack, that gave a six second power off window.
On reboot, the boot monitor checked the reserved area by clearing the ECC status bits, then reading the entire reserved block, which would trigger ECC counters in the memory controller if there were flipped bits. If there were any (even one) ECC counts, it zeroed the block, triggering the kernel to rebuild an empty file system.
So there is my experience on DRAM data retention in power off situations. YMMV.
If someone would like to try this with DDR2 or DDR3 with ECC, it would be interesting to see your results. I have DDR2/ECC blades coming on line now, if I get ahead of my work, I may recreate this test and post back the results. Given my current calendar, it will be a while (months).
PS: Under normal room temp, ~20C, it was very reliable at 16 seconds, and I saw a couple of tests that passed twenty.
Re:Clear the DRAM? (Score:5, Informative)
Re:Fascinating... (Score:5, Informative)
At any rate, even with low temperatures, with such delays I'd never count on being able to get 100% of the contents successfully.
Re:Clear the DRAM? (Score:3, Informative)
Re:Clear the DRAM? (Score:3, Informative)
The only way I see it to be sure, DRAM upon losing power uses on-board capacitor to erase its own contents, the feature built into the RAM die. Even BIOS is not sufficient if you just pull the plug and move the RAM to a different PC.
Re:Hardly the problem (Score:3, Informative)
As someone pointed out to me a few days ago: Firewire (usually?) has DMA access, so it would be possible to interface the laptop via firewire and do a full memory dump. Then go to work on that to get the key. - requires physical access to the powered laptop of course. Of course, if you have no firewire devices you could have a script do a 'shutdown -H now' on detection of a firewire device.
Re:Very real concern (Score:5, Informative)
Re:You can probably read the memory via Cardbus! (Score:5, Informative)
Re:Clear the DRAM? (Score:5, Informative)
As long as we can keep the key hidden, the encryption will protect our data.
Re:Use capacitors (Score:3, Informative)
I do not thin' it means what you thin' it means. (Score:5, Informative)
I think the word you're looking for is "tenet [merriam-webster.com]".
Re:Another attack loop-AES thought about ! (Score:3, Informative)
Re:Clear the DRAM? (Score:3, Informative)
Re:Clear the DRAM? (Score:5, Informative)
And while your program may indeed wipe the drive after 10 incorrect guesses, there's one very significant weakness to that proposition: the program must be -running- in order to do so.
So, in this case, the method of attack would be as follows: find someone with a laptop full of information who has it activated in an accessible location. Grab said laptop and remove it to a location where the RAM can be accessed per this hack. Then, after grabbing the key, remove the hard drive, hook it to a system you have control over, and either use the key to open the drive or, if the key is corrupted or incomplete, use the key as input to crack the drive conventionally--bearing in mind that if it is mounted in such a way that your fancy program does not activate, the program cannot erase the drive.
Re:Fascinating... (Score:2, Informative)
> encryption passphrase, wouldn't they still need the keyfile to mount the partition? And how would
> they know the location of a hidden partition?
Truecrypt's keyfile is only a precursor to the actual decryption key. It is not accessed after the drive is mounted. Once the drive is mounted, everything that is needed to read the disk is in memory. (namely, the decryption key).
So, whatever drive or partition you have mounted (whether hidden or otherwise) is accessible to anyone who can read your computer's memory.
Re:Use capacitors (Score:3, Informative)
Re:Use capacitors (Score:4, Informative)
Usually what I find is a rare-earth magnet at one end of the voice coil's travel that locks the read heads away from the platter in the absence of voltage in the coil; this is aided as well by the torque exerted on the armature by the trace ribbons that feed voltage to the coil and read heads. Note that this magnet is separate and distinct from the two that control the lateral motion of the read/write armature.
The 'clink' that you hear is the armature knocking up against the magnet. If you take the cover off, you can recreate the sound yourself, even without power.
protip: HDD voice coils make great crude galvanometers.
-b
Re:Another attack loop-AES thought about ! (Score:3, Informative)
I'm afraid it doesn't. Here is the code from Gutmann's paper:
Flipping:
Using:
The code above protects against detectable 'wear' that occurs if RAM holds the same value for a long time. With inversion, the RAM holds normal and inverted values for equal time, and therefore doesn't wear in one direction or the other.
The attack described in the article relies on removing the RAM from a targeted machine (or rebooting the target machine) and capturing the contents of RAM before it has a chance to clear (which takes a few minutes, they report). In the example of the code above, they would capture both 'key' and 'keyState' and would therefore know the key, and if the key was inverted or not (of course, even if they did not know whether the key was inverted, it would be trivial to try it both inverted and uninverted).
I suppose in a system with a write-back cache, it might be possible to keep the key permanently in the CPU's cache, where this attack would be substantially less practical. However, caches are not supposed to be used like that, so it may be difficult to implement.