Difficulty: Advanced
What is a cold boot attack, why is it possible, and how do you defend against it?
A cold boot attack is a physical attack that recovers sensitive data, especially encryption keys, from a computer's RAM shortly after it is powered off or reset. It exploits a property of DRAM called data remanence: memory contents do not vanish instantly when power is cut, so an attacker with physical access can read what was there moments ago.
DRAM stores each bit as a charge in a tiny capacitor that must be refreshed constantly. When power is removed, the charge fades gradually rather than disappearing, so bits survive for seconds at room temperature and much longer when chilled. Attackers spray the chips with compressed-air coolant or liquid nitrogen to slow the decay to minutes, then either reboot into a tiny program that dumps RAM, or physically move the chips to another machine and read them. Because full-disk-encryption keys must sit in RAM while the disk is mounted, those keys are the prime target.
The realistic threat scenario is a lost or stolen laptop that was suspended rather than fully shut down, or a seized device. It needs physical access, so it is not a remote threat, but it defeats disk encryption that people assume protects them.
| Defence | How it helps |
|---|---|
| Full shutdown, not sleep | Powering off clears keys from RAM; suspend-to-RAM keeps them live |
| Memory encryption | Modern CPUs encrypt DRAM contents (AMD SME, Intel TME), so a dump is ciphertext |
| TPM with PIN / pre-boot auth | Requires a secret before the key is ever placed in RAM |
| Keys in CPU registers / cache | Approaches like TRESOR keep the key off DRAM entirely |
| Memory scrubbing on boot/shutdown | Firmware overwrites RAM so remnants are wiped |
| Secure Boot and locked firmware | Stops booting an attacker's RAM-dumping image |
| Disable DMA ports (Thunderbolt) | Blocks a related class of direct-memory-access attacks |
The single most practical user-level mitigation is to shut the machine down fully rather than leave it suspended, because a powered-off machine has no live keys to steal. Hardware memory encryption, now common on server and modern client CPUs, makes the attack far less useful even if remanence persists.
Physical Security, DRAM Remanence, Full Disk Encryption, Key Management, TPM