Wazuh Home SOC Lab
Wazuh is an open-source security platform that collects logs, checks file integrity, detects threats and maps alerts to MITRE ATT&CK. In this lab you run a single-node Wazuh server on your laptop, enroll two lab machines, generate harmless test events and practise triage.
Lab architecture
Section titled “Lab architecture” Laptop / host (Docker) Lab machines (VMs on a host-only or NAT network)+-----------------------------------+ +---------------------------+| wazuh.manager (1514, 1515, 55000)|<----------| Windows 10/11 VM agent || wazuh.indexer (9200) |<----------| Ubuntu VM agent || wazuh.dashboard (HTTPS 443) | +---------------------------++-----------------------------------+ browser: https://localhostResource requirements
Section titled “Resource requirements”| Item | Minimum for a lab | Comfortable |
|---|---|---|
| RAM for the stack | 6 GB free | 8 GB or more free |
| CPU | 2 cores | 4 cores |
| Disk | 20 GB | 50 GB |
| Each lab VM | 2 GB RAM | 4 GB RAM |
The indexer (OpenSearch based) is the heavy part. On a 16 GB laptop with two light VMs this is workable; on 8 GB total it will struggle. Check the official sizing guidance at documentation.wazuh.com before you start.
1. Prerequisites
Section titled “1. Prerequisites”Docker Engine with the Compose plugin and git. On Linux, the indexer requires a higher memory-map limit:
sudo sysctl -w vm.max_map_count=262144# make it persistent across rebootsecho "vm.max_map_count=262144" | sudo tee /etc/sysctl.d/99-wazuh.confOn Docker Desktop with WSL2, set it inside the WSL distribution that Docker uses (for example wsl -d docker-desktop sysctl -w vm.max_map_count=262144, repeated after a restart unless you configure it persistently).
2. Deploy single-node Wazuh
Section titled “2. Deploy single-node Wazuh”Wazuh publishes an official repository with a single-node Docker deployment. Do not guess a version: open the Wazuh documentation (Deployment on Docker) or the wazuh-docker releases page to find the current release tag, then use it below.
# Replace <RELEASE_TAG> with the current tag shown in the Wazuh docs, e.g. v4.x.ygit clone https://github.com/wazuh/wazuh-docker.git -b <RELEASE_TAG>cd wazuh-docker/single-node
# Generate the certificates for indexer, manager and dashboarddocker compose -f generate-indexer-certs.yml run --rm generator
# Start the stackdocker compose up -dWatch it come up (the first start takes a few minutes while the indexer initialises):
docker compose psdocker compose logs -f wazuh.managerOpen https://localhost (your browser warns about the self-signed certificate; acceptable for a local lab). The documented default login is user admin with the default password listed in the docs for that release.
3. Enroll a Windows agent
Section titled “3. Enroll a Windows agent”Run in an elevated PowerShell on the Windows VM. Use the MSI URL for the same major version as your manager, taken from the Wazuh “Installing agents” page (the agent must not be newer than the manager). MANAGER_IP is the address at which the VM can reach your laptop’s Docker ports 1514 and 1515, for example the host-only adapter address.
$ManagerIP = "MANAGER_IP"# Paste the current MSI URL from the Wazuh docs:Invoke-WebRequest -Uri "<WAZUH_AGENT_MSI_URL>" -OutFile "$env:TEMP\wazuh-agent.msi"msiexec.exe /i "$env:TEMP\wazuh-agent.msi" /q WAZUH_MANAGER="$ManagerIP" WAZUH_AGENT_NAME="win-lab"Start-Service -Name WazuhSvcGet-Service WazuhSvc4. Enroll a Linux agent (Debian/Ubuntu)
Section titled “4. Enroll a Linux agent (Debian/Ubuntu)”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.gpgecho "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | sudo tee /etc/apt/sources.list.d/wazuh.listsudo apt-get updatesudo WAZUH_MANAGER="MANAGER_IP" WAZUH_AGENT_NAME="ubuntu-lab" apt-get install -y wazuh-agentsudo systemctl daemon-reloadsudo systemctl enable --now wazuh-agentOn RPM-based systems use the yum/dnf repository and package from the same documentation page. The 4.x in the repo path tracks the 4.x series; check the docs if your manager is a different major version. Confirm on the dashboard under Agents that both machines show as Active. If not, see the troubleshooting list at the end.
5. Generate harmless test activity
Section titled “5. Generate harmless test activity”Do these only on your own lab machines.
| Test | How | What you should see |
|---|---|---|
| Failed SSH logins | From a second lab machine, ssh wronguser@ubuntu-lab-ip and give wrong passwords 3 to 5 times |
Authentication failure events (rule group authentication_failed, sshd) |
| Failed Windows logon | Lock the lab VM and enter a wrong password a few times (or runas /user:nosuchuser cmd) |
Event ID 4625 style failed logon alerts |
| New local user | sudo useradd labtest then sudo userdel labtest on Linux |
Account creation/deletion alerts |
| sudo usage | sudo ls /root |
Privilege escalation (sudo) events at low level |
| File integrity | Create or edit a file in a monitored directory, e.g. echo test | sudo tee /etc/lab-fim-test.txt |
FIM alert (syscheck) such as “File added to the system” |
By default Wazuh’s file integrity monitoring (FIM) scans on a schedule (often every 12 hours) for most directories, so alerts may not appear instantly. To see changes quickly, add a realtime directory in the agent’s ossec.conf inside the <syscheck> block and restart the agent:
<directories realtime="yes">/home/youruser/fim-lab</directories>mkdir -p ~/fim-lab && sudo systemctl restart wazuh-agentecho "hello" > ~/fim-lab/test.txt6. Triage your first alerts
Section titled “6. Triage your first alerts”Open Threat Hunting (or Security events) and select an agent. For each alert, read these fields:
| Field | Why it matters |
|---|---|
rule.level |
Severity 0-15. Start with 7 and above; ignore noise below until you know your baseline |
rule.id and rule.description |
Identifies the detection logic; search the rule ID to see what it means |
agent.name / agent.ip |
Which machine, and is it a critical one |
rule.mitre.id / rule.mitre.tactic |
Maps to ATT&CK, e.g. brute force or persistence |
data.srcip, data.dstuser |
Who or what attempted the action |
syscheck.path, syscheck.event |
For FIM: what changed and how |
full_log |
The raw log line, the ground truth |
Triage routine:
- Is it real? Does it match something you just did? Lab ones will.
- Scope. Search the same
data.srcipor user across all agents. - Context. Look at events before and after on the same agent.
- Decide. Benign, tune, or escalate; write a one-line note.
Also explore the Vulnerability Detection, Configuration Assessment (SCA) and MITRE ATT&CK dashboards for your agents.
7. Tuning tips
Section titled “7. Tuning tips”- Start with the defaults, then reduce noise by raising the minimum level you review rather than disabling rules.
- Put custom rules and overrides in
/var/ossec/etc/rules/local_rules.xml(inside the manager container), using IDs from 100000 up; never edit the stock rules files. - Exclude noisy paths from FIM with
<ignore>entries in the agent config. - Use agent groups to push different configurations to servers and workstations.
- Keep the manager and agents on compatible versions, and restart the manager after rule changes.
OT relevance
Section titled “OT relevance”You rarely install agents on PLCs, but you can on Windows HMIs, engineering workstations, historians and jump hosts in the OT zone. Use Wazuh there for logins, USB/file changes and service changes, and pair it with passive network analysis from Wireshark for OT. See Cybersecurity Start Here for the segmentation context and the VLAN Planner to design where the manager should live.
Troubleshooting
Section titled “Troubleshooting”| Problem | Check |
|---|---|
| Indexer container restarts | vm.max_map_count not set; RAM too low (docker stats) |
| Dashboard says “not ready” | Wait a few minutes; docker compose logs wazuh.indexer |
| Agent stays “Never connected” | VM cannot reach manager ports 1514/1515; check firewall and the manager IP |
| Agent rejected | Agent version newer than manager, or duplicate agent name |
| Certificate errors on start | Re-run the certificate generator after docker compose down -v |
Clean up
Section titled “Clean up”cd wazuh-docker/single-nodedocker compose down # stop, keep datadocker compose down -v # stop and delete all lab dataOn the agents:
sudo systemctl disable --now wazuh-agent && sudo apt-get remove --purge -y wazuh-agentStop-Service WazuhSvc# Then uninstall "Wazuh Agent" from Apps & features, or: msiexec /x "$env:TEMP\wazuh-agent.msi" /qMore tools are listed under /tools/; for the next skill, see the certifications primer.