Most of what I write here is about attacking things. This one is about the other side: seeing the attack happen.
If you have a home lab with a Kali box and a few Windows targets, you can already throw attacks around. What you probably can’t do yet is watch them land. That’s what a SIEM is for, and you can build one for free in an afternoon with Wazuh.
I built mine because the evidence of an attack is scattered across every machine’s own logs. Wazuh pulls all of it into one place, raises the alerts for me, and gives me a handy dashboard to review it all at a glance.
What is a SIEM?
SIEM stands for Security Information and Event Management. That’s a mouthful, so here’s the plain version: it’s a tool that collects logs from all your machines into one place, looks through them for signs of trouble, and raises an alert when it finds something.
Without one, every machine keeps its own logs, and nobody reads those one by one. A SIEM pulls them together so one person can see the whole picture.
Every SOC in the world runs on one. If you want to understand how defenders catch you, or you’re thinking about a blue team job, running your own is one of the best things you can do.
Why Wazuh?
There are a few free options, like Splunk Free, Security Onion and the Elastic stack. I picked Wazuh for a home lab because:
It’s actually free. It’s fully open source, with no daily data cap and no features locked behind a license.
It’s light enough. It runs on a single VM with 8 GB of RAM.
It works out of the box. It comes with detection rules already written and maps alerts to MITRE ATT&CK, so you see something useful on day one.
It has agents. You install a small agent on each machine, and it ships logs back to the server for you.
What you need
Wazuh’s own minimum for an all-in-one install (everything on one box, up to 25 agents, about 90 days of data):
Resource
Minimum
CPU
4 vCPU
RAM
8 GB
Disk
50 GB
OS
64-bit Linux, like Ubuntu 22.04 or 24.04
I’d build it as a VM on whatever hypervisor you already use, like Proxmox, TrueNAS or VirtualBox. Give it a static IP, because every agent needs to find it at the same address.
Don’t squeeze Wazuh onto a machine that’s already short on memory. The indexer (the part that stores and searches your logs) is the memory-hungry piece, and it gets unhappy fast.
Step 1: Install the Wazuh server
On a fresh Ubuntu VM, update it first, then run Wazuh’s install script:
The -a flag means “all-in-one.” It installs the three pieces Wazuh is made of on this one machine:
The indexer stores your logs and makes them searchable.
The server (also called the manager) receives logs from agents and runs the detection rules.
The dashboard is the web page where you look at everything.
It takes a while. When it finishes, it prints a username (admin) and a password. Copy that password somewhere safe right away.
If you lose it, you can pull it back out of the install files on the server:
sudo tar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt
Now open a browser to https://<your-wazuh-ip> and log in. You’ll get a certificate warning because the certificate is self-signed. That’s expected in a lab, so click through it.
Want your own admin password? The dashboard’s Security page refuses with Resource 'admin' is reserved. That’s on purpose, so a stolen dashboard login can’t take over the superuser. Change it from the server’s shell with Wazuh’s own tool, which also updates the copies Filebeat uses:
It needs 8–64 characters, with an uppercase letter, a lowercase letter, a number, and one symbol from . * + ? -. I tried ! first and it got rejected. Afterward, if the dashboard throws a 500 Internal Server Error, your browser is still sending the old login cookie. Open a private window, or clear the site’s cookies, and log in again.
Step 2: Open the right ports
Agents talk to the server on two ports:
Port
What it does
1514
Agents send their events here
1515
New agents enroll (register) here
443
The dashboard you just logged into
If you run a firewall on the Wazuh VM, allow them:
This is where it gets fun. On a Windows VM in your lab, open PowerShell as Administrator and run the following, replacing 10.0.0.2 with your Wazuh server’s IP:
Line by line: download the agent installer, install it quietly while telling it where the server lives, then start the agent service.
You don’t have to memorize this. In the dashboard, Agents → Deploy new agent builds the exact command for you.
Give it a minute, then check the dashboard. Your Windows machine should show up as Active.
Use the bare IP. Put just the IP in WAZUH_MANAGER, like 192.168.1.50, never https://192.168.1.50. You reach the dashboard over https, so it’s an easy mix-up, but the agent can’t read it and quietly stops. If the service won’t stay running, check C:\Program Files (x86)\ossec-agent\ossec.log for Invalid hostname.
Also run these commands one at a time. Some PowerShell windows run a multi-line paste out of order, and Start-Service fails if it runs before the install finishes.
Step 4: Add a Linux agent
For a Debian or Ubuntu machine, add Wazuh’s package repository and install the agent (run these as root):
The first four lines teach the machine to trust Wazuh’s packages. The last two install the agent and start it now and on every boot.
Step 5: Give Windows better eyes with Sysmon
Out of the box, Windows doesn’t log much detail about what programs are doing. Sysmon is a free Microsoft tool (part of Sysinternals) that fixes that. It logs things like every process that starts, its command line, and network connections. Those are exactly the clues you need to spot an attack.
Download Sysmon from Microsoft Sysinternals and unzip it. You’ll see three programs. Use Sysmon64.exe on a normal 64-bit Windows machine (Sysmon.exe is for 32-bit, Sysmon64a.exe is for ARM). Don’t double-click it, because there’s no installer window.
Open PowerShell as Administrator in the unzipped folder. Grab a good starting config (SwiftOnSecurity’s is the classic one), install Sysmon with it, and check that it’s running:
Tell the Wazuh agent to read Sysmon’s log. Open the agent’s config in Notepad from that same admin window (notepad "C:\Program Files (x86)\ossec-agent\ossec.conf", since Notepad needs admin rights to save there) and paste this on the line right after the first <ossec_config>:
If the dashboard says 3002 - Request failed with status code 429: I hit this right after setting up Sysmon. The dashboard was asking the Wazuh API for data faster than its default limit allows, and the API kept saying “slow down” (error 3099, maximum number of requests per minute reached). Waiting didn’t fix it. Raising the limit did. On the Wazuh server:
printf 'access:\n max_request_per_minute: 1000\n' | sudo tee -a /var/ossec/api/configuration/api.yamlsudo systemctl restart wazuh-manager
Check the file doesn’t already have an uncommented access: line first. If you edit it by hand, indent with two spaces, never a tab. In /var/ossec/logs/api.log the requests all come from 127.0.0.1, and that’s normal. It’s just the dashboard, which runs on the same box.
Step 6: Attack yourself and watch
Now for the payoff. Try these and look for the alerts in the dashboard:
Failed logins. Type the wrong password into the Windows VM a few times. You should see authentication failure alerts.
An encoded PowerShell command. Attackers hide what they run by base64-encoding it. This one just runs whoami, but Wazuh doesn’t know that:
powershell -EncodedCommand dwBoAG8AYQBtAGkA
Mine came back as “Powershell.exe spawned a powershell process which executed a base64 encoded command”. Sysmon saw the process start, and Wazuh’s rules recognized the trick. One thing surprised me: just opening a normal PowerShell window raised nothing. Wazuh only stores a Sysmon event as an alert when a rule says it’s suspicious, and a plain PowerShell window isn’t.
A real technique. From your Kali box, run something you already know against the lab, like a password spray with NetExec. Then go find it in Wazuh.
That last one is the moment it clicks. You stop thinking about “running the tool” and start thinking about “what did that tool leave behind?” That’s a better attacker and a better defender.
When the SIEM caught it but you can’t find it
This one had me stumped for a while. My encoded command showed up as an alert, but Threat Hunting kept saying No results match your search criteria. The fix was to stop trusting the screen and check each layer from the bottom up:
Did the agent read it? On the server, count the Sysmon alerts Wazuh raised:
Can the dashboard show it? Go to ☰ → Explore → Discover, pick wazuh-alerts-*, widen the time range, and search the same data.win.system.channel:... query.
Mine said 4, 4, and then showed all four in Discover. Nothing was ever lost. The alerts were there the whole time, and my dashboard session was the problem. That’s the habit worth keeping: when a SIEM says “nothing happened,” prove which layer is telling the truth.
Where to go from here
Point more machines at it, like your domain controller, your Linux servers and your firewall.
Read through the alerts that fire on their own when nothing is happening. Learning what “normal” looks like is half the job.
Pick one attack you know well and see if Wazuh catches it. If it doesn’t, figure out why. That’s detection engineering, and it’s a skill employers want.