Memory forensics

On this page 7

Memory forensics is the discipline of acquiring and analyzing the contents of volatile memory (RAM) from a computer or virtual machine to reconstruct what was running at a specific moment. In incident response, it reveals processes, network connections, injected code, encryption keys and command history that often never touch the disk and therefore escape traditional disk-based digital forensics.

Because modern attackers favor fileless malware, living-off-the-land techniques and in-memory implants, a memory image is frequently the only reliable record of an intrusion. The practice sits within the wider field of cybersecurity investigations and is closely tied to threat hunting, chain of custody and the evidence handling steps of NIST SP 800-61.

How memory forensics captures volatile evidence

The work begins with acquisition, the process of copying physical memory into an image file while the system is still running. Investigators follow the order of volatility, collecting the most short-lived data first, because RAM contents change every millisecond and vanish entirely when power is lost.

Acquisition always alters the system slightly: the capture tool itself loads into memory and overwrites some pages. Responders accept this trade-off, document the tool, version and time used, and compute a cryptographic hash of the image to preserve the chain of custody.

The table summarizes the main acquisition methods and when each is appropriate.

MethodHow it worksBest suited forMain drawback
Software agent on hostKernel driver reads physical memoryLive Windows, Linux and macOS endpointsFootprint in memory, may be blocked by rootkits
Hypervisor snapshotVM memory saved from the hostCloud and virtualized serversRequires hypervisor access
EDR remote collectionAgent streams image to the consoleLarge fleets and remote sitesNetwork bandwidth and agent trust
Crash dumpOperating system writes memory on faultSystems without other toolingMay be incomplete or trigger a reboot
Hibernation and page filesCompressed memory stored on diskPowered-off machinesPartial and possibly outdated
Memory acquisition methods

Artifacts found in a memory image

Analysis tools such as Volatility parse the raw image by locating kernel data structures and rebuilding the operating system’s view of processes, threads, handles and network sockets. Analysts then compare what the system reported with what actually exists in memory, because discrepancies often reveal rootkits and hidden processes.

ArtifactWhat it revealsInvestigative value
Process list and treeRunning programs and their parentsSpots suspicious parent-child chains
Network connectionsOpen sockets and remote addressesIdentifies command-and-control channels
Injected code regionsExecutable memory without a backing fileDetects process injection and shellcode
Command linesArguments passed at launchExposes encoded PowerShell and scripts
Loaded modules and driversDLLs and kernel drivers in useReveals malicious or unsigned drivers
Credentials and keysPassword hashes, tickets, encryption keysShows credential theft and enables decryption
Key artifacts recoverable from RAM

Findings are frequently converted into indicators of compromise, such as hashes of injected regions or remote addresses, and fed into YARA scans or threat intelligence platforms so that other hosts can be checked quickly.

Memory forensics compared with other forensic sources

Memory analysis complements rather than replaces disk and log evidence. Each source answers a different question, and a mature incident response team correlates all of them on a single timeline.

SourcePersistenceStrengthBlind spot
Memory imageLost at shutdownCurrent state, fileless activity, keysHistory before the capture
Disk imagePersists across rebootsFiles, persistence, deleted dataCode that runs only in RAM
System and security logsRetention policy dependentLong timeline of eventsCan be cleared or tampered with
Network capturesOnly while recordingExact traffic contentEncrypted payloads
Evidence sources in incident response

The practical rule is to capture memory before containment actions that reboot or isolate a host destructively, since a reboot erases the evidence that explains how the attacker operated.

Practical workflow during an incident

A disciplined workflow keeps memory evidence admissible and useful. Most incident response playbooks include steps similar to the following:

  1. Decide quickly whether the host is a priority for live capture based on incident triage and severity level.
  2. Acquire memory with an approved, tested tool and write the image to external or network storage, never to the suspect disk.
  3. Hash the image, record times and operators, and log every transfer for the chain of custody.
  4. Analyze a working copy, starting with processes, network activity and injected code mapped to MITRE ATT&CK techniques.
  5. Extract indicators, hunt for them across the environment and feed results into eradication planning.

Image sizes match installed RAM, so a server with 256 GB of memory produces an image of similar size. Responders must plan storage and transfer time, and capture can take from minutes to over an hour depending on hardware and network speed.

Limitations and common pitfalls

Memory forensics is powerful but fragile and technically demanding. Its most frequent problems concern timing, tooling and interpretation rather than the analysis techniques themselves.

  • Smearing occurs because memory keeps changing during capture, so structures in the image may be inconsistent.
  • Unsupported operating system builds can prevent tools from locating kernel structures until symbol profiles are updated.
  • Anti-forensic malware may detect acquisition drivers, hide its pages or crash the host during capture.
  • Encrypted or compressed memory features, and virtualization-based security, can limit what is readable.
  • Over-interpretation of a single anomaly without corroboration from disk or logs can lead to false conclusions.

Teams reduce these risks by rehearsing capture in tabletop exercises, maintaining validated tool kits and training analysts to treat each finding as a hypothesis to verify.

The idea in brief

A computer’s memory is like a desk covered with open papers while someone is working. The filing cabinet, which is the disk, only shows what was saved. The desk shows what was happening right now, including notes that were never meant to be filed.

Memory forensics means photographing that desk before anyone clears it. Investigators then study the photograph to see which programs were running, who they were talking to and whether an intruder was hiding among them. Once the power goes off, the desk is wiped clean, so timing is everything.

A practical scenario

A security operations center at a mid-sized logistics firm receives an alert about unusual outbound traffic from a finance workstation. Antivirus scans of the disk find nothing. Before isolating the machine, a responder uses the EDR console to capture a 16 GB memory image, hashes it and logs the transfer.

Analysis shows a legitimate system process with an executable memory region that has no backing file. The region contains a beacon configured to contact a remote server every 60 seconds, and the process command line reveals an encoded PowerShell launcher started from a malicious email attachment.

The team extracts the remote address and a YARA signature of the injected code, then hunts across 2,000 endpoints and finds two more infected hosts. All three are contained and rebuilt, and the attacker is removed without ever having written the implant to disk.