How Cold Boot Attack Works?

An SDRAM DDR3 chip being cold booted for a cold boot attack.

© Geekswipe. All Rights Reserved.

A cold boot attack is quite an interesting method of data extraction where one exploits a basic vulnerability of the computer’s RAM to sniff out any useful temporary information (encryption keys) stored in it — after the power is turned off.

The vulnerability is the RAM retaining the memory stored in it for a brief amount of time right after the power is turned off. Cold boot attack simply extends this ‘brief time’ to minutes and hours by cooling the DRAM chip, so that the attacker can plug it into his device and dump all the data stored in it.

But RAM is a volatile memory — a memory that requires power to maintain the state of the stored information! So how it is possible to read what is stored in it without the power? Why does it still retain the memory for a brief time? Before addressing all these questions, let’s rewind a bit, explore the basics of RAM, and understand how it stores data on the fundamental level.

How RAM stores data?

Random Access Memory is where your computer stores temporary data for quick access. So to be able to do computations quickly, the data on RAM is written and re-written at intervals of only milliseconds through the multiplexer and demultiplexer circuits, unlike the other slower non-volatile memory devices. Such faster read and write rate is made possible by the use of latches or flip-flop circuits (SRAM), or capacitors (DRAM) to store information.

On a basic level, this ‘memory’ is nothing but layers of logic gates that are designed to store data in the form of 0 or 1 (a bit) without the need to retain a constant input. Any such logical circuit that is made up of a capacitor and a transistor to store a bit is known as a memory cell.

RAMs started with 125 bytes and has scaled to gigabytes of memory these days. But the fundamental principle is still the same. A RAM is made up of a billion of individual bits in its core that stores either 0 or 1 — useful data. From here on forth, we will be exploring Dynamic RAM exclusively, as it is what is used as the primary memory for computers and is targeted in the cold boot attacks.

Why attack a DRAM?

The main purpose of a DRAM is to provide the computer and its operating system a quick access to the data that is required for faster processing. So by design, almost all programs store temporary data on RAM. This is the same even for encryption software like BitLocker, or TrueCrypt, which stores their keys on RAM for temporary use.

The problem with RAM, or Dynamic RAM to be precise, is that the information state (0 or 1), is basically the presence or absence of electric charge on those billion minuscule capacitors acting as memory cells. And capacitors by nature, they leak charge. In semiconductors, it is mostly due to quantum effects like electron tunnelling, but sometimes it could also be due to the heat from other components surrounding it, or from physical and parasitic effects like electrical conductivity by the transistors connected to it. Whatever the cause is, the result is that capacitors gradually lose charge. To avoid this and preserve the charge in the memory cells, a DRAM always requires a refresh signal every 64 ms (normally).

Since the DRAM still could retain the charge stored in it for a brief time even when the power is turned off, it is only logical to attack it and try to recover whatever information is stored in the memory cells.

How is cold boot attack performed?

As mentioned earlier, cold boot attack involves cooling down the RAM as soon as it is powered off. Temperature is directly proportional to the rate of charge decay or leakage in capacitors. So by bringing down the temperature of the RAM, the data retention time is significantly increased from a few seconds to minutes and even hours. This is usually done by spraying the coolant from a can of compressed air by holding it upside down.[1] But in forensic labs, liquid nitrogen is used as well.

Once cooled enough, the RAM is either inserted into a compatible motherboard to dump the RAM data, or just kept in the same machine and the system is booted with a USB operating system to read and store the bit sequence from the RAM. Later, the copied binary sequence is passed on to any of the software algorithms to analyze and recover the encryption keys or whatever the data that was targeted.

The term ‘cold boot’ just refers to that cold and evil way of shutting down a computer by holding a pillow… um… holding the power key long enough to kill the computer so that you can boot again.

Cold boot attack in real world

Cold boot attack is mostly seen in the world of digital forensics where such approaches are required to retrieve the decryption keys of an encrypted system or software modules. But outside such environments, they are slightly uncommon, as the cold boot attack demands a physical access to the victim’s computer — not to mention the time one needs to spend on removing those bazillion screws.

But that doesn’t mitigate the security risks involved. It is still a vulnerability, and there are successful proof of concept demonstrations of data retention even in modern SDRAM like DDR2 and DDR3,[2] which means, it is highly possible that DDR4 will be susceptible to such attacks in the future.

How to prevent data theft from cold boot attacks?

Some quick software-based solutions like overwriting the RAM before shutting down the machine or using encryption programs that don’t write sensitive keys on to the RAM can avoid data loss due to cold boot attacks.

For example, the Linux kernel got a patch named TRESOR, which disallows programs to write or store encryption keys on RAM. Instead, it restricts encryption to the CPU level. In a similar way, the CPU cache can also be used instead of RAM to store the encryption keys temporarily.

Despite all the defensive measures, targeted attacks towards data will always be evolving along with the technology. In short, just by preventing any physical access to your machine, you can very well avert many targeted attacks.


  1. Halderman J, Schoen S, Heninger N et al. Lest we remember. Communications of the ACM. 2009;52(5):91. doi:10.1145/1506409.1506429.
  2. Lindenlauf S, Hofken H, Schuba M. Cold Boot Attacks on DDR2 and DDR3 SDRAM. 2015 10th International Conference on Availability, Reliability and Security. 2015. doi:10.1109/ares.2015.28.

Karthikeyan KC

Aeronautical Engineer, Science Fiction Author, Gamer, and an Explorer. I am the creator of Geekswipe. I love writing about Physics and Astronomy. I am now creating Swyde.


Leave a Reply

Your email address will not be published. Required fields are marked *