Security Monitoring & Threat Detection
A complete Security Information and Event Management (SIEM) platform using Wazuh. This is your home lab's Security Operations Center (SOC) — monitoring all your servers, detecting threats in real-time, and alerting you when something bad happens.
The Problem: In any organization, you have dozens or hundreds of servers generating millions of log entries. Without a SIEM, you're flying blind — attacks happen and you don't know until it's too late.
The Solution: Wazuh collects all logs, applies detection rules, correlates events, and alerts on threats. SOC Analysts with Wazuh experience command salaries of $80K-$140K annually.
You should be familiar with:
Wazuh with the Indexer uses significant RAM. If running alongside Projects A-C, you'll need at least 16 GB total RAM on your server.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8 cores |
| RAM | 8 GB | 16 GB |
| Storage | 50 GB SSD | 100+ GB SSD |
| Network | Port 1514 UDP (agents), Port 443 (dashboard) | — |
Understanding SIEM and Wazuh architecture before we build.
Wazuh uses a 0-15 severity scale. Understanding these levels is critical for SOC operations:
Deploy the complete Wazuh stack using Docker.
# Create Wazuh directory
mkdir -p ~/wazuh-docker
cd ~/wazuh-docker
# Clone official Wazuh Docker repository (v4.9.0)
git clone https://github.com/wazuh/wazuh-docker.git -b v4.9.0
# Navigate to single-node deployment
cd wazuh-docker/single-node
# Verify structure
ls -la
# Generate certificates for Wazuh components
docker compose -f generate-indexer-certs.yml run --rm generator
# Verify certificates were created
ls -la config/wazuh_indexer_ssl_certs/
# Start all Wazuh services (this takes 2-3 minutes)
docker compose up -d
# This starts:
# - wazuh.manager (log analysis, rules engine)
# - wazuh.indexer (data storage, search)
# - wazuh.dashboard (web interface)
# Check container status
docker compose ps
# Watch logs for "Wazuh is ready" message
docker compose logs -f --tail=50
The indexer needs to initialize. Wait 2-3 minutes before accessing the dashboard. Watch for "Wazuh is ready" in the logs.
Check all containers are running healthy:
# Check container health
docker compose ps
# Verify Manager status
docker exec -it single-node-wazuh.manager-1 /var/ossec/bin/wazuh-control status
https://YOUR_SERVER_IP| Username | admin |
| Password | SecretPassword |
Go to Settings Security Internal Users to change the admin password. Default passwords are a critical security vulnerability.
Wazuh is running! You should see the dashboard with "0 agents connected." Let's add some agents next!
Install monitoring agents on servers you want to protect.
Agents run on each server you want to monitor. They collect logs, detect threats, and send data to the Wazuh Manager.
# Add Wazuh GPG key
curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | \
gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import && \
chmod 644 /usr/share/keyrings/wazuh.gpg
# Add Wazuh repository
echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | \
tee /etc/apt/sources.list.d/wazuh.list
# Update and install agent
# IMPORTANT: Replace YOUR_WAZUH_SERVER_IP with actual IP
apt update
WAZUH_MANAGER="YOUR_WAZUH_SERVER_IP" apt install -y wazuh-agent
# Enable and start the agent
systemctl daemon-reload
systemctl enable wazuh-agent
systemctl start wazuh-agent
# Check status
systemctl status wazuh-agent
Change YOUR_WAZUH_SERVER_IP to the actual IP address of your Wazuh server (e.g., 192.168.1.100).
Back on your Wazuh Dashboard, check Agents Management:
Create custom rules to detect specific threats.
# Create custom rules file inside the Wazuh Manager container
docker exec -it single-node-wazuh.manager-1 bash -c 'cat > /var/ossec/etc/rules/local_rules.xml << "EOF"
<!-- Custom Wazuh Rules -->
<group name="local,syslog,sshd,">
<!-- SSH Brute Force Detection -->
<rule id="100001" level="10" frequency="5" timeframe="120">
<if_matched_sid>5710</if_matched_sid>
<description>SSH brute force attack detected (5+ failures in 2 min)</description>
<mitre>
<id>T1110.001</id> <!-- Brute Force: Password Guessing -->
</mitre>
<group>authentication_failures,brute_force</group>
</rule>
<!-- Successful Root Login Alert -->
<rule id="100002" level="12">
<if_sid>5715</if_sid>
<user>root</user>
<description>Root user logged in via SSH - HIGH PRIORITY</description>
<mitre>
<id>T1078.003</id> <!-- Valid Accounts: Local Accounts -->
</mitre>
<group>authentication_success,privilege_escalation</group>
</rule>
</group>
EOF'
# Restart Wazuh Manager to load rules
docker exec single-node-wazuh.manager-1 /var/ossec/bin/wazuh-control restart
# Verify rules loaded
docker exec single-node-wazuh.manager-1 /var/ossec/bin/wazuh-control status
Common issues and their solutions when working with Wazuh.
tail -f /var/ossec/logs/ossec.logcat /var/ossec/etc/ossec.confnc -uvz MANAGER_IP 1514free -hdocker logs single-node-wazuh.indexer-1systemctl status wazuh-agenttail -f /var/ossec/logs/alerts/alerts.log/var/ossec/bin/wazuh-logtestcd ~/wazuh-docker/wazuh-docker/single-node
# Option A: Stop services (preserve data)
docker compose stop
# Option B: Complete removal (DELETES ALL DATA)
docker compose down -v
rm -rf ~/wazuh-docker
| Skill | Description |
|---|---|
| Wazuh SIEM/XDR | Deployment, configuration, and rule development |
| MITRE ATT&CK | Mapping detections to ATT&CK framework |
| Log Management | Centralized log collection and analysis |
| Detection Engineering | Custom rule creation and tuning |
| Incident Response | Alert triage and automated response |
You've built an enterprise-grade Security Operations Center! Your home lab now has the same threat detection capabilities used by Fortune 500 companies.