| name | performing-memory-forensics-with-volatility3-plugins |
| description | Analyze memory dumps using Volatility3 plugins to detect injected code, rootkits, credential theft, and malware artifacts in Windows, Linux, and macOS memory images. |
| domain | cybersecurity |
| subdomain | malware-analysis |
| tags | ["memory-forensics","volatility3","malware-analysis","incident-response","process-injection","rootkit-detection","dfir"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
Performing Memory Forensics with Volatility3 Plugins
Overview
Volatility3 (v2.26.0+, feature parity release May 2025) is the standard framework for memory forensics, replacing the deprecated Volatility2. It analyzes RAM dumps from Windows, Linux, and macOS to detect malicious processes, code injection, rootkits, credential harvesting, and network connections that disk-based forensics cannot reveal. Key plugins include windows.malfind (detecting RWX memory regions indicating injection), windows.psscan (finding hidden processes), windows.dlllist (enumerating loaded modules), windows.netscan (active network connections), and windows.handles (open file/registry handles). The 2024 Plugin Contest introduced ETW Scan for extracting Event Tracing for Windows data from memory.
Prerequisites
- Python 3.9+ with
volatility3 framework installed
- Memory dump files (
.raw, .dmp, .vmem, .lime)
- Windows symbol tables (ISF files, auto-downloaded)
- Understanding of Windows process memory architecture
- YARA integration for in-memory pattern scanning
Practical Steps
Step 1: Process Analysis for Malware Detection
"""Volatility3-based memory forensics automation for malware analysis."""
import subprocess
import json
import sys
import os
class Vol3Analyzer:
"""Automate Volatility3 plugin execution for malware analysis."""
def __init__(self, dump_path, vol3_path="vol"):
self.dump_path = dump_path
self.vol3 = vol3_path
self.results = {}
def run_plugin(self, plugin, extra_args=None):
"""Execute a Volatility3 plugin and capture output."""
cmd = [
self.vol3, "-f", self.dump_path,
"-r", "json", plugin,
]
if extra_args:
cmd.extend(extra_args)
try:
result = subprocess.run(
cmd, capture_output=True, text=True, timeout=300
)
if result.returncode == 0:
return json.loads(result.stdout)
except (subprocess.TimeoutExpired, json.JSONDecodeError) as e:
print(f" [!] {plugin} failed: {e}")
return None
def detect_process_injection():
()
results = .run_plugin()
injected = []
results:
entry results:
injected.append({
: entry.get(),
: entry.get(),
: entry.get(),
: entry.get(),
: entry.get(, )[:],
})
(
)
.results[] = injected
injected
():
()
pslist = .run_plugin()
psscan = .run_plugin()
pslist psscan:
[]
list_pids = {e.get() e pslist}
scan_pids = {e.get() e psscan}
hidden = scan_pids - list_pids
hidden:
()
entry psscan:
entry.get() hidden:
()
.results[] = (hidden)
(hidden)
():
()
results = .run_plugin()
connections = []
results:
entry results:
conn = {
: entry.get(),
: entry.get(),
: ,
: ,
: entry.get(),
: entry.get(),
}
connections.append(conn)
.results[] = connections
connections
():
()
args = [, (pid)] pid
results = .run_plugin(, args)
dlls = []
results:
entry results:
dlls.append({
: entry.get(),
: entry.get(),
: entry.get(),
: entry.get(),
: entry.get(),
: entry.get(),
})
.results[] = dlls
dlls
():
()
results = .run_plugin(
,
[, rules_path]
)
matches = []
results:
entry results:
matches.append({
: entry.get(),
: entry.get(),
: entry.get(),
: entry.get(),
})
.results[] = matches
matches
():
()
( * )
.detect_process_injection()
.find_hidden_processes()
.analyze_network()
.results
__name__ == :
(sys.argv) < :
()
sys.exit()
analyzer = Vol3Analyzer(sys.argv[])
results = analyzer.full_triage()
(json.dumps(results, indent=, default=))
Validation Criteria
- Memory dump successfully parsed with correct OS profile
- Injected processes detected via malfind with RWX regions
- Hidden processes identified through pslist/psscan comparison
- Network connections reveal C2 communication endpoints
- YARA rules match known malware signatures in memory
- Credential artifacts extracted from lsass process memory
References