Wazuh
Table of Contents
Open-source SIEM and XDR platform. Collects logs and security events from agents deployed on endpoints, performs rule-based detection, and provides file integrity monitoring, vulnerability scanning, and compliance reporting. A practical alternative to commercial SIEMs for a home lab or small internal security team.
Architecture: central Wazuh Manager + Wazuh Indexer (OpenSearch)
- Wazuh Dashboard. Agents run on monitored endpoints and forward
events to the manager.
Related: SIEM SOAR Incident Response EDR windows client DFIR
Installation
Docker (recommended for lab)
# Clone the docker deployment repo git clone https://github.com/wazuh/wazuh-docker.git -b v4.9.0 cd wazuh-docker/single-node # Generate certificates docker compose -f generate-indexer-certs.yml run --rm generator # Start the stack docker compose up -d # Access dashboard # https://localhost (default: admin / SecretPassword)
Raspberry Pi / Linux (native)
# Add Wazuh repository curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --no-default-keyring \ --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import 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 apt update # Install manager (on the Wazuh server) apt install wazuh-manager # Install indexer and dashboard separately # Full docs: https://documentation.wazuh.com/current/installation-guide/
Agent Deployment
Agents run on monitored endpoints and forward events to the manager on port 1514/UDP or 1514/TCP.
Linux agent
# Install apt install wazuh-agent # Configure manager address sed -i "s|MANAGER_IP|$MANAGER_IP|g" /var/ossec/etc/ossec.conf # Start systemctl daemon-reload systemctl enable wazuh-agent systemctl start wazuh-agent
Windows agent
# PowerShell — download and install silently Invoke-WebRequest -Uri "https://packages.wazuh.com/4.x/windows/wazuh-agent-4.9.0-1.msi" ` -OutFile wazuh-agent.msi msiexec /i wazuh-agent.msi WAZUH_MANAGER=$MANAGER_IP /quiet # Start service NET START WazuhSvc
Verify agent connection (on manager)
# List connected agents /var/ossec/bin/agent_control -l # Check agent status /var/ossec/bin/agent_control -i 001
Key Components
| Component | Purpose |
|---|---|
| Wazuh Manager | Receives events from agents, applies rules, generates alerts |
| Wazuh Indexer | OpenSearch-based storage for events and alerts |
| Wazuh Dashboard | Web UI for querying events, viewing alerts, managing agents |
| Wazuh Agent | Lightweight process on monitored endpoints |
| Ruleset | XML rules defining what constitutes an alert |
Configuration
Main config file: /var/ossec/etc/ossec.conf
<!-- File integrity monitoring — add directories to watch --> <syscheck> <frequency>43200</frequency> <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories> <directories check_all="yes" report_changes="yes">/var/www/html</directories> </syscheck> <!-- Log collection — add sources --> <localfile> <log_format>syslog</log_format> <location>/var/log/auth.log</location> </localfile> <!-- Windows event log collection (in Windows agent config) --> <localfile> <log_format>eventchannel</log_format> <location>Security</location> </localfile> <localfile> <log_format>eventchannel</log_format> <location>Microsoft-Windows-Sysmon/Operational</location> </localfile>
Alert Levels
Wazuh uses a numeric severity level 0–15:
| Level | Meaning |
|---|---|
| 0–3 | Informational / ignored |
| 4–6 | Low severity |
| 7–9 | Medium — worth investigating |
| 10–12 | High — likely threat |
| 13–15 | Critical |
Custom Rules
Rules live in /var/ossec/etc/rules/local_rules.xml:
<!-- Alert on any new user created --> <rule id="100001" level="10"> <if_sid>5901</if_sid> <description>New user account created</description> </rule> <!-- Alert on SSH login from an unusual country (requires GeoIP) --> <rule id="100002" level="10"> <if_sid>5715</if_sid> <geoip not_field="GeoIP.country_code2">GB</geoip> <description>SSH login from outside expected country</description> </rule>
# Reload rules without restart /var/ossec/bin/ossec-control reload # Test rules against a log entry /var/ossec/bin/ossec-logtest
Useful CLI Commands
# Service management systemctl status wazuh-manager systemctl restart wazuh-manager # Real-time alert stream tail -f /var/ossec/logs/alerts/alerts.log # JSON alerts (better for parsing) tail -f /var/ossec/logs/alerts/alerts.json # Check manager status /var/ossec/bin/ossec-control status # Run vulnerability scan on all agents /var/ossec/bin/agent_groups -l # Manually trigger FIM scan /var/ossec/bin/agent_control -r -a
Tips
- Docker deployment is the fastest way to get the full stack running — the native install involves setting up the indexer and dashboard separately which is more involved
- For the Raspberry Pi home lab, the Docker single-node deployment works on 8GB RAM but keep the agent count low and set reasonable alert levels to avoid indexer pressure
- Windows agent with Sysmon forwarding gives significantly better endpoint visibility than Windows event logs alone — install Sysmon first, then configure the agent to forward the Sysmon operational channel
- FIM on
/var/www/html(or IIS web root on Windows) is a practical detection for webshell drops - The Wazuh TryHackMe room is a good orientation before deploying it in the home lab