Some malware never touches the disk. It lives only in RAM: injected into a normal process, running a PowerShell command, holding a connection open to its controller. Shut the machine down and it's gone. That's why memory forensics exists.
What RAM can reveal
- Every running process, including ones hidden from Task Manager
- The full command line each process was started with
- Open network connections and which process owns them
- Code injected into legitimate processes
- Passwords, encryption keys and clipboard contents
- Recently typed commands
Step 1: Capture the memory
| System | Free tools |
|---|---|
| Windows | WinPmem, Magnet RAM Capture, FTK Imager (Capture Memory) |
| Linux | LiME, AVML |
Save the dump to an external drive, then hash it like any other evidence.
Step 2: Analyse it with Volatility 3
Volatility 3 is the standard open-source framework for memory analysis.
pipx install volatility3
vol -f memory.raw windows.info # confirm the OS and that the dump is readable
The plugins you'll use most
| Plugin | What it shows |
|---|---|
| windows.pslist | Running processes |
| windows.pstree | Processes as a parent-to-child tree |
| windows.psscan | Processes found by scanning memory, including hidden and exited ones |
| windows.cmdline | The command line of each process |
| windows.netscan | Network connections and the process that owns each one |
| windows.malfind | Memory regions that look like injected code |
| windows.hashdump | Password hashes from the SAM |
Linux dumps have equivalents such as linux.pslist, linux.pstree and linux.bash, which recovers typed commands from memory.
How an investigator reads a dump
1. Look at the tree. Run windows.pstree and look for strange parents. WINWORD.EXE starting powershell.exe or cmd.exe is a classic sign of a malicious macro.
2. Compare the lists. A process that shows up in psscan but not in pslist may be hiding, or may simply have exited. Check its exit time.
3. Read the command lines. Long encoded PowerShell (-enc followed by a block of base64) is almost never legitimate.
4. Follow the network. In netscan, which process is talking to an outside IP? Should that program ever touch the internet?
5. Confirm with malfind. A region marked PAGE_EXECUTE_READWRITE that starts with MZ (the header of a Windows program) inside a normal process points to injection.
vol -f memory.raw windows.pstree
vol -f memory.raw windows.cmdline --pid 4312
vol -f memory.raw windows.netscan | grep ESTABLISHED
vol -f memory.raw windows.malfind --pid 4312
Tip: Practise on public memory images before a real case. MemLabs on GitHub, CyberDefenders and TryHackMe all have free memory forensics challenges.
Disk forensics tells you what was left behind. Memory forensics tells you what was happening at that moment.