DFIR Bootcamp
Digital Forensics & Incident Response — from evidence handling fundamentals to advanced memory forensics, cloud IR, and malware triage. Global curriculum, entirely free tools.
Digital forensics is a scientific discipline. Every action you take on evidence must be documented, justified, and reproducible. If you cannot explain exactly what you did, in what order, and why — your findings may be challenged or rejected entirely. Courts, HR investigations, and regulatory bodies all require that evidence collection follows a documented, defensible process.
The cardinal rule is never work on original evidence. Every time you open a file on a live system, the operating system modifies timestamps, writes to cache, and potentially overwrites deleted data that could have been recovered. You must acquire a forensic image first, verify its integrity, and work exclusively on the image.
2. Preservation: Prevent evidence from changing. For volatile data (RAM, running processes, network connections) — capture it immediately because it will disappear when the system powers off. For non-volatile data (disk) — image it before any other action.
3. Collection: Acquire the evidence according to the order of volatility. RAM first (most volatile), then running processes and network state, then disk. Hash everything at acquisition and verify the hash after acquisition.
4. Examination: Process the evidence using validated forensic tools. Document every tool, every version, every command run. The output of your examination is the raw data from which you draw conclusions.
5. Analysis: Interpret the examination findings. Connect events across different evidence sources to reconstruct the timeline. Answer the investigative questions: What happened? When? Who did it? How?
6. Reporting: Write findings in a format appropriate to the audience — technical appendix for IR teams, executive summary for management, court-ready report for legal proceedings.
2. Routing table, ARP cache, process table, kernel statistics — changes every second
3. Memory (RAM) — gone when power off
4. Temporary file systems (/tmp, Windows %TEMP%)
5. Disk — persistent but can be overwritten
6. Remote logging and monitoring data
7. Physical configuration and network topology
8. Archival media (backups, tape)
dd with hash verification:
dd if=/dev/sdb bs=512 conv=noerror,sync | tee disk.img | sha256sum > disk.img.sha256 sha256sum -c disk.img.sha256
When a user "deletes" a file, almost nothing is deleted. The operating system simply marks the space as available for reuse and removes the file's directory entry. The data itself remains on disk until it is overwritten by new data — which may never happen. Understanding this at a deep level is what allows forensic analysts to recover evidence that suspects believe they have destroyed.
Windows uses NTFS (New Technology File System) on virtually every modern system. Every file on an NTFS volume is an entry in the Master File Table (MFT). The MFT is a database where each record contains: the filename, file size, timestamps (four of them — Created, Modified, MFT Modified, and Accessed, abbreviated MACB), file attributes, and pointers to the actual data on disk.
When a file is deleted, its MFT entry is marked as available but the data remains. The MFT entry itself may persist for a long time — sometimes forever if no new file takes that exact record number. This means you can recover not just the file content but also its original name, path, and timestamps from the MFT even after the file is "deleted."
$LogFile: NTFS transaction log. Records file system transactions for crash recovery. Contains evidence of file operations even after deletion and after the MFT entry is reused.
$UsnJrnl (USN Journal): The change journal. Records every file create, modify, rename, delete, and security change. Even when the MFT entry and the LogFile no longer have evidence of a file, the USN Journal may. Critical for detecting anti-forensic file deletion tools.
Alternate Data Streams (ADS): NTFS allows multiple data streams per file. Attackers use ADS to hide executable code inside innocent-looking files.
dir /r reveals them. Zone.Identifier is a legitimate ADS Windows creates on downloaded files.$Recycle.Bin: The Recycle Bin stores deleted files with their original path and deletion timestamp. $I files contain metadata, $R files contain the actual deleted content.
M — Modified: When the file content was last changed.
A — Accessed: When the file was last read (unreliable — often disabled for performance).
C — Created: When the file was created on this volume (copying a file creates a new Created timestamp — the original creation time is not preserved).
B — MFT Modified ($MFT Changed): When the MFT entry itself was last modified.
Timestomping is when an attacker modifies the $STANDARD_INFORMATION timestamps to make malware look like it has been on the system for years. The defence: $FILE_NAME timestamps are much harder to modify and often reveal the truth. A discrepancy between the two sets is itself evidence of tampering.
MFTECmd.exe -f "C:\$MFT" --csv C:\dfir_output --csvf mft_output.csv
MFTECmd.exe -f "C:\$Extend\$UsnJrnl:$J" --csv C:\dfir_output --csvf usn_output.csvFilter for "FileDelete" reason. What was deleted in the last 24 hours?
dir /r C:\Windows\Temp. Document any ADS you find.The Windows Registry is a hierarchical database that stores configuration for virtually every aspect of Windows — installed software, user preferences, hardware configuration, network settings, and critically for forensics: evidence of user activity, program execution, and attacker persistence. Attackers love the registry because it is invisible to most users and survives reboots.
The registry is split across multiple hive files on disk. Understanding which hive contains which information is fundamental: SYSTEM hive contains hardware, services, and network configuration. SOFTWARE hive contains installed applications and OS settings. NTUSER.DAT (per user) contains user-specific settings and is the richest source of user activity evidence. USRCLASS.DAT (per user) contains shell and COM settings including ShellBags.
HKCU\Software\Microsoft\Windows\CurrentVersion\Run — runs at user login
HKLM\Software\Microsoft\Windows\CurrentVersion\Run — runs for all users
HKLM\System\CurrentControlSet\Services — services (malware installs as service)
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon — userscripts
User Activity:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs — recently opened documents
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU — files opened/saved via dialog
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths — paths typed in Explorer
Program Execution:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist — GUI app execution history (ROT-13 encoded)
HKLM\System\CurrentControlSet\Control\Session Manager\AppCompatCache (ShimCache) — application execution on the system
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU — commands run via Run dialog
USB Connection History:
HKLM\System\CurrentControlSet\Enum\USBSTOR — every USB device ever connected
HKLM\System\CurrentControlSet\Enum\USB — USB bus enumeration
HKLM\Software\Microsoft\Windows NT\CurrentVersion\EMDMgmt — volume serial numbers
Network Connections:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles — network profiles (SSID, connection type, dates)
RECmd.exe -d C:\Users\[username] --bn BatchExamples\Kroll_Batch.reb --csv C:\dfir_output