CHAPTER 04 35 MIN READ INTERMEDIATE

Memory Forensics: Acquisition, Volatility & Live System Analysis

RAM holds some of the most important evidence on a compromised system: running processes, network connections in progress, decryption keys in use, and injected code that was never written to disk. Fileless malware can live entirely in memory and never touch the drive at all. This chapter covers how to acquire that memory before it's gone and how to start pulling it apart.

memory forensicsmemory acquisitionVolatility frameworkprocess injection

Why Memory Matters

Disk forensics captures what a system has saved. Memory forensics captures what a system is doing right now, including things that were deliberately designed to never be saved.

Disk EvidenceMemory-Only Evidence
Installed applications and files at restRunning processes and their command-line arguments
Saved documents and downloadsNetwork connections currently open or recently closed
Registry hives as written to diskDecrypted data and encryption keys actively in use
Malware binaries, if dropped to disk at allInjected or unpacked malware code that never touched disk
N/AFileless malware that only ever existed in RAM

This is why memory sits near the top of the order of volatility from chapter 1. Only CPU registers, cache, and live kernel state rank above it, and none of those can be collected in practice, which makes RAM the first source an examiner actually captures. Once a system is powered off or rebooted, everything in that right-hand column is gone permanently. Disk evidence can usually wait a few hours for a proper response; memory usually cannot.

Memory Acquisition

There are two broad ways to get memory content for analysis, depending on whether the system is still running.

1Live AcquisitionRun a memory-imaging tool on the running system to capture the full contents of physical RAM to a file.
→
2Existing Memory SourcesRecover memory content already saved to disk: hibernation files, pagefiles, or crash dumps.
→
3Preserve and HashHash the acquired image immediately and store it alongside other collected evidence.
Note: Acquiring memory on a live system means running a tool on that system, which leaves a small footprint on the very evidence being collected. This is an accepted tradeoff. The alternative, not acquiring memory at all, loses far more evidence than the acquisition tool disturbs.

Analysis With the Volatility Framework

Volatility is a widely used open-source memory analysis framework built around plugins, each designed to answer a specific question about the memory image. Exact plugin names and syntax vary between framework versions, so the table below stays at the category level.

Plugin CategoryWhat It Reveals
Process listingRunning processes, plus processes that were hidden or unlinked from the normal list
Network connectionsActive sockets and recently closed connections still resident in memory
Process memory scanningInjected code, where a process's in-memory content doesn't match what's expected for it
Command historyCommands typed into shells or consoles during the session
Registry hives in memoryRegistry data loaded at capture time, sometimes ahead of what's flushed to disk
Note: Think of each plugin category as answering a narrow question. Building a full picture of an incident usually means running several categories and correlating what they show, not relying on any single output alone.

Process and Injection Artifacts in Memory

Memory analysis is where a lot of malware behavior that hides well on disk becomes visible. A few patterns come up repeatedly.

  • Parent-child anomalies: a process spawned by a parent that wouldn't normally spawn it, such as an office application launching a command shell.
  • Process hollowing and injection signatures: a process whose in-memory code doesn't match its on-disk image, a strong indicator that legitimate process space was hollowed out and replaced.
  • Hidden or unlinked processes: a technique sometimes called DKOM, where a process is removed from the visible process list in memory but is still actually running.
  • Orphaned network connections: an otherwise ordinary-looking process holding a network connection that doesn't fit its normal behavior.
Note: None of these indicators are proof on their own. A legitimate installer can spawn a shell too. Weigh each pattern against what's normal for that specific host and process before calling it malicious.

Limitations and Best Practices

Memory forensics is powerful, but it comes with real constraints an examiner has to plan around.

LimitationPractical Impact
Extreme volatilityMemory must be acquired first, or before disk in many response plans, or the evidence is lost forever
Anti-forensic toolingMemory-wiping and scrubbing tools exist and can destroy evidence before an examiner ever arrives on scene
Single point in timeA memory image is only a snapshot; it doesn't show how the system got there

Memory analysis is strongest when read alongside the disk and filesystem artifacts covered in chapters 2 and 3, not in isolation. A memory snapshot is a single point in time; the next chapter builds the timeline around it.

Key Takeaways

  • Memory holds evidence disk never will: running processes, live network connections, decryption keys in use, and injected or fileless code.
  • Memory can be acquired live from a running system, or recovered from existing sources like hibernation files, pagefiles, and crash dumps.
  • Live acquisition tools leave a small footprint on the evidence, an accepted tradeoff against losing memory evidence entirely.
  • Volatility is a plugin-based framework where each plugin category answers a specific question about the memory image.
  • Process hollowing, hidden/unlinked processes (DKOM), and orphaned network connections are key injection indicators to look for.
  • Because memory is the most volatile evidence source that can actually be collected, it must be acquired first or it's lost permanently once the system reboots or shuts down.

Knowledge Check

Click an answer to reveal the explanation.

Why must memory usually be acquired before other evidence during incident response?

Correct answer: B. Memory sits near the top of the order of volatility, and it is the most volatile source that can realistically be collected. Once a system powers off or reboots, its contents are gone permanently, while most disk evidence can wait.

A process's in-memory code doesn't match its on-disk image. What does this most likely indicate?

Correct answer: C. A mismatch between a process's on-disk image and its in-memory code is a classic sign of process hollowing or injection, where legitimate process space is used to run different code.

What is Volatility primarily used for in digital forensics?

Correct answer: D. Volatility is an open-source memory analysis framework structured around plugins, each built to answer a specific question about a captured memory image, such as process listing, network connections, or injection detection.