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
1
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
2
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
3
Inspect Partitions and File Systems
Analyze partitions, file systems, and recover deleted files from forensic images:
4
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
5
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
6
Memory Dump Analysis
Volatile memory contains running processes, network connections, encryption keys, and injected code:
7
PCAP Inspection
Network captures reveal communications, exfiltration, and C2 activity:
8
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