This guide provides instructions for setting up a malware analysis lab using VMware, with two virtual machines: one running Kali Linux for offensive tools and analysis, and the other running Windows for testing and analyzing malware samples.
- System Requirements
- VMware Installation
- Setting up Kali Linux
- Setting up Windows
- Networking Configuration
- Snapshots for Analysis
- Important Tips
Before setting up the lab, ensure your system meets the following requirements:
- Host Operating System: Windows 10 or Linux
- RAM: Minimum 16 GB (8 GB per VM recommended)
- Disk Space: At least 100 GB free
- Processor: Multi-core processor with virtualization support (Intel VT-x or AMD-V)
- Software: VMware Workstation or VMware Player
- Go to the VMware website and download VMware Workstation or Player.
- Run the installer and follow the on-screen instructions.
- Accept the license agreement.
- Choose a default install location.
- Complete the installation and reboot your system if necessary.
- Visit the Kali Linux website and download the latest ISO image.
- Choose the 64-bit installer.
- Open VMware Workstation or Player.
- Click Create a New Virtual Machine.
- Select Installer disc image file (ISO) and browse to the downloaded Kali ISO.
- Choose Linux as the guest OS and select Debian 10.x 64-bit as the version.
- Memory: Set at least 4 GB (recommended 8 GB).
- Processors: Assign 2 cores for better performance.
- Disk: Allocate at least 40 GB of disk space for Kali.
- Start the VM and follow the on-screen installation instructions.
- Configure network settings (select Host-Only or NAT).
- Set up a root password during installation.
Once installed, update Kali using the following commands:
sudo apt update
sudo apt upgrade
Install additional tools required for analysis:
sudo apt install yara
- Download a legitimate Windows 10 or 11 ISO from Microsoft's website here.
- If you already have a Windows license key, you can activate it later.
- Open VMware and create a new virtual machine.
- Select Installer disc image file (ISO) and browse to the Windows ISO.
- Choose Windows 10 or Windows 11 as the guest OS.
- Memory: Set at least 4 GB.
- Processors: Assign 2 cores for Windows to run smoothly.
- Disk: Allocate 60 GB of disk space.
- Start the VM and follow the installation process.
- Choose Custom Installation and allocate disk space.
- Once installed, configure network settings (choose Host-Only or NAT).
Install the following malware analysis tools:
- Process Hacker
- PEiD
- ApateDNS (for DNS redirection)
Make sure to disable any automatic updates and antivirus features to prevent interference during analysis.
This allows your VMs to communicate with each other and your host machine, but prevents them from accessing the internet.
- Go to VMware settings for each VM and select Host-Only under network adapters.
Use NAT mode when you need internet access from your VMs (for downloading tools or samples).
- Configure your Kali Linux VM to use NAT mode for external access.
For safer malware analysis, keep your VMs isolated from both the host and the internet by using an isolated virtual network.
Before starting malware analysis, take a snapshot of both the Kali and Windows VMs.
- In VMware, right-click your Kali VM and select Snapshot > Take Snapshot.
- Name it something like Clean Kali.
- Do the same for your Windows VM, naming it Clean Windows.
Taking snapshots allows you to quickly revert to a clean state after completing malware analysis.
- Disable Shared Folders: Ensure shared folders between your host and VMs are disabled to prevent malware from escaping the VM.
- Revert to Snapshot After Each Analysis: Always revert to your clean snapshots after each malware analysis session.
- Use Virtual Network Isolation: When analyzing particularly dangerous malware, ensure your VMs are isolated from both the host and the internet.
- Update Tools Regularly: Keep your analysis tools up-to-date to catch the latest malware techniques.
With this setup, you will have a safe and efficient malware analysis environment using VMware and virtual machines. This lab will allow you to conduct both static and dynamic malware analysis with the right tools and proper isolation for security.
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a Pull Request.