Memory Forensics
RAM contains the live state of a compromised system — decrypted data, running processes, network connections, injected code, and credentials. It is the only place fileless malware and process injection artifacts can be found.
Why Memory Analysis Is Critical
| Feature | Volatility 2 | Volatility 3 |
|---|---|---|
| OS identification | imageinfo plugin suggests profiles | Automatic symbol detection; no profile needed |
| Profile flag | --profile=Win10x64_19041 required | No --profile flag |
| Plugin naming | pslist, netscan | windows.pslist, windows.netscan |
| Symbol tables | Profiles bundled with tool | Downloads ISF symbol tables automatically |
| Python version | Python 2 (legacy) | Python 3 (current) |
| GCFA exam focus | Likely tested (FOR508 curriculum) | Increasingly included |
Memory Acquisition & Image Formats
Acquiring a memory image is a time-sensitive step — RAM content changes continuously and is lost on shutdown. Tool selection and method depend on the OS, environment, and whether the system is live or virtual.
Acquisition Tools by Platform
Memory Image Formats
| pagefile.sys | hiberfil.sys | |
|---|---|---|
| Purpose | Virtual memory (swap) — pages swapped out of RAM | Full RAM snapshot — written on hibernation |
| Location | C:\pagefile.sys | C:\hiberfil.sys |
| Volatility analysis | ❌ Cannot analyze directly | ✅ Direct analysis supported |
| Forensic use | String search for fragments, passwords, documents | Full process list, injections, network state |
| Content | Random swapped pages — not complete processes | Complete RAM at time of hibernation |
| Format | Raw binary pages (no structure) | Compressed with Xpress algorithm |
Process Analysis & DKOM Detection
Knowing what a legitimate Windows process looks like — its parent, count, path, and user — is the foundation of memory forensics. Deviations are your indicators of compromise.
pslist for the standard process list. Use psscan to find processes hidden by DKOM rootkits. Compare the two outputs — processes in psscan but not pslist are almost certainly malicious.
Legitimate Windows Process Characteristics
-k flag followed by service group name. Parent must always be services.exe.| Aspect | Details |
|---|---|
| What it is | Rootkit technique that unlinks a process's EPROCESS structure from the doubly-linked ActiveProcessLinks list |
| Effect | Process disappears from Task Manager, pslist, and any tool that walks the linked list |
| Detection | psscan — scans physical memory for EPROCESS pool tag signatures regardless of list linkage |
| Tell | Process appears in psscan output but NOT in pslist output |
| Other indicators | filescan may show file handles owned by the hidden process; netscan may show connections |
| EPROCESS tag | Pool tag Proc (0x636F7250) searched by psscan in physical memory |
Process Injection & Malware in Memory
Process injection lets attackers run malicious code inside legitimate processes — evading process-level detection. Understanding each technique's mechanism and forensic signature is core GCFA knowledge.
malfind first — it flags VAD regions with PAGE_EXECUTE_READWRITE protection and an MZ header (0x4D 0x5A) not backed by a file on disk. Follow up with dlllist, vadinfo, and cmdline to build the full picture.
Process Injection Techniques
The VAD tree describes every virtual memory region in a process — its address range, protection flags, and whether it's backed by a file. malfind uses VAD to find injections.
| VAD Type | Meaning | Forensic Significance |
|---|---|---|
| VadS (private) | Private anonymous memory — heap, stack | Injected shellcode typically lives in VadS regions |
| Vad (mapped) | Memory-mapped file or section | Legitimate DLLs and EXEs appear here with file backing |
| VadF (large page) | Large page allocation | Rare; may indicate unusual memory manipulation |
| No FileObject | Memory not backed by any file | Combined with execute permission = strong injection indicator |
- Stores NTLM hashes, Kerberos TGTs and service tickets
- WDigest (Win7/older): stores cleartext passwords in memory
- Mimikatz command:
sekurlsa::logonpasswords - PPL (Protected Process Light) on Win8.1+ defends LSASS
- LSASS dump: Task Manager → Create Dump File (or procdump -ma lsass.exe)
- Volatility:
lsadumporhashdumpplugins
- SAM hive holds local user NTLM hashes
- Encrypted with SYSKEY from SYSTEM hive
- Both hives must be present for decryption
- Volatility
hashdump: extracts and decrypts hashes from memory - Outputs: username:RID:LM hash:NTLM hash
- NTLM hashes can be passed (Pass-the-Hash) or cracked offline
- TGT (Ticket Granting Ticket) + Service Tickets stored in LSASS
- Golden Ticket: forged TGT using KRBTGT hash — valid for 10 years
- Silver Ticket: forged service ticket using service account hash
- Pass-the-Ticket: export ticket from one machine, import on another
- Mimikatz:
kerberos::list /export - Volatility:
mimikatzplugin (Vol2) for ticket extraction
- BitLocker FVEK (Full Volume Encryption Key) may be in RAM
- VeraCrypt / TrueCrypt master keys recoverable from RAM
- TLS session keys — decrypt HTTPS traffic captured in parallel
- Tools: bulk_extractor (finds crypto keys), AESKeyFinder
- Requirement: memory image must be from an unlocked/running system
- Volatility:
bitlockerplugin for BitLocker FVEK extraction
Practice Quiz
Ten GCFA-style questions on memory forensics. Select your answers and submit to see your score.
Review the explanations above for any questions you missed.
Memory Hooks
High-yield mnemonics and patterns for GCFA memory forensics questions.
| Concept | Key Fact | Detection / Tool |
|---|---|---|
| DKOM | Unlinks EPROCESS from ActiveProcessLinks — hides from pslist | psscan finds hidden processes via pool tag scan |
| malfind | Finds RWX + no file backing + MZ header = injected PE | Volatility malfind plugin |
| Process Hollowing | Legitimate process shell, malicious PE inside; VAD shows no file backing at image base | malfind + vadinfo + procdump |
| Reflective DLL | Does NOT appear in dlllist — bypasses Windows loader entirely | malfind + memdump + YARA scan |
| hiberfil.sys | Full RAM snapshot from hibernation — Volatility can analyze directly | --profile with hiberfil.sys path |
| pagefile.sys | Swap file — NOT analyzable by Volatility; string search only | strings / bulk_extractor |
| lsass dump | Credential extraction target; procdump -ma lsass.exe or Task Manager | Volatility hashdump + lsadump |
| svchost rule | Parent must be services.exe; must have -k flag; from System32 | pstree + cmdline |
| LiME | Only kernel-level Linux memory acquisition tool (loadable kernel module) | insmod lime.ko |
| WDigest | Legacy protocol; stores cleartext passwords in lsass on Win7/2008R2 | Mimikatz sekurlsa::wdigest |
Ready for More Practice?
Test yourself with full-length GCFA practice exams on FlashGenius.
Unlock Full Practice Tests on FlashGenius →Flashcards
Click any card to flip it and reveal the answer.
What is the difference between pslist and psscan, and when do you use each?
pslist: walks ActiveProcessLinks doubly-linked list — fast, but DKOM can unlink processes to hide them. psscan: scans physical memory for EPROCESS pool tag "Proc" — slower, but finds hidden processes. Compare both: process in psscan but not pslist = DKOM rootkit hiding it.
What are the 5 steps of Process Hollowing and how does malfind detect it?
1) CreateProcess (suspended) 2) NtUnmapViewOfSection (hollow out) 3) VirtualAllocEx + WriteProcessMemory (write malicious PE) 4) SetThreadContext (redirect entry point) 5) ResumeThread. Detection: malfind shows MZ header in anonymous (no file backing) VAD region at the process base address.
What three conditions does malfind require to flag a memory region as suspicious?
All three must be present: 1) RWX or execute memory protection (PAGE_EXECUTE_READWRITE), 2) No file backing — anonymous (VadS) region not linked to any file on disk, 3) MZ header (0x4D 0x5A) at the start of the region indicating an embedded PE file. Missing any one reduces confidence significantly.
What credential types does lsass.exe store, and what protects it on modern Windows?
Stores: NTLM hashes, Kerberos TGTs and service tickets, WDigest cleartext passwords (Win7/older), cached domain credentials. Protection: PPL (Protected Process Light) on Win8.1+ prevents unauthorized process memory reads. Parent must be wininit.exe; single instance from System32. Mimikatz sekurlsa::logonpasswords extracts all stored creds.
Why doesn't Reflective DLL injection appear in dlllist, and how do you detect it?
Reflective DLL injection bypasses the Windows loader — the DLL contains its own loader routine and maps itself without calling LoadLibrary. Since the Windows loader never processes it, it never appears in the PEB loaded module list (which dlllist reads). Detection: malfind (RWX + MZ + no file backing), followed by memdump of the process and YARA scanning the raw memory.
What are the required parents for: svchost.exe, lsass.exe, csrss.exe, and explorer.exe?
svchost.exe → services.exe (+ must have -k flag, run from System32). lsass.exe → wininit.exe (single instance). csrss.exe → smss.exe (one per session, from System32\csrss.exe). explorer.exe → userinit.exe (which exits after launch, so appears parentless). Any deviation from these rules = masquerading or injection.
Which memory image types can Volatility analyze directly, and which cannot be analyzed by Volatility?
Volatility CAN analyze: Raw/DD dumps (.raw, .mem), hiberfil.sys (hibernation), VMware snapshots (.vmem), crash dumps (.dmp / MEMORY.DMP), LiME format (.lime), AFF4. Volatility CANNOT analyze: pagefile.sys (swap file — use strings/bulk_extractor instead). Always hash the image after acquisition for integrity.
What is DKOM and how does an analyst detect a process hidden by it?
DKOM (Direct Kernel Object Manipulation) removes a process from the ActiveProcessLinks doubly-linked list — hiding it from Task Manager, pslist, and any OS API traversing the list. Detection: run both pslist and psscan; any process appearing in psscan output but absent from pslist output has been unlinked by DKOM. Further investigate with handles, filescan, and netscan for the hidden PID.
Study Advisor
Choose a category for targeted guidance.
Exam Strategy — Memory Forensics
- Always start with pstree: GCFA scenario questions frequently hinge on identifying suspicious parent-child relationships. Know the expected parent for each critical Windows process cold.
- pslist vs psscan distinction: This is a favorite exam topic. Know that DKOM defeats pslist but not psscan, and that the comparison between the two outputs is how you detect hidden processes.
- malfind's three criteria: Many questions about injection detection come down to malfind. Memorize: RWX + no file backing + MZ header = injection. Two out of three can have innocent explanations (JIT compilers, heap).
- Injection technique identification: Questions may describe an attack and ask you to identify the technique. Key differentiators: process hollowing = suspended process + unmap; reflective DLL = not in dlllist; APC = alertable wait state.
- hiberfil vs pagefile: Know that hiberfil.sys is Volatility-analyzable (full RAM snapshot) and pagefile.sys is not (swap fragments only). This distinction appears directly on exams.
Common Mistakes — Memory Forensics
- Trusting pslist alone: Never conclude a process isn't present just because it doesn't appear in pslist. DKOM rootkits specifically target this. Always run psscan as well.
- Assuming RWX = definite injection: JIT compilers in browsers, Java, and .NET legitimately use RWX memory. malfind's strength is combining RWX + no file backing + MZ header — all three together, not just RWX alone.
- Expecting reflective DLL in dlllist: Reflective injection bypasses LoadLibrary and the PEB. dlllist will show nothing unusual. You must use malfind or raw memory scanning to detect it.
- Confusing hiberfil and pagefile: pagefile.sys is swap, not a memory snapshot — you cannot use Volatility on it. hiberfil.sys IS a memory snapshot from hibernation. These are frequently confused under exam pressure.
- Missing process masquerading: Malware named "svchost.exe" running from C:\Windows\ (not System32\) or with explorer.exe as parent is a classic trick. Path and parent are the two checks — run both cmdline and pstree.
- Forgetting Volatility 2 profile vs Volatility 3: Vol2 requires --profile flag; Vol3 does not. If exam questions give you a Volatility command, check for the presence or absence of --profile to determine which version is being used.
Quick Review — Memory Forensics
- pslist: Walks EPROCESS linked list — defeated by DKOM
- psscan: Carves pool tags from physical memory — finds DKOM-hidden processes
- malfind: RWX + no file backing + MZ header = injected PE
- Process Hollowing: Suspended process → unmap → write malicious PE → resume
- Reflective DLL: Self-loading DLL — NOT in dlllist; detect via malfind
- APC Injection: Queue APC to thread in alertable wait state
- DKOM: Unlinks EPROCESS from list; psscan is the counter-measure
- lsass.exe parent: wininit.exe (single instance); credential store
- svchost.exe parent: services.exe (must have -k flag; from System32)
- hiberfil.sys: Full RAM from hibernation — Volatility-analyzable
- pagefile.sys: Swap file — strings only, not Volatility-analyzable
- hashdump: Extracts NTLM hashes from SAM + SYSTEM in memory
- LiME: Linux kernel module — only true kernel-level Linux RAM acquisition
Deep Dive — Advanced Memory Concepts
- EPROCESS structure internals: EPROCESS is the kernel data structure representing a process. Key fields: UniqueProcessId (PID), InheritedFromUniqueProcessId (PPID), ImageFileName (15 chars max — can be spoofed), ActiveProcessLinks (the list DKOM manipulates), Peb (pointer to user-mode Process Environment Block).
- VAD tree structure: Each process has a VAD (Virtual Address Descriptor) binary tree in the kernel. Each node represents a virtual memory region with VPN start/end, protection, commit flags, and a FileObject pointer. vadinfo walks this tree. malfind queries it for suspicious protection + anonymous type combinations.
- WDigest and cleartext passwords: Windows 7 and Server 2008R2 store cleartext credentials in lsass memory for WDigest (HTTP authentication protocol). WDigest can be disabled via registry: HKLM\SYSTEM\...\Control\SecurityProviders\WDigest UseLogonCredential = 0. Attackers sometimes re-enable it to harvest cleartext creds after gaining admin.
- Golden Ticket attack: Attacker with KRBTGT hash can forge Kerberos TGTs for any user, valid for up to 10 years, even for disabled or non-existent accounts. Detected in memory: Kerberos tickets with anomalous lifetimes; non-standard encryption types; ticket for DC-level access from a workstation.
- Process Doppelgänging (TxF): Uses Windows Transactional NTFS (TxF) to write malicious code within an NTFS transaction, map it as a section object, create a process from the section, then rollback the transaction — the file never persists to disk. Very few AV/EDR tools detect this. Volatility detection is limited; look for processes with transacted file handles.
- Memory-only IOCs: Some C2 frameworks (Cobalt Strike, Metasploit Meterpreter) operate entirely in memory. IOCs include: beacon memory patterns (YARA rules for CS shellcode), unusual RWX regions in common processes, network connections from non-networking processes, and missing file backing for process image addresses.
Practice Tips — Memory Forensics
- Build a Volatility command cheat sheet: List every plugin with its purpose and example output format. Drill these until you can map "detect hidden process" → psscan, "find injection" → malfind, "extract hashes" → hashdump, "network connections" → netscan instantly.
- Practice with the SANS Memory Forensics course images: The FOR508 course includes sample memory images. Running actual Volatility commands against real images produces pattern recognition that reading alone cannot. Especially practice malfind output interpretation.
- Process masquerading drill: Write out the expected parent, count, path, and flags for each of the 8 critical processes (System, smss, csrss, wininit, services, svchost, lsass, explorer). For each, write the deviation that indicates malware.
- Injection identification scenarios: For each of the 7 injection techniques, practice identifying the technique from: the API sequence used, the Volatility plugin output that catches it, and the VAD characteristics. The GCFA often presents a scenario and asks which technique is described.
- hiberfil vs pagefile practice questions: This distinction comes up repeatedly. Drill: "Can Volatility analyze X?" If pagefile → No. If hiberfil → Yes. If raw dump → Yes. If VMware .vmem → Yes.
- MemLabs and DFIR.training CTFs: Free memory forensics CTF challenges (MemLabs on GitHub, DFIR.training) provide hands-on practice with real memory images and answers to verify against. These closely mirror GCFA scenario-based questions.