A professional Digital Forensics & Incident Response (DFIR) Home Lab built using
Windows VM + Ubuntu (WSL) with industry-recognized forensic tools.
- π― Objective
- π§± Lab Architecture
- π Prerequisites
- π Part 1: Hypervisor Setup
- π» Part 2: Windows VM Configuration
- π§ Part 3: WSL & Ubuntu Setup
- βοΈ Part 4: Environment Hardening
- π§ Part 5: Tool Installation
- πΈ Part 6: Baseline Snapshot
- π Part 7: Validation & Testing
- π Use Cases & Next Steps
- π Troubleshooting
- π Resources
β οΈ Disclaimer- π¨βπ» Author
Build a dedicated forensic workstation capable of performing:
β
Windows Artifact Analysis (Registry, Event Logs, Prefetch, etc.)
β
Remote Login Investigations (RDP, SSH, VPN sessions)
β
Memory & Disk Forensics (RAM dumps, disk images)
β
Timeline Creation (Super timeline analysis)
β
Log Analysis (Windows Event Logs, Sysmon, IIS)
β
Malware & Document Inspection (Static analysis, macro extraction)
βββββββββββββββββββββββββββββββββββββββββββ
β Host Machine (Physical) β
β Windows/Linux/macOS + 16GB RAM β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β VirtualBox 7.x β
β (Type-2 Hypervisor) β
ββββββββββββ¬βββββββββββ
β
ββββββββββββΌβββββββββββββββββββββββ
β Windows Server 2019 / Win10 β
β 100GB Disk | 4GB RAM | 2 CPU β
ββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β WSL1 + Ubuntu β
β 20.04 LTS β
ββββββββββββ¬βββββββββββ
β
ββββββββββββΌβββββββββββββββββββββββ
β DFIR Tool Stack β
β Volatility | KAPE | FTK | ETC β
βββββββββββββββββββββββββββββββββββ
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 8 GB | 16 GB+ |
| Storage | 150 GB free | 250 GB+ SSD |
| CPU | Dual-core | Quad-core with VT-x/AMD-V |
| Network | Internet connection for downloads | β |
- β VirtualBox 7.0+ (Download)
- β Windows Server 2019 ISO (Evaluation) OR Windows 10/11 Enterprise
- β Ubuntu 20.04 LTS (Download)
- Basic understanding of Windows administration
- Familiarity with command line (PowerShell, Bash)
- General cybersecurity concepts
-
Download VirtualBox:
- Visit: https://www.virtualbox.org/wiki/Downloads
- Download version for your host OS (Windows/macOS/Linux)
-
Install with Extension Pack:
# Windows: Run installer as Administrator # Linux example: sudo apt install virtualbox virtualbox-ext-pack
-
Verify Installation:
- Open VirtualBox Manager
- Check:
File β Preferences β Extensions(Extension Pack should be listed)
File β Preferences β General:
Default Machine Folder: C:\VirtualMachines (or custom path)
Network β NAT Networks:
Click [+] β Create "NatNetwork"
Network CIDR: 10.0.2.0/24
Enable DHCP
-
Launch VirtualBox β Click "New"
-
Basic Configuration:
Name: DFIR-Workstation Type: Microsoft Windows Version: Windows 2019 (64-bit) or Windows 10 (64-bit) -
Memory Allocation:
RAM: 4096 MB (4GB minimum) -
Hard Disk:
β Create a virtual hard disk now Type: VDI (VirtualBox Disk Image) Storage: Dynamically allocated Size: 100 GB -
Click Create
Right-click VM β Settings:
Motherboard:
Boot Order: Optical β Hard Disk
β Enable EFI (if using modern Windows ISO)
Processor:
CPU: 2-4 cores
β Enable PAE/NX
Controller: IDE
β Empty β Click disk icon β Choose Windows ISO
Controller: SATA
β Use Host I/O Cache
Adapter 1:
β Enable Network Adapter
Attached to: NAT
Video Memory: 128 MB
Graphics Controller: VMSVGA
β Enable 3D Acceleration
Click [+] icon:
Folder Path: C:\Shared (create on host first)
Folder Name: Shared
β Auto-mount
β Make Permanent
-
Start the VM (Click "Start")
-
Windows Installation:
- Select: Windows Server 2019 Standard (Desktop Experience) or Windows 10 Pro
- Installation Type: Custom: Install Windows only
- Select unallocated space β Next
- Wait for installation (15-30 minutes)
-
Initial Setup:
Administrator Password: Create strong password Network: Select "Private Network" -
Windows Updates:
# Run Windows Update Settings β Update & Security β Windows Update β Check for updates
Inside the VM:
-
VirtualBox Menu:
Devices β Insert Guest Additions CD Image -
Run Installer:
Open File Explorer β CD Drive (VirtualBox Guest Additions) Run: VBoxWindowsAdditions.exe Install with default options Reboot VM -
Enable Features:
Devices β Shared Clipboard β Bidirectional Devices β Drag and Drop β Bidirectional
Open PowerShell as Administrator:
# Enable WSL Feature
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
# Reboot when prompted
Restart-Computer# After reboot, open PowerShell as Admin again
wsl --set-default-version 1Method 1: Microsoft Store (Easiest)
- Open Microsoft Store
- Search: "Ubuntu 20.04 LTS"
- Click "Get" β "Install"
- Launch Ubuntu from Start Menu
- Create UNIX user:
Username: dfir Password: [create password]
Method 2: Manual Installation
# Download Ubuntu 20.04 appx
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu2004.appx -UseBasicParsing
# Install
Add-AppxPackage .\Ubuntu2004.appx
# Launch
ubuntu2004.exe
# Create user# Check WSL version
wsl --list --verbose
# Should show:
# NAME STATE VERSION
# * Ubuntu-20.04 Running 1Windows:
# Set to UTC
Set-TimeZone -Id "UTC"
# Verify
Get-TimeZoneUbuntu (WSL):
sudo timedatectl set-timezone UTC
timedatectlShow Hidden Files & Extensions:
- Open File Explorer
- Click "View" tab
- Check:
- β File name extensions
- β Hidden items
Registry Method:
# Show hidden files
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Hidden" -Value 1
# Show file extensions
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Value 0
# Restart Explorer
Stop-Process -Name explorer -Force# Create directories
New-Item -ItemType Directory -Path "C:\Cases"
New-Item -ItemType Directory -Path "C:\Tools"
New-Item -ItemType Directory -Path "C:\Evidence"
New-Item -ItemType Directory -Path "C:\Reports"
# Verify
Get-ChildItem C:\ | Where-Object { $_.PSIsContainer }Add Exclusions (Prevent tool blocking):
# Open PowerShell as Administrator
# Add folder exclusions
Add-MpPreference -ExclusionPath "C:\Cases"
Add-MpPreference -ExclusionPath "C:\Tools"
Add-MpPreference -ExclusionPath "C:\Evidence"
# Verify exclusions
Get-MpPreference | Select-Object -ExpandProperty ExclusionPathDisable Cloud Protection (Optional for lab):
Windows Security β Virus & threat protection β
Manage settings β
Cloud-delivered protection: OFF
Automatic sample submission: OFF
Open Ubuntu terminal:
# Update system
sudo apt update && sudo apt upgrade -y
# Install prerequisites
sudo apt install -y python3 python3-pip git build-essential# Install Volatility3
pip3 install volatility3
# Install additional dependencies
pip3 install capstone yara-python pycryptodome
# Verify installation
vol.py -h
# Create alias for easier access
echo "alias vol='vol.py'" >> ~/.bashrc
source ~/.bashrcTest Volatility:
# Download sample memory image (optional)
mkdir ~/samples
cd ~/samples
# Use your own memory dumps or download from:
# https://github.com/volatilityfoundation/volatility/wiki/Memory-Samples# Add GIFT PPA
sudo add-apt-repository -y ppa:gift/stable
sudo apt update
# Install Plaso tools
sudo apt install -y plaso-tools
# Verify installation
log2timeline.py --version
psort.py --version
pinfo.py --versionTest Plaso:
# Create test timeline
log2timeline.py --storage-file test.plaso /var/log
psort.py -o dynamic -w test_timeline.csv test.plaso# Install oletools
pip3 install -U oletools
# Verify installation
olevba --help
oleid --help# Bulk Extractor (Carving)
sudo apt install -y bulk-extractor
# Sleuth Kit (File system analysis)
sudo apt install -y sleuthkit
# Autopsy dependencies
sudo apt install -y testdisk
# Forensic utilities
sudo apt install -y foremost scalpel binwalk# Download FTK Imager
Start-Process "https://www.exterro.com/ftk-imager"
# Manual Installation:
# 1. Download FTK Imager from Exterro
# 2. Install to C:\Tools\FTK_Imager
# 3. Run as Administrator for first timeAfter Installation:
Right-click FTK Imager β Properties β Compatibility:
β Run this program as an administrator
# Download KAPE
cd C:\Tools
Start-Process "https://www.kroll.com/en/services/cyber-risk/incident-response-litigation-support/kroll-artifact-parser-extractor-kape"
# Extract to C:\Tools\KAPE
# No installation required - portable toolInitial Configuration:
cd C:\Tools\KAPE
# Run gkape.exe (GUI) or kape.exe (CLI)
# Update targets and modules on first run# Download all tools
cd C:\Tools
New-Item -ItemType Directory -Path "C:\Tools\ZimmermanTools"
# Use Get-ZimmermanTools script
Invoke-WebRequest "https://raw.githubusercontent.com/EricZimmerman/Get-ZimmermanTools/master/Get-ZimmermanTools.ps1" -OutFile "Get-ZimmermanTools.ps1"
# Run script
.\Get-ZimmermanTools.ps1 -Dest "C:\Tools\ZimmermanTools"Key Tools Included:
- Timeline Explorer
- Registry Explorer
- ShellBags Explorer
- AmcacheParser
- PECmd (Prefetch)
- JLECmd (Jump Lists)
# Download and install VS Code
winget install -e --id Microsoft.VisualStudioCode
# Or download from: https://code.visualstudio.com/Recommended Extensions:
- Hex Editor
- Rainbow CSV
- Python
- PowerShell
# Install via winget
winget install -e --id Notepad++.Notepad++
# Or download from: https://notepad-plus-plus.org/# Install 7-Zip
winget install -e --id 7zip.7zip
# Or download from: https://www.7-zip.org/# Install Firefox
winget install -e --id Mozilla.Firefox# Download entire suite
cd C:\Tools
New-Item -ItemType Directory -Path "C:\Tools\Sysinternals"
# Download
Invoke-WebRequest "https://download.sysinternals.com/files/SysinternalsSuite.zip" -OutFile "Sysinternals.zip"
# Extract
Expand-Archive -Path "Sysinternals.zip" -DestinationPath "C:\Tools\Sysinternals"
# Add to PATH
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Tools\Sysinternals", [EnvironmentVariableTarget]::Machine)# Install Wireshark
winget install -e --id WiresharkFoundation.Wireshark# Install Python 3.11
winget install -e --id Python.Python.3.11
# Verify installation
python --version
# Install forensic libraries
pip install pefile yara-python volatility3Create verification script:
# Save as C:\Tools\verify_tools.ps1
$tools = @{
"FTK Imager" = "C:\Tools\FTK_Imager\FTK Imager.exe"
"KAPE" = "C:\Tools\KAPE\kape.exe"
"Timeline Explorer" = "C:\Tools\ZimmermanTools\TimelineExplorer\TimelineExplorer.exe"
"7-Zip" = "C:\Program Files\7-Zip\7z.exe"
"VS Code" = "C:\Program Files\Microsoft VS Code\Code.exe"
}
foreach ($tool in $tools.GetEnumerator()) {
if (Test-Path $tool.Value) {
Write-Host "β $($tool.Key) - INSTALLED" -ForegroundColor Green
} else {
Write-Host "β $($tool.Key) - NOT FOUND" -ForegroundColor Red
}
}Run verification:
.\verify_tools.ps1# Clear temporary files
Remove-Item -Path "$env:TEMP\*" -Recurse -Force -ErrorAction SilentlyContinue
# Clear browser caches (if applicable)
# Clear download folder
Remove-Item -Path "$env:USERPROFILE\Downloads\*" -Recurse -Force
# Empty Recycle Bin
Clear-RecycleBin -Force -ErrorAction SilentlyContinue# Optimize system drive
Optimize-Volume -DriveLetter C -Defrag -Verbose# Shut down
Stop-ComputerIn VirtualBox Manager:
- Select DFIR-Workstation VM
- Click β° Menu β Snapshots
- Click "Take" snapshot button
- Name: "Clean_Baseline_DFIR_Lab"
- Description:
Clean installation with all tools installed Date: [Current Date] Windows + WSL + All DFIR Tools - Click OK
Snapshots tab should show:
ββ Clean_Baseline_DFIR_Lab (Current State)
To restore snapshot later:
- Right-click snapshot β "Restore Snapshot"
# Using FTK Imager
# 1. Launch FTK Imager as Administrator
# 2. File β Capture Memory
# 3. Destination: C:\Evidence\memory_test.mem
# 4. β Include pagefile
# 5. Click Capturecd C:\Tools\KAPE
# Collect Windows event logs
.\kape.exe --tsource C: --tdest C:\Evidence\KAPE_Output --target EventLogs --vhdx TestCollectionIn WSL Ubuntu:
# Create super timeline of C drive
sudo log2timeline.py --storage-file C_drive.plaso /mnt/c/Windows/System32/winevt/Logs
# Process timeline
psort.py -o l2tcsv -w timeline_output.csv C_drive.plaso
# View first 20 entries
head -20 timeline_output.csv# Using Registry Explorer (Zimmerman Tools)
cd C:\Tools\ZimmermanTools
# Launch Registry Explorer
.\RegistryExplorer\RegistryExplorer.exe
# Load: C:\Windows\System32\config\SYSTEM-
Windows Event Log Analysis
# Parse Security logs for failed logons Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4625} | Select-Object TimeCreated, Message | Export-Csv C:\Reports\failed_logons.csv
-
Prefetch Analysis
# Parse prefetch files cd C:\Tools\ZimmermanTools .\PECmd.exe -d C:\Windows\Prefetch --csv C:\Reports --csvf prefetch_analysis.csv
-
USB Device History
# Check USBSTOR registry Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\*" | Select-Object FriendlyName, Mfg
-
Memory Analysis with Volatility
# In WSL vol.py -f /mnt/c/Evidence/memory_dump.mem windows.info vol.py -f /mnt/c/Evidence/memory_dump.mem windows.pslist vol.py -f /mnt/c/Evidence/memory_dump.mem windows.netscan -
Super Timeline Analysis
# Create timeline from disk image log2timeline.py --storage-file case001.plaso evidence.dd # Filter for specific date range psort.py -o l2tcsv case001.plaso "date > '2024-01-01 00:00:00'"
-
Malicious Macro Detection
# Analyze Office document olevba suspicious_document.docm oleid suspicious_document.docm
-
Full Disk Forensic Analysis
- Acquire disk image with FTK Imager
- Mount with Arsenal Image Mounter
- Parse with Autopsy
- Timeline with Plaso
- Report findings
-
Ransomware Incident Response
- Memory dump analysis
- File system timeline
- Network connection analysis
- IOC extraction
- Lateral movement detection
-
Insider Threat Investigation
- Browser history forensics
- File access auditing
- USB device tracking
- Email analysis
- Data exfiltration detection
Online Courses:
- SANS FOR500: Windows Forensic Analysis
- TCM Security: Practical Windows Forensics
- 13Cubed YouTube Channel (Highly Recommended)
Practice Datasets:
- Digital Corpora: https://digitalcorpora.org/
- NIST CFReDS: https://cfreds.nist.gov/
- AboutDFIR: https://aboutdfir.com/
Communities:
- r/computerforensics
- DFIR Discord servers
- ForensicFocus forums
Error: "Please enable the Virtual Machine Platform Windows feature"
Solution:
# Force WSL1
wsl --set-default-version 1
# Convert existing distro to WSL1
wsl --set-version Ubuntu-20.04 1Error: "VT-x is not available" or "AMD-V is not available"
Solution:
- Reboot host computer
- Enter BIOS/UEFI (F2/DEL during boot)
- Enable: Intel VT-x or AMD-V
- Enable: Intel VT-d or AMD IOMMU
- Save and reboot
Solution:
# Re-add exclusions
Add-MpPreference -ExclusionPath "C:\Tools"
Add-MpPreference -ExclusionExtension ".exe"
# Verify
Get-MpPreference | Select-Object ExclusionPathSolution:
- Verify Guest Additions installed
- Check VirtualBox Settings β Shared Folders
- Inside VM:
# Mount manually net use Z: \\vboxsvr\Shared
Solution:
# Reset WSL
wsl --unregister Ubuntu-20.04
# Reinstall from Store or manuallySolution:
# Remove and re-add repository
sudo add-apt-repository --remove ppa:gift/stable
sudo add-apt-repository ppa:gift/stable
sudo apt update
sudo apt install plaso-tools -yThis lab is designed for:
- β Educational purposes
- β Authorized security research
- β Professional training
- β Personal skill development
DO NOT:
- β Analyze systems without explicit authorization
- β Use tools for unauthorized access
- β Violate any laws or regulations
- β Perform forensics on production systems without approval
You are responsible for complying with:
- Computer Fraud and Abuse Act (CFAA)
- Local and international laws
- Organizational policies
- Professional ethics
The author assumes NO liability for misuse of this lab.
Ashish Kumar
Cybersecurity | DFIR | SOC Enthusiast
This project is licensed under the MIT License - see the LICENSE file for details.
If you found this lab useful, please consider:
- β Starring this repository
- π Sharing with colleagues
- π¬ Providing feedback via Issues
- π€ Contributing improvements
Last Updated: February 2026
Version: 1.0.0