Get a Pentest and security assessment of your IT network.

Cyber Security

RAM Data Theft: Risks & Prevention

TL;DR

Yes, data can be stolen from RAM while a computer is running. This is done using techniques like cold boot attacks and memory scraping. Protecting against this involves full disk encryption, secure boot, tamper detection, and careful physical security.

Understanding the Risk

RAM (Random Access Memory) holds data that your computer is actively using. When power is removed, RAM typically loses its contents. However, there are ways to recover this data for a short period after power loss, or even while the system is running.

How Data Theft from RAM Works

  1. Cold Boot Attacks: This involves quickly cooling down the RAM chips after a shutdown (or crash) and then booting from an external device to dump the memory contents before they completely decay.
  2. Memory Scraping/Dumping: Software can be used to directly read the contents of RAM while the system is running. Malware or compromised drivers are often used for this purpose.
  3. DMA Attacks (Direct Memory Access): A malicious device connected via a bus like Thunderbolt or PCIe can bypass the operating system and directly access RAM.

Protecting Against RAM Data Theft

Here’s how to mitigate the risks:

1. Full Disk Encryption

This is your primary defense. If your hard drive (or SSD) is encrypted, stolen data from RAM is useless without the decryption key.

  • Windows: Use BitLocker Drive Encryption. To enable it:
    control userpasswords2

    Then select ‘Advanced options’ and check ‘Encrypt the drive’.

  • macOS: FileVault is built-in. Enable it in System Preferences > Security & Privacy > FileVault.
  • Linux: Use LUKS (Linux Unified Key Setup). The process varies depending on your distribution, but typically involves using a tool like cryptsetup during installation or after with commands such as:
    sudo cryptsetup luksFormat /dev/sdX

2. Secure Boot

Secure Boot helps prevent malicious software from loading at boot time, reducing the risk of memory scraping attacks.

  • Enable in UEFI/BIOS: Access your computer’s UEFI (Unified Extensible Firmware Interface) or BIOS settings during startup (usually by pressing Del, F2, F12, or Esc). Look for Secure Boot options and enable them.

3. Tamper Detection

Hardware-based tamper detection can alert you if someone physically accesses your computer to attempt a cold boot attack.

  • Trusted Platform Module (TPM): A TPM chip provides hardware root of trust and can detect changes to the system’s boot process.

4. Physical Security

The most straightforward protection is preventing physical access to your computer.

  • Lock Your Device: Always lock your laptop or desktop when unattended.
  • Secure Environment: Keep your computer in a secure location.

5. Software Protections

While not foolproof, these can add layers of security:

  • Anti-Malware Software: Regularly scan for malware that could be used to scrape memory.
  • Virtualization: Running sensitive applications within a virtual machine can isolate them from the host system and make data theft more difficult.

6. Operating System Updates

Keep your operating system up-to-date with the latest security patches.

Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation