LX0.10 Building Your Linux IR Lab
Building Your Lab Environment: Practice Before the Incident
Why You Need a Lab
Every technique in this course is taught with hands-on exercises. You cannot learn to investigate SSH brute force by reading about it — you need to see the auth.log entries, run the grep commands, and trace the attacker’s session through the evidence. You cannot learn memory forensics by studying Volatility 3 documentation — you need a memory dump from a system with running processes, active network connections, and a loaded rootkit module.
The lab provides the environment where you practice these techniques safely, without risk to production systems and without needing a real compromised server. The lab VMs simulate the Northgate Engineering infrastructure described in this course. The scenarios are pre-built — you do not need to compromise the systems yourself (though LX16 includes tabletop exercises where you simulate the attacker’s actions to generate realistic evidence).
Lab Architecture
The minimum lab requires a forensic workstation (your analysis machine) and at least one Linux target VM (the system you investigate). The recommended lab adds additional VMs to simulate the Northgate Engineering infrastructure for multi-system scenarios.
Forensic Workstation: Your primary analysis machine. This can be a dedicated laptop, a desktop, or a VM. It runs the analysis tools (Sleuth Kit, Volatility 3, plaso, Wireshark) and stores the collected evidence. The workstation should not be the same machine as the target — you analyze evidence on the workstation, not on the compromised system.
Requirements: Ubuntu 22.04 LTS or later (the distribution used for tool examples in this course), 16GB RAM minimum (Volatility 3 and plaso are memory-intensive), 200GB free disk space (for disk images, memory dumps, and timeline databases), Python 3.10+ (for Volatility 3 and plaso).
| |
Target VMs — Northgate Engineering Infrastructure:
WEBSRV-NGE01 (Web Server): Ubuntu 22.04 LTS. Nginx reverse proxy + PHP-FPM backend. Install a deliberately vulnerable web application for LX5 scenarios (DVWA, bWAPP, or a custom PHP application). Configure Nginx access and error logs in the default locations. Install auditd but do not configure comprehensive rules (to simulate a typical production server that has auditd installed but not fully deployed). This VM is the primary target for LX5 (Web Application Compromise), LX6 (Privilege Escalation), and LX8 (Cryptomining).
| |
BASTION-NGE01 (Jump Host): Ubuntu 22.04 LTS. SSH server with both password and key authentication enabled (the misconfiguration that enables the LX4 brute force scenario). Create user accounts matching the Northgate Engineering names (j.morrison, s.chen, a.patel, r.williams, m.thompson). Set a deliberately weak password on one account (the account the attacker will brute force). Configure fail2ban with a high threshold (100 attempts) to simulate a poorly configured brute force protection.
| |
DBSRV-NGE01 (Database Server): Ubuntu 22.04 LTS. PostgreSQL 15. Configure with customer sample data. This VM is the lateral movement target in LX11 — the attacker pivots from the bastion or web server to the database server to access customer records.
K8S-NGE (Kubernetes Cluster): For LX9 (Container Compromise) scenarios. The simplest approach: install Minikube or k3s on a single VM to create a single-node Kubernetes cluster. Deploy a vulnerable container (an old Nginx version, a misconfigured Redis instance, or a container with an exposed Docker socket mount). Enable Kubernetes audit logging.
| |
Using Cloud Free Tiers for Lab Infrastructure
If you do not have a machine powerful enough to run multiple VMs locally, cloud free tiers provide sufficient resources for lab exercises:
AWS Free Tier: 750 hours/month of t2.micro EC2 instances (1 vCPU, 1GB RAM) for the first 12 months. Sufficient for BASTION-NGE01 and WEBSRV-NGE01. The t2.micro is too small for memory forensics exercises (LX12 requires a target with at least 2GB RAM) — use a t3.small for those exercises and terminate it when done.
Azure Free Tier: 750 hours/month of B1s VMs (1 vCPU, 1GB RAM) for the first 12 months. Same usage pattern as AWS. Azure also provides $200 credit for the first 30 days — use this for larger VMs during initial lab setup.
GCP Free Tier: e2-micro instances (0.25 vCPU shared, 1GB RAM) are always free. Supplement with the $300 credit for new accounts for larger instances during scenario exercises.
The cloud lab has an additional benefit: it provides the cloud-specific evidence sources (CloudTrail, Activity Log, Cloud Audit Logs) that you need for LX10 (Cloud VM Compromise) exercises. A purely local VM lab does not generate cloud audit trails.
Sample Data and Pre-Built Scenarios
Each scenario module (LX4–LX13) includes a pre-built evidence package that you can download and analyze on your forensic workstation without generating the evidence yourself. The evidence packages contain: UAC triage output from the compromised system, relevant log file excerpts, disk image segments (for filesystem forensics exercises), and memory dumps (for memory forensics exercises). These packages are available to premium subscribers.
For free-tier modules (LX0–LX1), the exercises use your own lab VMs and real-time commands. The lab setup described in this subsection provides everything needed for the free-tier exercises and for the premium scenario exercises where you want to generate evidence yourself rather than using the pre-built packages.
Connecting to the M365 Developer Tenant
If you have completed or are enrolled in the Practical IR: Windows and M365 course, your M365 developer tenant (from developer.microsoft.com) can be connected to the Linux lab to create cross-platform investigation scenarios. Install the Azure Arc agent on BASTION-NGE01 to register it as a hybrid server in Entra ID. Configure the Azure Monitor Agent (AMA) to forward syslog and auditd logs to a Log Analytics workspace. This creates the cross-environment evidence correlation capability described in LX10 and LX14 — Linux investigation findings appearing in the same Sentinel workspace as your M365 investigation data.
| |
This connection is optional. Every exercise in this course can be completed with local tools and local log files. The Azure Arc integration adds the cross-platform dimension for investigators who work in hybrid environments.
Try it: Set up the minimum lab: one forensic workstation VM (or use your host machine) and one BASTION-NGE01 target VM. Install the forensic tools on the workstation using the script above. Create the BASTION-NGE01 VM with SSH and the Northgate user accounts. SSH from the workstation to the bastion. Run ps auxf, ss -tlnp, and last -20. You have just completed your first evidence collection in the lab environment. Every subsequent exercise in this course builds on this foundation.
Beyond This Investigation
The lab VMs are used throughout the course. LX1 uses the lab for evidence collection practice. LX4 uses BASTION-NGE01 for the SSH brute force scenario. LX5 uses WEBSRV-NGE01 for the web application compromise. LX9 uses K8S-NGE for container forensics. LX12 uses any of the target VMs for memory acquisition and analysis practice. Build the minimum lab now — you will expand it as you progress through the course.
Worked artifact — Lab setup verification checklist:
Run each verification command after setup. Every failure is a gap to fix before the next exercise.
Forensic workstation: ☐
fls -V→ Sleuth Kit version displayed ☐vol -h | head -1→ Volatility 3 help displayed ☐log2timeline.py --version→ plaso version displayed ☐dc3dd --version→ dc3dd version displayed ☐ls ~/tools/uac/uac→ UAC script present ☐ls ~/tools/lime/src/lime.h→ LiME source presentTarget VM (BASTION-NGE01): ☐ SSH accessible from workstation ☐ User accounts created (j.morrison, s.chen, a.patel, r.williams, m.thompson) ☐ auth.log generating events ☐ auditd installed (rules optional for now)
Myth: “You need expensive infrastructure to practice Linux forensics.”
Reality: The minimum lab is one forensic workstation (your laptop or a VM) and one target VM. Both can run on a single machine with 16GB RAM using VirtualBox or VMware. Cloud free tiers (AWS, Azure, GCP) provide additional VMs at no cost for the first 12 months. Every tool used in this course is free and open-source. The only cost is your time to set it up — and that time is an investment that pays off the first time you respond to a real incident with practiced hands instead of theoretical knowledge.
Troubleshooting: common lab setup issues
Volatility 3 fails to install. Check Python version — requires 3.8+. Use a virtual environment: python3 -m venv ~/tools/vol3 && source ~/tools/vol3/bin/activate && pip install volatility3.
LiME compilation fails. Kernel headers not installed. Run sudo apt install linux-headers-$(uname -r) on the target system.
Cannot SSH from workstation to target VM. Check: is SSH server running on the target (sudo systemctl status sshd)? Is the firewall blocking port 22 (sudo ufw status)? Are the VMs on the same network?
Check your understanding:
- What is the minimum lab configuration needed to complete the free-tier exercises (LX0 and LX1)?
- Why must LiME be compiled for the target system’s exact kernel version, and what is the consequence of not having a pre-compiled module when an incident occurs?
- You want to practice LX10 (Cloud VM Compromise) scenarios. Why can’t a purely local VM lab provide the complete exercise environment?
- What is the purpose of connecting a lab VM to Azure Arc, and for which modules does this connection provide value?
You're reading the free modules of this course
The full course continues with advanced topics, production detection rules, worked investigation scenarios, and deployable artifacts. Premium subscribers get access to all courses.