VeraCrypt 1.24 Beta 1 and Beta 3 introduced various options and mechanisms to protect against cold boot attacks and memory dumping of encrypted computers employing malicious inserted devices. Notably, VeraCrypt 1.24 Beta 1 introduced the ability to erase system encryption keys from RAM during shutdown or reboot of the computer to assist in mitigating some cold boot attacks.
Moreover, 1.24 Beta 1 offers the option to erase every encryption key from RAM when a new device is connected to the computer, provided that system encryption is employed. Also, 1.24 Beta 1 also provides a new driver entry point that may be called by applications to erase encryption keys from RAM in urgent cases.
VeraCrypt 1.24 Beta 3 introduced optional RAM encryption support for keys and passwords using ChaCha12 cipher, t1ha non-cryptographic fast hash, and ChaCha20 based CSPRNG. Beta 3 also introduced memory attack mitigations that render memory deployed by VeraCrypt unobtainable to non-administrators.
VeraCrypt 1.24 introduced a significant security layer that integrates properly with RAM encryption. This security layer refers to the capability of detecting new devices being inserted into the computer once system encryption has been deployed.
After being activated, when a device is inserted into the system, the master keys are instantly erased from memory which results in a Windows Blue Screen of Death (BSoD). Evidently, this mechanism protects against particular attacks that employ unique devices to extract memory from active computers that are running.
Nevertheless, such mechanism needs to be integrated with RAM encryption, given that it is not ensured that RAM chips will rapidly erase the demanded memory cells. Therefore, adversaries can make use of cold boot attacks in such instances.
Why Enabling RAM Encryption Is Better Than No RAM Encryption At All
RAM encryption increases protection against cold boot attacks and provides an obfuscation layer to render it considerably more complex to recover encryption master keys from memory dumps (Live & Offline Dumps). RAM encryption decreases the likelihood of master keys being present in RAM.
Hence, implementing RAM encryption is better than not implementing it at all. Nonetheless, there is no certainty that keys can never be located in RAM. In the absence of RAM encryption, locating and extracting master keys from memory dumps is comparatively straightforward.
As of v1.24, VeraCrypt will erase the encryption keys from RAM when the Windows system is shut down or rebooted to mitigate against some cold boot attacks.
Without RAM encryption, an attacker can utilize a cold boot attack to recover without difficulty a portion of the master key. Subsequently, the attacker may deploy brute force attacks to recover the remaining key.
Types of RAM & Susceptibility To Cold Boot Attacks
There are different generations of RAM DIMMs (dual in-line memory module). Notably, DDR3 RAM DIMMs are an older standard. Whereas, DDR4 RAM DIMMs are the current prevailing standard for RAM. Significantly, DDR5 RAM DIMMs have merely started to arrive.
Cold boot attacks are a significant risk when the target’s computer has DDR2 or DDR memory installed. RAM DIMMs slowly lose data over time as they lose power, yet do not instantly lose all data once power is gone. Contingent on the environmental temperature, RAM DIMMs may potentially preserve some data for up to 90 minutes after power is lost.
In cases where a target’s system has older DDR2 memory, it is advisable to wait a couple of minutes for the computer to shut down in a warm environment. If the computer is in a cold environment, we recommend waiting for the computer to be off for a longer duration. In contrast, for computers that have DDR3 or DDR4 memory, it is recommended that the computer is off for at least 5 seconds in a warm environment.
The memory will eventually fade naturally. Bear in mind that the longer the computer is off, the more likely the memory will have faded completely. If possible, wait for 90 minutes for memory to fade completely.
Cold boot attacks are also more likely to be successful when a target’s computer is taken away from them while the computer is still on, and the attacker has sufficient time to prepare and freeze the RAM sticks while the computer is still running.
Clearly, the ability for an attacker to perform cold boot attacks successfully differs substantially across different machines, types of memory, RAM brands, and characteristics of motherboards.
How To Encrypt RAM Using VeraCrypt
A method that can assist in mitigating cold boot attacks involves encrypting the computer system’s RAM with the stream cipher ChaCha12. ChaCha12 provides an encryption strength that is sufficient to protect against adversaries. Additionally, ChaCha12 grants high speed encryption/decryption.
Note that VeraCrypt RAM encryption is available only on 64-bit systems and is disabled by default. There is approximately 10% memory overhead when enabling the RAM encryption feature.
To encrypt your system’s RAM, launch VeraCrypt, click “Settings” in the menu bar, click “Performance/Driver Configuration,” enable “Activate encryption of keys and passwords stored in RAM,” and click “OK” to save the configuration settings in the “VeraCrypt – Performance and Driver Options” window.
Bear in mind that VeraCrypt will disable Windows Hibernate and Windows Fast Startup features before activating RAM encryption.
Alternatively, you can right-click the VeraCrypt icon in the system tray, select “Preferences,” select “More Settings…,” click “Performance/Driver Configuration,” enable “Activate encryption of keys and passwords stored in RAM,” and click “OK” to save the configuration settings in the “VeraCrypt – Performance and Driver Options” window.
Protecting against cold boot attacks is complicated. While there is no certainty that RAM encryption will ensure that keys are never found in memory, RAM encryption will decrease the likelihood of master keys being in memory.
The wide variety of circumstances will heavily affect whether a cold boot attack is successfully performed by an attacker. We conclude by stating that it is better to have RAM encryption enabled than no RAM encryption at all.