Overview
Digital forensics is the practice of collecting, preserving, and analyzing digital evidence. This methodology provides a structured approach applicable to incident response, CTF challenges, and professional investigations.The steps below are not strictly sequential — malware analysis techniques, for example, can be applied independently to any file, memory image, or pcap at any point in the investigation.
Core Forensic Workflow
Image Acquisition and Mounting
Create a forensic image of the target drive or device before doing anything else. This preserves the original evidence.Key tools and techniques:
dd/dcfldd— bit-for-bit disk imagingewfacquire— acquire to E01 (Expert Witness Format)FTK Imager— GUI-based acquisition and verification- Verify integrity with SHA256/MD5 hashes before and after imaging
Malware Analysis
Analyze suspicious files independently of the image if needed. Techniques include:
- Static analysis:
file,strings,binwalk, PE/ELF header inspection - Dynamic analysis: Run in a sandbox (Cuckoo, Any.run, Cape)
- Network analysis: Monitor outbound connections in controlled environment
- YARA rules: Pattern matching for known malware families
Inspect Partitions and File Systems
Analyze partitions, file systems, and recover deleted files from forensic images:
OS-Specific Artifact Analysis
Different operating systems store evidence in different locations:
- Windows: Registry hives, Event Logs, Prefetch, LNK files, SRUM, browser artifacts
- Linux:
/var/log/, bash history,/etc/passwd, cron jobs, systemd journals - Docker: Container layers, volume mounts, runtime logs
- iOS Backups: SQLite databases containing messages, contacts, location data
Deep Inspection of Specific File Types
Suspicious files require type-specific analysis:
- Office documents: Macro extraction with
oledump,oletools - PDFs:
peepdf,pdf-parserfor JavaScript and embedded objects - Images: Steganography tools (
steghide,zsteg,exiftool) - Browser artifacts: History, cookies, cached passwords from Chrome/Firefox/Edge profiles
Memory Dump Analysis
Volatile memory contains running processes, network connections, encryption keys, and injected code:
Anti-Forensic Technique Awareness
Attackers may attempt to cover their tracks. Common anti-forensic techniques include:
- Timestomping — modifying file MAC times
- Log deletion — clearing Windows Event Logs, bash history
- Encryption — LUKS, BitLocker, VeraCrypt volumes
- Steganography — hiding data inside images or audio
- Secure deletion — overwriting free space
- Living-off-the-land — using built-in OS tools to avoid dropping binaries
Key Forensic Areas
Windows Forensics
Registry analysis, Event Log parsing, Prefetch files, browser artifacts, LNK files, and NTFS artifacts like
$MFT, $LogFile, and VSS shadow copies.Linux Forensics
Log files in
/var/log/, bash/zsh history, cron jobs, systemd journals, SSH authorized keys, and /proc artifacts.Memory Analysis
Process listings, network connections, injected shellcode, encryption keys in memory, and credential material using Volatility.
PCAP Analysis
Protocol dissection, credential extraction, C2 traffic identification, DNS tunneling detection, and file carving from network streams.
Docker Forensics
Container layer analysis, volume inspection, Docker daemon logs, and runtime configuration artifacts.
Browser Artifacts
History, downloads, cookies, cached credentials, extensions, and session data from major browsers.