learn-cyber · lesson 4 · hands-on lab
Put an agent on a machine, attack it on purpose, and watch Wazuh raise the alert. This is the moment the whole pipeline stops being theory.
Your server from Lesson 3 is running, but it's watching nothing — it has no agents. Today you'll enroll an agent on a second machine, confirm it reports in as Active, then trigger a real detection and watch the alert land in the dashboard.1
admin.Wazuh gives you a wizard that writes the install commands for you. Use it.
Open the deploy wizard. In the dashboard, find "Deploy new agent" (the agent-enrollment wizard). It walks you through a few choices.
Pick the OS of your endpoint (e.g. Linux / DEB or RPM to match your VM).
Set the manager IP to your Lesson-3 server's address. This is the one piece of information the agent truly needs — it's how it knows where to phone home.
Optionally assign a group here. Forward-
reference: in your MSSP you'll create one group per hotel so
each client's config and data stay cleanly separate — that's Lesson 6. For
today, the default group is fine.
Run the generated commands on the endpoint. The wizard prints an install + enrollment command tailored to your choices. Copy it and run it on the endpoint VM. Then start the agent:
sudo systemctl start wazuh-agent
Confirm it's Active. Back in the dashboard, the new agent should appear and flip to Active within a few seconds. If you prefer the command line, on the server:
sudo /var/ossec/bin/agent_control -l
Not showing up? Check the endpoint can reach the server on
1514/1515, and tail the agent log:
sudo tail -f /var/ossec/logs/ossec.log.
Now make the pipeline fire. Pick either option — do both if you have time. Wazuh's built-in rules catch both of these out of the box.
From your attacker machine, hammer the endpoint's SSH with bad passwords. Run this several times, typing a wrong password each time:
ssh baduser@<agent-ip>
# enter a wrong password, let it fail, repeat 5–10 times
Repeated authentication failures from one source is the textbook brute-force signature. Wazuh's built-in rules decode each failed login and a correlation rule fires on the cluster of them — exactly the "fifty failures, one alert" pattern from Lesson 1.
Watch it land: in the dashboard go to Threat Hunting / Security events, filter by your agent, and watch the failed-login events roll in followed by the higher-level "multiple authentication failures" alert.
FIM watches critical files and tells you when one changes — the Integrity half of the CIA triad. Create or modify a file in a monitored path on the endpoint:
sudo touch /etc/wazuh-test-file
echo "tampered" | sudo tee -a /etc/wazuh-test-file
Then watch the Integrity Monitoring view in the dashboard for the change to appear.
FIM may run on a schedule or in real time depending on config, so the alert can take a moment. Keep it simple for now — the point is just to see a file change become an alert.
From memory first. You'll enroll agents and chase alerts dozens of times once you're live — burn the basics in now.
What is the one piece of information an agent must have to enroll?
The agent needs the manager IP — the address of your Wazuh server — so it knows where to send its data. The group is optional; the manager IP is not.
You ran the SSH brute-force. Where do you go to watch the alert?
Decoded events and the alerts they raise show up under Threat Hunting / Security events. Filter by your agent and the failed logins — then the brute-force alert — appear right there.
What does File Integrity Monitoring (FIM) actually detect?
FIM watches critical files and flags when one is created, modified, or deleted — the Integrity leg of the CIA triad. A changed system file on a POS terminal is exactly the kind of tampering it's built to catch.
You just earned: an agent reporting in as Active, and your first real Wazuh alert — triggered, found, and understood. The Lesson-1 pipeline is no longer a diagram; you watched it run.
Up next (Lesson 5): decoders and rules — how Wazuh turns a raw log line into a leveled alert, and how to write custom detections for the systems hotels actually run.
← Prev: Lesson 3 — Stand up your server · Next: Lesson 5 — Decoders & rules →
Reference: Glossary · All resources · Mission