WakeWill blog

Memory Forensics Basics: Why RAM Holds the Evidence Disks Miss

Modern attacks often leave little on disk. Here is what memory forensics can reveal, how to capture RAM correctly, and the tools investigators use.

Cover image for: Memory Forensics Basics: Why RAM Holds the Evidence Disks Miss

When an incident happens, the first instinct is often to switch the machine off. For a forensic investigator, that can destroy the most valuable evidence. Many modern attacks run largely in memory: fileless malware, injected code, stolen credentials and live network connections may never be written to disk.

What memory can show you

A capture of a system’s RAM (a memory image) can reveal:

  • Running processes, including hidden or injected ones, and their parent-child relationships.
  • Network connections that were open at the time of capture.
  • Command lines that were used to start processes, often showing attacker commands and scripts.
  • Loaded modules and drivers, including malicious or vulnerable drivers.
  • Encryption keys and credentials cached in memory.
  • Artifacts of fileless malware, such as code injected into legitimate processes.

Order of volatility

Investigators collect evidence from the most volatile to the least volatile, because some of it disappears within seconds:

  1. CPU registers and cache
  2. Memory (RAM) and live network connections
  3. Temporary files and swap
  4. Disk
  5. Logs on remote systems and backups

So: capture memory before shutting down or rebooting, unless doing so would put people or the business at greater risk.

How to capture memory properly

  • Use a trusted, tested acquisition tool run from external media where possible, and document exactly what you ran and when.
  • Write the image to external storage, not the suspect disk.
  • Record a hash (for example SHA-256) of the image right after capture so you can prove it was not changed later.
  • Keep a chain of custody: who handled the evidence, when and why.
  • For virtual machines and cloud servers, a hypervisor-level snapshot or memory dump can be cleaner than running a tool inside the guest.

Analysis tools

  • Volatility 3, the widely used open-source framework, with plugins to list processes, network connections, command lines, injected code and more.
  • MemProcFS, which presents a memory image as a browsable file system.
  • YARA rules to scan memory for known malware patterns.

A typical first pass looks for processes with odd parents (for example a Word process starting PowerShell), processes running from unusual paths, unexpected network connections, and code injected into legitimate processes.

Key takeaways

  • Fileless and in-memory attacks leave the best evidence in RAM.
  • Capture memory first, hash it, and document every step.
  • Analyse with Volatility or MemProcFS, starting with processes, command lines and connections.

This guide was prepared with AI assistance.

Spotted an error or have more information? Contact the editor.