Malware Lab Setup
Before analyzing a single byte of malicious code, you must establish a secure environment. A proper malware lab isolates dangerous samples from your physical machine and network while providing the tools needed for dissection.
CRITICAL SAFETY WARNING
- NEVER analyze malware on your host operating system.
- NEVER connect your malware lab to your home or production network.
- ALWAYS use a "Host-Only" network adapter to prevent accidental internet access.
- ALWAYS take a clean snapshot before infecting the VM.
1. Virtualization Software
You need a Type-2 hypervisor to run your analysis VMs.
- VMware Workstation Pro / Player: Industry standard, robust networking features. (Recommended)
- VirtualBox: Free and open-source alternative.
2. The Victim Machine: FlareVM
FlareVM is a Windows-based security distribution maintained by Mandiant. It automates the installation of hundreds of reverse engineering tools.
Installation Steps
- Create a Windows 10/11 VM: Install a fresh copy of Windows. Ensure it has at least 60GB disk space and 4GB RAM.
- Disable Windows Defender: This is critical. Defender will delete your tools and samples. Use the FlareVM installer script which handles this, or manually disable Tamper Protection and Real-time protection via Group Policy.
- Download & Run Installer:
(New-Object net.webclient).DownloadFile('https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1',"$HOME\Desktop\install.ps1") Unblock-File .\install.ps1 Set-ExecutionPolicy Unrestricted -Force .\install.ps1 - Wait: The installation can take 1-3 hours and will reboot multiple times.
3. The Gateway: Remnux
Remnux is a Linux toolkit for reverse engineering and analyzing malicious software. It is often used as a gateway to simulate internet services (DNS, HTTP) for the victim machine.
- Download the Remnux Virtual Appliance (OVA file).
- Import it into VMware/VirtualBox.
4. Network Isolation (Host-Only)
To analyze how malware communicates without exposing your network, create a private network between FlareVM and Remnux.
VMware Configuration
- Go to Virtual Network Editor.
- Select a VMnet (e.g., VMnet2) and set it to Host-only.
- Uncheck "Connect a host virtual adapter" (optional, for strict isolation).
- Uncheck "Use local DHCP service" (Remnux will act as DHCP/DNS).
- Set both FlareVM and Remnux network adapters to Custom: VMnet2.
VirtualBox Configuration
- Go to File > Host Network Manager.
- Create a new network. Disable the DHCP Server.
- Go to VM Settings > Network.
- Set "Attached to" to Host-only Adapter.
- Select the network you created.
5. Snapshotting
The Golden Rule