In this module
IR1.5 Volatility 3 — Memory Forensics
Volatility 3 — Memory Forensics
The tool that sees what disk forensics cannot
The attacker used process injection. Their code is running inside a legitimate Windows process — no file on disk, no Prefetch entry, no AmCache record. Disk forensics sees a clean system. Memory forensics sees the injected code, the C2 connection, the stolen credentials, and the encryption keys. If your toolkit does not include memory analysis, you are blind to an entire category of attack. Volatility 3 is how you gain that visibility.
Memory forensics analyzes the contents of a system's RAM at a specific point in time. Where disk forensics examines persistent artifacts — files, registry hives, event logs — that survive a reboot, memory forensics examines volatile state: the information that exists only while the system is powered on and disappears permanently when the system shuts down.
# Step 1: Verify Python is installed (3.10+ recommended)
python --version
# If not installed: download from python.org
# During installation, CHECK "Add Python to PATH"
# Step 2: Create a dedicated directory and virtual environment
New-Item -ItemType Directory -Path "C:\IR\Tools\Volatility3" -Force
Set-Location "C:\IR\Tools\Volatility3"
python -m venv venv
# Step 3: Activate the virtual environment
.\venv\Scripts\Activate.ps1
# Prompt changes to (venv) indicating the virtual environment is active
# Step 4: Install Volatility 3
pip install volatility3
# This installs Volatility and all dependencies
# Step 5: Verify the installation
vol --help
# Expected: Volatility 3 Framework version and available commands
# The help output lists all available plugins organized by OS
# Alternative: install from GitHub source (for latest development version)
# git clone https://github.com/volatilityfoundation/volatility3.git
# cd volatility3
# pip install -e .# Pre-download Windows symbol tables for offline analysis
# Download from: https://downloads.volatilityfoundation.org/volatility3/symbols/windows.zip
# Extract to the symbols directory:
# C:\IR\Tools\Volatility3\venv\Lib\site-packages\volatility3\symbols\
# Verify symbols are available
$symbolPath = "C:\IR\Tools\Volatility3\venv\Lib\site-packages\volatility3\symbols"
$winSymbols = Get-ChildItem $symbolPath -Recurse -Filter "*.json.xz" -ErrorAction SilentlyContinue
Write-Host "Symbol files available: $($winSymbols.Count)" -ForegroundColor $(if ($winSymbols.Count -gt 0) { 'Green' } else { 'Yellow' })
# The symbol pack is 200-400 MB and covers all Windows versions# Download WinPMem from:
# https://github.com/Velocidex/WinPmem/releases
# Save to C:\IR\Tools\Volatility3\winpmem.exe
# Also copy to the jump bag USB (IR1.8)
# Capture memory from the local system (for testing/validation)
# Run as Administrator
Set-Location "C:\IR\Tools\Volatility3"
.\winpmem.exe "C:\IR\Evidence\TEST_memory.raw"
# Expected behavior:
# WinPMem loads a kernel driver to access physical memory
# Reads all physical RAM pages and writes to the output file
# Duration: 2-10 minutes depending on RAM size and disk speed
# Output size: equals physical RAM (16 GB RAM → 16 GB dump file)
# The dump file is a complete snapshot of RAM at capture time# Activate the Volatility 3 environment
Set-Location "C:\IR\Tools\Volatility3"
.\venv\Scripts\Activate.ps1
# Identify the memory image
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.info.Info
# Output: OS version, kernel build, system time at capture
# This confirms the dump is valid and Volatility can parse it
# If symbols are needed, they download automatically at this step# List all processes (equivalent to Task Manager but forensic-grade)
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.pslist.PsList
# Output: PID, PPID, ImageFileName, Offset, Threads, Handles, CreateTime, ExitTime
# Look for: unexpected process names, unusual parent-child relationships,
# processes running from temp directories, processes with exit times (terminated)
# Show the process tree — parent-child hierarchy
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.pstree.PsTree
# The tree view reveals suspicious hierarchies:
# explorer.exe → powershell.exe → cmd.exe (normal admin activity)
# outlook.exe → powershell.exe → cmd.exe (phishing payload execution)
# svchost.exe → cmd.exe (unusual — svchost rarely spawns cmd)
# Scan for hidden processes (rootkit detection)
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.psscan.PsScan
# PsScan searches memory for process structures rather than walking
# the kernel's process linked list. A process that appears in PsScan
# but NOT in PsList has been hidden (unlinked from the list) — this
# is a strong indicator of rootkit activity (T1014)
# Show command-line arguments for every process
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.cmdline.CmdLine
# Reveals the exact commands used to launch each process
# A powershell.exe with "-nop -w hidden -enc <base64>" is
# almost certainly attacker activity — legitimate PowerShell
# rarely uses encoded commands with hidden windows# List all network connections with owning process
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.netscan.NetScan
# Output: Protocol, LocalAddr:Port, ForeignAddr:Port, State, PID, Owner
#
# Investigation workflow:
# 1. Find connections to unexpected external IPs
# 2. Map each suspicious connection to its owning process (PID)
# 3. Look up that PID in the PsList output
# 4. If the process is svchost.exe connecting to a VPS IP on
# port 443 — that is likely a C2 channel
# 5. Check the process's parent in PsTree
# 6. Check the process's command line in CmdLine
# 7. Run Malfind against the process to check for injection# Detect injected code in process memory
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.malfind.Malfind
# Malfind identifies memory regions with suspicious characteristics:
# - PAGE_EXECUTE_READWRITE protection (writable + executable)
# - Not backed by a legitimate file on disk
# - Contains executable code (identified by header bytes)
#
# Output: Process, PID, Start address, Protection, Hexdump
#
# Interpretation (critical — false positives are common):
# - Legitimate causes of RWX memory: .NET JIT compilation,
# Java JIT, some AV products, GPU drivers, browser JIT
# - Suspicious indicators: MZ header (PE executable), shellcode
# patterns (NOP sleds, API resolution stubs), large RWX regions
# in system processes that should not have them
#
# On a clean system, Malfind typically produces 5-20 results,
# most of which are false positives from legitimate applications.
# On a compromised system, additional results from system
# processes (svchost.exe, rundll32.exe) with PE headers or
# shellcode patterns indicate injection.
# Dump the injected memory regions for further analysis
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.malfind.Malfind --dump -o "C:\IR\Output\malfind_dumps"
# The dumped regions can be scanned with YARA rules, submitted
# to VirusTotal, or analyzed with a disassembler to confirm
# whether they contain malicious code# List all loaded DLLs for a specific suspicious process
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.dlllist.DllList --pid 4532
# Compare against known-good DLL lists for the process type
# An svchost.exe loading a DLL from C:\Users\Public\ is suspicious
# A legitimate svchost.exe loads only system DLLs from System32
# Check for discrepancies in module lists (detect injection)
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.ldrmodules.LdrModules --pid 4532
# LdrModules compares three different module lists maintained by Windows
# A module that appears in one list but not others may be injected
# Output columns: InInit, InLoad, InMem — if any is False for a
# non-system DLL, investigate further# Extract password hashes from the SAM hive in memory
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.hashdump.Hashdump
# Output: Username:RID:LM_hash:NTLM_hash
# These are the same hashes the attacker would extract with Mimikatz
# If the attacker had access to LSASS, they obtained these credentials
# This informs the containment scope: every account with a recovered
# hash must have its password reset
# List registry hives in memory
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.registry.hivelist.HiveList
# Shows which registry hives were loaded at capture time
# Useful for identifying the SAM, SYSTEM, SOFTWARE hives for
# targeted registry analysis within the memory dump# Scan process memory with YARA rules
# Requires: pip install yara-python
# Scan all processes for Cobalt Strike beacon signatures
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.yarascan.YaraScan --yara-rules "rule CobaltStrike { strings: $a = { 2e 2f 2e 2f 2e 2c } $b = \"beacon\" nocase condition: any of them }"
# Or use a YARA rule file (more practical for multiple signatures)
vol -f "C:\IR\Evidence\TEST_memory.raw" windows.yarascan.YaraScan --yara-file "C:\IR\Tools\yara\cobalt_strike.yar"
# YARA scanning is the most targeted detection method:
# Malfind identifies suspicious memory regions generically
# YARA scanning matches specific malware signatures within those regions
# Combine both: Malfind for broad detection, YARA for specific identificationvol -f dump.raw windows.pslist is no more complex than running PECmd.exe -d prefetch --csv output. The difference is that memory forensics reveals evidence that disk forensics cannot — and without it, the most common commercial attack tooling (Cobalt Strike, Sliver, Brute Ratel) is invisible. An investigation that examines only disk artifacts will miss in-memory implants, miss the C2 connections, miss the injected code, and produce an incomplete conclusion. IR6 teaches memory forensics from first principles — you do not need prior experience. You need a memory dump and Volatility 3.Build it: Capture and analyze your first memory dump
Run WinPMem on your forensic workstation to capture a memory dump
Run WinPMem on your forensic workstation to capture a memory dump. Then execute the five-step investigation workflow: (1) windows.info to identify the image, (2) windows.pslist and windows.pstree to understand the process landscape, (3) windows.netscan to identify network connections, (4) windows.malfind to check for code injection, (5) windows.dlllist against your browser process to see its loaded DLLs. On your clean system, you will see legitimate processes, legitimate connections, and potentially some Malfind results from JIT compilation — all normal. The value of this exercise is establishing a baseline: when you analyze a compromised system's memory in IR6, you will recognize what is normal because you have seen it here.
Investigate: Map a process to its network connection
Open your browser and navigate to any website. Run windows.netscan against a fresh memory capture. Find your browser process's PID in the PsList output. Now find that same PID in the NetScan output — you will see the browser's active connections with destination IPs and ports. This is the same technique you will use in IR6 and IR13 to find an attacker's C2 connection: identify the suspicious process, find its PID, look up its network connections, and determine where it is communicating. On your clean system, the connections are to legitimate websites. On a compromised system, the same query reveals the attacker's infrastructure.
Beyond this investigation
The techniques taught in this subsection apply beyond the specific scenario presented here. The same evidence sources, tools, and analytical methods are used across ransomware, BEC, insider threat, and APT investigations — the context changes but the methodology is consistent.
Volatility3 analysis of a memory dump shows a process named 'svchost.exe' running from C:\Users\Public\Downloads\. Legitimate svchost.exe runs from C:\Windows\System32\. Is this finding sufficient for the IR report?
It is a finding — but document it precisely. The finding: 'Process svchost.exe (PID XXXX) running from a non-standard path (C:\Users\Public\Downloads\ instead of C:\Windows\System32\). This is consistent with process name masquerading (T1036.005).' Do NOT state 'the attacker ran malware disguised as svchost' — that is interpretation beyond what the evidence shows. The process may be malware, a legitimate tool poorly named, or a testing artifact. The finding states what the evidence SHOWS; the analysis section interprets what it MEANS.