How to Build an Isolated Virtual Lab for Cybersecurity Testing: Step-by-Step Guide
Lab Setup Document: Building a Virtual Lab Environment
Course: Cyber Security Lab / Module 1
Objective: To establish a secure, isolated virtualized environment for penetration testing and vulnerability assessments.
Part 1: Virtual Network Architecture & Component Mapping
To evaluate security compliance safely without risking infrastructure degradation or triggering production alerts, an isolated local virtual environment was provisioned using VMware Workstation Pro. The architecture segregates the attacking asset, a known vulnerable target framework, and enterprise target client operating systems onto a unified host-only subnet mask structure.
Lab Host Configuration Metrics
The following structural table maps the components verified within the isolated virtual network environment:
| VM Host Name | Operating System | Version / Release | Assigned IP Address | Default User Account | Lab Role Profile |
| Windows 10 Pro | Windows 10 | 150.1.7.100 | lonovo | Main Windows Host Machine on which VMWare is installed. | |
| Pentesters | Kali Linux | 2026.1 | 150.1.7.101 | root / kali | Attacker OS |
| Metasploitable2 | Metasploitable Linux | 2.0 | 150.1.7.104 | msfadmin | Vulnerable Target |
| Windows 10 | Windows 10 | 22H2 | 150.1.7.105 | Pentesters | Modern Client Target |
| Windows 7 Legacy | Windows 7 | SP1 | Legacy Client Target |
Part 2: Installing Operating Systems
Part-3: Configuring Network Adapters
- Windows 10 (Main Windows Machine on which VMWare is installed)
Host Only IP: 150.1.7.100
- Kali Linux (Main Attacking Machine)
Host Only IP: 150.1.7.101
- Metasploitable Linux
Host Only IP: 150.1.7.104
- Windows 10 (VM Ware Machine)
Host Only IP: 150.1.7.105
- Windows 7 (VM Ware Machine)
Host Only IP: 150.1.7.____
Verification of Assigned IP Address (Host Only) to each Machine using ping
Part-1 – Windows 10 Main Host Machine
(Connection Test using ping command with other machines on VM Ware)
- Windows 10 (Main Windows host machine) Connected with
Kali Linux (Attacking Machine)
- Windows 10 (Main Windows host machine) Connected with Metasploitable Linux
- Windows 10 (Main Windows host machine) Connected with
Windows 10 (VM Ware windows machine)
- Windows 10 (Main Windows host machine) Connected with
Windows 7 (VM Ware windows machine)
Verification of Assigned IP Address (Host Only) to each Machine using ping
Part-2 – Kali Linux Main Attacking Machine
(Connection Test using ping command with other machines)
- Kali Linux (Main Attacking Machine)
Connected with Windows 10 (Main Windows host machine)
- Kali Linux (Main Attacking Machine) Connected with Metasploitable Linux
- Kali Linux (Main Attacking Machine) Connected with
Windows 10 (VM Ware windows machine)
- Kali Linux (Main Attacking Machine) Connected with
Windows 7 (VM Ware windows machine)
Verification of Assigned IP Address (Host Only) to each Machine using ping
Part-3 – Metasploitable Linux
(Connection Test using ping command with other machines)
- Metasploitable Linux Connected with Windows 10 (Main Windows host machine)
- Metasploitable Linux connected with Kali Linux (Main Attacking Machine)
- Metasploitable Linux Connected with Windows 10 (VM Ware windows machine)
- Metasploitable Linux Connected with Windows 7 (VM Ware windows machine)
Verification of Assigned IP Address (Host Only) to each Machine using ping
Part-4 – Windows 10 (VM Ware windows machine)
(Connection Test using ping command with other machines)
- Windows 10 (VM Ware windows machine) Connected with
Windows 10 (Main Windows host machine)
- Windows 10 (VM Ware windows machine) connected with
Kali Linux (Main Attacking Machine)
- Windows 10 (VM Ware windows machine) connected with Metasploitable Linux
- Windows 10 (VM Ware windows machine) Connected with
Windows 7 (VM Ware windows machine)
Verification of Assigned IP Address (Host Only) to each Machine using ping
Part-5 – Windows 7 (VM Ware windows machine)
(Connection Test using ping command with other machines)
- Windows 7 (VM Ware windows machine) Connected with
Windows 10 (Main Windows host machine)
- Windows 7 (VM Ware windows machine) connected with
Kali Linux (Main Attacking Machine)
- Windows 7 (VM Ware windows machine) connected with Metasploitable Linux
- Windows 7 (VM Ware windows machine) Connected with
Windows 10 (VM Ware windows machine)
Part-4: Verification and Validation
- Perform a Ping Sweep & Document IPs
From Kali Linux (Attacking OS) running ping sweep using fping -g command revealed that on the network following machines are alive against these IP addresses:-
- Host OS Windows 10 – IP: 150.1.7.100 is alive
- Kali Linux (attacking OS) – IP: 150.1.7.101 is alive
iii. VM OS Metasploitable2 – IP: 150.1.7.104 is alive
- VM OS Windows 10 – IP: 150.1.7.105 is alive
- Scan Metasploitable & Save Output
From Kali Linux (Attacking OS) running nmap against Metasploitable2 and saved the results into a text file named metasploitable_scan.txt and saved this file on desktop
- Hostname Resolution for Windows VMs
To verify that Kali Linux can resolve the hostnames of Windows VMs on the NetBIOS workgroup:
- Using nmblookup (NetBIOS Name Query)
Runing nmblookup -A command on target Windows IP: 150.1.7.105 which is denied/ no reply from 150.1.7.105
- Using nmap NetBIOS Script
Runing nmap -sU –script nbstat.nse command on target Windows IP: 150.1.7.105
(still no response)
iii. Add Local Hostname Resolution
Resolved directly by hostname by edit /etc/hosts file:
- Final Verification Steps
- Test Hostname Resolution with ping
Run a simple ping command using the hostname instead of the IP address:
ping win10-vm -c 2
| Requirement | Status | Evidence |
| 1. Ping Sweep | Done | Executed via fping / nmap |
| 2. Target Scan (metasploitable_scan.txt) | Done | Saved port scan output for 150.1.7.104 |
| 3. Hostname Resolution | Done | Mapped in /etc/hosts & verified via
ping win10-vm -c 2 |
Reflection Report: Lab Setup & Isolated Environments
Challenges Faced and Solutions:
During the setup of the virtual security testing lab, two main challenges were encountered:
- Network Isolation & ICMP Blocking: Initially, Windows target machines dropped ping requests from Kali Linux due to default Windows Firewall rules. This was resolved by creating an inbound rule allowing ICMPv4-In traffic via netsh advfirewall.
- Multi-NIC IP Configurations: Kali Linux had multiple network adapters active (eth0 and eth1), causing routing confusion. Bringing down unnecessary interfaces ensured all traffic flowed strictly through the Host-Only subnet (150.1.7.0/24).
Importance of an Isolated Lab in Ethical Hacking: Conducting vulnerability assessments and penetration testing in an isolated host-only environment is critical for enterprise security. It prevents accidental exposure of attack tools onto live production networks, eliminates the risk of triggering false alarms in real security devices, and ensures compliance with legal and ethical boundaries.