In today’s digital landscape, malicious actors increasingly leverage advanced techniques to compromise systems, evade detection, and persist in memory. Traditional disk-based forensics may not always capture volatile evidence such as running processes, network connections, or injected code. This is where memory forensics plays a critical role. By analyzing the contents of system memory (RAM), investigators can uncover malware, hidden processes, encryption keys, and other artifacts that would otherwise vanish after a reboot.
Among the most widely used frameworks for memory forensics is Volatility, an open-source tool that provides deep insight into live memory images. This article explores how Volatility can be applied in real-world investigations, highlighting key techniques and workflows.
Unlike static forensic approaches that focus on persistent data on disk, memory forensics offers several advantages:
Volatility is a Python-based framework that supports a wide range of plugins to parse memory images from Windows, Linux, Mac, and Android systems. Its modular design allows investigators to extract evidence from different memory structures and correlate findings.
Key features:
The first step is capturing a raw dump of RAM. Tools such as FTK Imager, DumpIt, or LiME (Linux Memory Extractor) can be used. It’s critical to ensure the acquisition is forensically sound and verified via hashing.
Example:
md5sum memdump.raw
Before running analysis, Volatility requires specifying the OS profile of the memory dump.
volatility -f memdump.raw imageinfo
This plugin suggests possible profiles, e.g., Win7SP1x64.
A common first step is checking for suspicious or hidden processes:
volatility -f memdump.raw --profile=Win7SP1x64 pslist
For hidden processes, compare with:
volatility -f memdump.raw --profile=Win7SP1x64 psscan
To spot injected malware or anomalous libraries:
volatility -f memdump.raw --profile=Win7SP1x64 dlllist -p [PID]
Handles can reveal hidden files, registry keys, or sockets:
volatility -f memdump.raw --profile=Win7SP1x64 handles -p [PID]
For live attack detection:
volatility -f memdump.raw --profile=Win7SP1x64 netscan
This provides active TCP/UDP connections, listening ports, and owning processes.
Dumping executables for malware analysis:
volatility -f memdump.raw --profile=Win7SP1x64 procdump -p [PID] -D output/
Dumping registry hives to recover system and user settings:
volatility -f memdump.raw --profile=Win7SP1x64 hivelist
Volatility includes plugins to identify stealth techniques like DKOM (Direct Kernel Object Manipulation):
volatility -f memdump.raw --profile=Win7SP1x64 malfind
Ensure written authorization (PO, warrant, incident response agreement). Only analyse images you are allowed to.
Immediately compute hashes for original image and working copies:
sha256sum memdump.raw > memdump.raw.sha256
md5sum memdump.raw > memdump.raw.md5
Record acquisition method, date/time (UTC), operator, host where image is stored — for chain of custody.
file memdump.rawls -lh
memdump.raw
strings
memdump.raw | head -n 100volatility -f memdump.raw imageinfo and volatility -f memdump.raw --info to inspect plugin availability.pslist — List processespsscan — Scan for hidden/terminated processespstree — Process parent/child treepsxview — Cross-check hidden processescmdline — Process command-line argumentsconsoles — Command historyenviron — Environment variablesgetsids -p [PID] — Get process SIDsdlllist -p [PID] — DLLs loaded by processldrmodules — Loaded/unloaded DLLshandles -p [PID] — Open handles (files, registry, sockets)malfind — Detect injected code (anonymous RWX regions)hollowfind — Detect process hollowingapihooks — User-mode API hooksssdt — Kernel SSDT hooksmodules — Loaded driversmodscan — Scan for hidden driversdriverirp — Driver IRP activitynetscan — Active and recently closed network connectionsconnections — Active TCP connectionsconnscan — Closed connectionssockets — Open socketshivelist— Registry hives in memoryprintkey -K [KeyPath]— Print registry key contentsuserassist— Program execution historyshellbags— Folders accessedshimcache— App compatibility cachefilescan— Scan file objectsdumpfiles -Q [offset] -D ./out/— Dump file at offsetprocdump -p [PID] -D ./out/— Dump process executablememdump -p [PID] -D ./out/— Dump process memoryclipboard— Extract clipboard contentsscreenshot— Capture GUI hashdump— Dump password hasheslsadump— Extract LSASS secrets (if possible)cachedump— Cached domain logonsmimikatz— Extract credentials (if plugin available)timeliner— System-wide timeline from memory artifactsmftparser— Parse NTFS MFT (use if disk image available)prefetchparser— Analyze prefetch fileswinpmem.exe -o memdump.raw — Immediately hash output.volatility -f memdump.raw imageinfovolatility -f memdump.raw kdbgscan--profile (test with pslist for sensibility).volatility -f memdump.raw --profile=WinX pslistvolatility -f memdump.raw --profile=WinX psscanvolatility -f memdump.raw --profile=WinX psxviewvolatility -f memdump.raw --profile=WinX pstreepsscan but not pslist.dlllist -p [PID]handles -p [PID]cmdline -p [PID]procdump -p [PID] -D ./out/ (dump executable)memdump -p [PID] -D ./out/ (dump memory)strings, YARA, static analysis, and dynamic analysis in a sandbox on dumped binaries.malfindapihooksssdtmodscan / modulesnetscan (fast; includes owning PID)connscan / socketshivelistprintkey -K "Software\\Microsoft\\Windows\\CurrentVersion\\Run"userassist, shimcache, shellbags — persistence and user activity indicators.lsadump, hashdump, cachedump, mimikatz (if plugin available).filescandumpfiles -Q [offset] -D ./extracted/clipboard, screenshottimelinerimageinfo is inconclusive, try candidate profiles and verify with pslist.malfind gives offsets — always dump and analyze the region it flags.netscan for quick network triage (shows owning PID and recent closed connections).linux_pslist — Running processeslinux_psscan — Scan for hidden/terminated processeslinux_pstree — Parent–child process treelinux_psaux — Process command lineslinux_proc_maps -p [PID] — Process memory mapslinux_proc_maps_rb -p [PID] — Alternate memory mapslinux_library_list -p [PID] — Shared librarieslinux_check_modules — Check loaded kernel moduleslinux_lsmod — List kernel moduleslinux_check_syscall — Check syscall table integritylinux_enumerate_files -p [PID] — Enumerate file descriptors
linux_lsof — Open files
linux_netstat — Network sockets
linux_ifconfig — Network interfaces
linux_route_cache — Routing tablelinux_passwd — Dump /etc/passwdlinux_shadow_hashes — Extract /etc/shadow hasheslinux_hashdump — User hasheslinux_bash — Bash command historylinux_bash_env — Bash environment variableslinux_bash_hash — Bash hash tablelinux_mount — Mounted filesystemslinux_dmesg — Kernel dmesg logslinux_check_afinfo — Check socket operationsinsmod lime.ko "path=/root/memdump.lime format=raw"sha256sum memdump.lime > memdump.lime.sha256).volatility -f memdump.raw imageinfovolatility -f memdump.raw banner (kernel version, distro)--profile; most linux_* plugins work directly.linux_pslist, linux_psscan, linux_pstree, linux_psauxlinux_proc_maps -p [PID] / linux_proc_maps_rb -p [PID]linux_library_list -p [PID]memdump -p [PID] -D ./out/rwx mappings and libraries from /tmp or /dev/shm.linux_lsoflinux_enumerate_files -p [PID]linux_filescan + dumpfiles -Q [offset] -D ./extracted/linux_netstat, linux_ifconfiglinux_check_afinfo (hidden sockets)linux_route_cache (routing anomalies)linux_lsmodlinux_check_moduleslinux_check_syscall/tmp, syscall hooks.linux_bash, linux_bash_env, linux_bash_hashlinux_passwd, linux_shadow_hashes, linux_hashdumpBEGIN RSA PRIVATE KEY).strings memdump.raw | egrep -i "cron|systemd|rc.local|@reboot"linux_filescan + dumpfiles.linux_yarascan --yara-rules rules.yarstrings proc_[PID].dmp | egrep -i "http|wget|curl|/tmp|/dev/shm"timelinerlsmod) to a baseline.netfilter or syscalls — check linux_check_syscall early.volatility --info to confirm.rwx memory regions.psscan but missing from pslist.volatility -f memdump.raw [os]_yarascan --yara-rules rules.yarstrings + egrep is a fast initial IOC hunt:strings memdump.raw | egrep -i "http|https|@[0-9]+|/tmp|/dev/shm|ssh-rsa|BEGIN RSA PRIVATE KEY"psscan vs pslist, modscan/lsmod, and syscall checks.volatility --info.Memory forensics bridges the gap between traditional static analysis and dynamic live response. With Volatility, investigators gain visibility into volatile evidence, detect stealth malware, and reconstruct attacker behavior. In real-world cyber defense, memory analysis is no longer optional—it’s a necessity.
← Back to Homepage