Skip to content
Pwnversity
MAL-MEMORYadvanced · 5 min · upd. 2026-10

Memory Forensics for Malware

ATT&CKT1055DFIR

RAM holds what disk doesn’t tell: unpacked code, injections, hidden processes, encryption keys, network connections, and fileless artifacts. Memory forensics captures a RAM image and analyzes it with Volatility 3 to reconstruct what was happening on the system. For malware analysis it’s decisive: many modern techniques (injection, packing, fileless) are only visible in memory. This page is the “malware” angle on general memory forensics.

The modern adversary avoids disk precisely because they know that’s where they get signed: they inject into legitimate processes, run in memory (reflective loading), and decrypt their code and config only in RAM. All of that has to exist in memory to run — and that’s where the defender catches it. The limit is volatility: RAM is lost on shutdown, so its acquisition ranks very high in the order of volatility (see DFIR — chain of custody).

flowchart LR
  A[Live system] --> B[RAM dump<br/>WinPmem · AVML · LiME]
  B --> C[Hash + custody]
  C --> D[Offline analysis<br/>Volatility 3]
  • Windows: WinPmem, Magnet RAM Capture, DumpIt.
  • Linux: AVML, LiME.
  • Virtual machines: the hypervisor’s state/snapshot file is already a memory image.

Dump first, hash, document the chain of custody, and always analyze on the copy. In a dynamic-analysis lab, the VM snapshot serves this purpose.

Volatility detects the system profile automatically. The most useful plugins for malware:

Ventana de terminal
vol -f mem.raw windows.pslist # processes (OS list)
vol -f mem.raw windows.psscan # processes by scan (finds hidden/terminated)
vol -f mem.raw windows.pstree # process tree (parent/child relationships)
vol -f mem.raw windows.malfind # suspicious memory regions (injection, RWX)
vol -f mem.raw windows.netscan # network connections (C2)
vol -f mem.raw windows.dlllist # DLLs loaded per process
vol -f mem.raw windows.cmdline # command line of each process
vol -f mem.raw windows.handles # handles (mutexes, files, keys)

linux.* equivalents for Linux images. MemProcFS is an alternative that mounts the image as a browsable filesystem.

  • Code injection — malfind flags private, executable, non-file-backed regions (typical of hollowing/reflective loading). ATT&CK T1055.
  • Process discrepancies — a process psscan sees but pslist doesn’t: hidden or unlinked (possible rootkit, see Rootkits and bootkits).
  • Anomalous tree — winword.exe spawning powershell.exe, or an svchost without its services.exe parent.
  • Connections — netscan reveals C2 destinations even if the process hid them in user-land.
  • Unpacked code — dump the injected/unpacked region (windows.vadinfo/dump) and analyze it statically (strings, CAPA) → config, second stage.
  • Handles and mutexes — high-fidelity IOCs for detection.

In authorized exercises, memory forensics serves to verify stealth: after deploying an implant in the lab, the operator checks whether malfind/netscan would reveal it. If the implant shows up as a non-backed RWX region or with visible connections, the blue team will catch it too. The goal is to measure the memory footprint, not to perfect the hiding.

  • malfind + netscan + pstree is the trio that catches most fileless intrusions in an image.
  • Integrate memory analysis into incident response: KAPE and Velociraptor collect and analyze memory at fleet scale.
  • It doesn’t replace EDR, it complements it: memory gives the truth of the dump moment; EDR gives the timeline.

Memory artifacts (injected regions, connections, extracted config) feed IOCs and in-memory YARA rules to hunt the same footprint across other hosts (see Intelligence and classification).

  • Volatility was key to analyzing fileless intrusions and rootkits in many public DFIR investigations.
  • Studying orphan processes and hollowing in memory is standard for detecting Cobalt Strike and families that inject into rundll32/svchost.
  • ATT&CK: T1055 (Process Injection), T1620 (Reflective Code Loading), T1003 (OS Credential Dumping — LSASS in memory).
  • Memory image acquired with integrity (hash + custody)
  • pslist vs psscan → hidden/terminated processes
  • pstree → anomalous parent/child relationships
  • malfind → injected regions (RWX, non-backed)
  • netscan → C2 connections
  • Dump and analyze the unpacked/injected region (strings, CAPA)
  • Handles/mutexes as IOCs
  • YARA over the memory image; feed fleet-wide hunting