Memory is where secrets live. Decrypted payloads, injected code, command history, credentials - all sitting in RAM even if never written to disk.
Process Memory
Running code, loaded DLLs, heap allocations
Unpacked Code
Packed malware must unpack to execute
Credentials
Passwords, hashes, tokens in cleartext
Injected Code
Shellcode hidden in legitimate processes
Volatility Framework Basics
Volatility is the premier framework for memory forensics. Point it at a memory dump and extract running processes, network connections, injected code, and more.
# List running processes
volatility -f memory.dmp windows.pslist
# Show network connections
volatility -f memory.dmp windows.netscan
# Detect process injection
volatility -f memory.dmp windows.malfind
# Dump a specific process
volatility -f memory.dmp -p 1234 windows.memmap --dump
# Extract command line history
volatility -f memory.dmp windows.cmdline
Memory Strings Analysis
0x00400000
http://185.234.219.45:8080/gate.php
URL
0x00401200
https://pastebin.com/raw/C2Config
URL
0x00402400
SOFTWARE\Microsoft\Windows\CurrentVersion\Run
REGISTRY
0x00403800
cmd.exe /c powershell -enc BASE64_PAYLOAD
COMMAND
0x00404C00
MySecretEncryptionKey2024!
CRYPTO KEY
0x00406000
net user admin P@ssw0rd123 /add
COMMAND
0x00407400
ftp://backup-server.internal.local/exfil/
URL
Memory Dump Timing: Take a memory snapshot 30-60 seconds after malware execution. This captures initial unpacking and C2 communication before anti-analysis tricks kick in. Take multiple snapshots over time to catch time-delayed behaviors.
Common Memory Artifacts:
- Mutexes: Unique strings malware uses to prevent multiple infections
- Decrypted URLs: C2 domains that were encrypted in the binary
- Shellcode: Small executable payloads injected into other processes
- Configuration: C2 addresses, encryption keys, campaign IDs