Fileless and memory-resident malware never touches disk, so the memory dump is the only sample you will ever get. This skill covers analyzing malicious code in memory: dumping it cleanly, extracting strings and imports, scanning with YARA, and producing indicators. Work on dumped copies in an isolated lab; memory malware is still malware.
Quick Workflow
- Take the suspicious PID from triage with its evidence.
- Dump the process memory and its executable image.
- Run strings analysis for IPs, URLs, and commands.
- Review imports and loaded modules for injection signs.
- Scan with YARA rules for family identification.
- Extract IOCs: network, file, registry, persistence.
- Write the malware summary for the incident report.
1. Dumping and strings
V="python3 /opt/volatility3/vol.py -f /evidence/memdump.raw"
# Dump the process address space and its mapped files
$V windows.memmap.Memmap --pid 4820 --dump --output-dir /tmp/mal_4820/
$V windows.dumpfiles.DumpFiles --pid 4820 --output-dir /tmp/mal_4820/
ls -la /tmp/mal_4820/ | head -20
# Strings: the fastest IOC source (do this in the isolated lab)
strings -n 6 /tmp/mal_4820/*.dmp > /tmp/mal_4820/strings.txt
grep -E -o 'https?://[^ "]+' /tmp/mal_4820/strings.txt | sort -u | head -20
grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' /tmp/mal_4820/strings.txt | sort -u | head -20
grep -i -E 'powershell|cmd\.exe|wmic|schtasks|reg add' /tmp/mal_4820/strings.txt | sort -u | head -20
Strings give you the malware's intent in minutes: C2 addresses, payload URLs, and the commands it runs. It is the highest-yield step; do it first, every time.
2. Injection and import analysis
V="python3 /opt/volatility3/vol.py -f /evidence/memdump.raw"
# Malfind: injected code sections (the classic memory-malware signal)
$V windows.malfind.Malfind --pid 4820 --dump --output-dir /tmp/malfind/
# DLL list versus loaded modules: unlinked DLLs suggest injection
$V windows.dlllist.DllList --pid 4820 2>/dev/null | head -30
# Handles: what the malware touches (files, keys, mutants)
$V windows.handles.Handles --pid 4820 2>/dev/null | head -30
Malfind hits (executable private memory with no file backing) are the smoking gun for injected code. Dump each hit and run strings on it separately; injected payloads are often cleaner than the host process.
3. YARA scanning and IOC extraction
# Scan the dumped process memory with your YARA rules
yara -r /opt/rules/malware_index.yar /tmp/mal_4820/ 2>/dev/null | head -20
# If no rule hits, write a quick rule from the strings you found
# (unique URL path, mutex name, or PDB path make good anchors)
# IOC summary template
cat > /tmp/mal_4820/iocs.txt <<'EOF'
Network: <IPs, domains, URLs from strings and netstat>
Files: <dropped or touched paths>
Registry: <keys from strings and handles>
Persistence: <mechanism observed or inferred>
Mutexes: <names from strings>
EOF
IOCs go to the incident team immediately, not just into the final report: blocking the C2 domain today matters more than a perfect write-up tomorrow. Mark confidence per IOC (confirmed versus inferred).
Edge cases
- The malware is packed or encrypted in memory. Strings show little; look for the unpacked regions via malfind and analyze those.
- Multiple processes are injected. Map the full injection chain (dropper to injected to C2 process) before writing the summary.
- The dump is partial or the process exited. Analyze what survived; note the gaps explicitly.
- No YARA rules match. The family may be new or custom; the IOCs and behavior summary still have full value.
Escalation
- You need dynamic analysis: detonate the dumped payload in an isolated sandbox, never on the analysis workstation.
- The malware needs reverse engineering: hand the dumped binary to the binary analysis workflow with the memory context attached.
- IOCs must go enterprise-wide: format them for the SIEM and EDR (exact syntax per platform) and confirm ingestion.
Detection and defender view
For defenders, memory malware is why EDR memory scanning and behavioral detection exist: disk controls cannot see it. The IOCs from this analysis feed blocks (network), hunts (behavior), and detections (YARA for memory scanning). The defender's lesson is that "no file on disk" never means "nothing happened"; memory is part of every serious triage.
Key references
- Volatility 3 2.5.2 documentation: Malfind, Memmap, DumpFiles.
- YARA 4.5 documentation.
- MITRE ATT&CK T1055 (Process Injection).
- NIST SP 800-86 (malware analysis guidance).
