The Force is STRONG here

Blue Team SIEM Lab

March, 2025

Hmm… the Dark Side, strong it is in young minds, yes. To the Red Team, drawn they are—attack, break, exploit, they wish. But see, the balance they do not. Protect, defend, the ways of the Blue Team, forgotten they have. A path to knowledge, I offer. A SIEM Lab VM, built it I have. Easy to download, simple to use—yes, yes. Learn the ways of the defenders, young ones must. See the full picture, they will. In this article, guide you I shall. The ways of the Blue Side, discover you must. A Jedi of cybersecurity, become you shall!

Stop talking like Yoda, I shall, for the rest of this article.

Knowledge pre-requisites

This lab is intended primarily for cybersecurity students at the end of their first year or during their second year. The lab assumes basic knowledge of Linux (installation, services, iptables, SSH, etc.) and cybersecurity fundamentals, such as types of network scans, firewall operations, brute-force attacks, reverse shells, regexp and SIEM.

However, not having this knowledge is NOT a blocker. You may find it more challenging, but this lab will still help you grow your knowledge in different area. Do not be shy; be bold—but recognize your limits. Stay humble enough to know when it's time to return to books or online resources before continuing.

Technical pre-requisites

This lab was created using VMWare Workstation 16 Player (it's free!). The provided zip file contains all the VMware virtual machines ready to be used directly. If you prefer another virtualization platform (like VirtualBox), you will need to convert the VM images accordingly.

Please adapt the number of CPU and RAM for each machine. Not much should be needed for each machine, it all depends on your patience. The more is usually the best. Note that, once uncompressed, size of each machine is the following:

Download

>>>>>> You can download the whole lab one zip here. (31GB) <<<<<

SHA256: 63E1EC59D69B72ADC7DC6B5550C45D1FFC8650801AFBEEA447D20A887DE3BA0F

In Powershell:

Get-FileHash '.\SIEM_Lab.zip'

What is this lab about ?

This lab provides a minimal but fully functional Wazuh SIEM setup, including a webserver intended to be attacked from a Kali Linux machine. Attacks trigger alerts in Wazuh’s dashboards, offering students hands-on experience with defensive cybersecurity operations (blue teaming—or rather, purple teaming).

I designed this lab as a foundation and inspiration for discovering the defensive side of cybersecurity and the critical functions of a Security Operations Center (SOC). It's aimed at both students and teachers: for teachers to ease preparation and for students to explore and learn practically.

In this lab I have pre-configured the following:

Important: Ubuntu installations are intentionally NOT UPDATED. Please avoid updating until instructed otherwise.

Wazuh Lab

Pre-configured alerts:

The following alerts are configured and visible on the Wazuh dashboards:

How does the lab work ?

Wazuh SIEM Machine:

  1. Start the Wazuh virtual machine
  2. Log in: wazuh / wazuh (Yes, excellent security practice for a cybersecurity lab! 😉)
  3. ubuntu login

  4. Assign IP address manually: 192.168.74.10 if IP is not set
  5. Start Firefox; the default page is the Wazuh SIEM (bookmarked).
  6. Credentials are saved in Firefox and stored in a file on the desktop.
  7. firefox login

    desktop creds

  8. Go to Dashboards > General Dashboard
  9. wazuh dashboard

    general dashboard

  10. Get ready, to make it *blink* like a christmas tree!

Webserver Machine:

  1. Start the webserver VM
  2. Log in : webserver / webserver (it's super safe)²
  3. webserver login

  4. Assign IP address manually: 192.168.74.20 if IP is not set
  5. Execute with root script: /home/webserver/firewall_setup.sh (it fill iptables with specific blocking and detection rules)
  6. firewall script

  7. Make sure that the nginx webserver is running (systemctl status nginx)
  8. nginx status

  9. Test local nginx website access using firefox

The Kali machine - Attack and Detection Phase:

  1. Start the Kali attacking machine
  2. Log in : kali / kali (do what I say, not what I do)
  3. Assign IP address manually: 192.168.74.30 if IP is not set
  4. Observe on desktop the different attack scripts
  5. Run the nmap NULL scan script and observe Wazuh associated dashboard
  6. Nmap NullScan Dashboard NullScan

  7. Run the nmap XMAS scan script and observe Wazuh associated dashboard
  8. Nmap XMAS Scan Dashboard XMAS Scan

  9. Run the nmap aggressive scanning and observe Wazuh associated dashboard
  10. Nmap PortScan Dashboard Port Scan

  11. Run the SSH bruteforce attack and observe Wazuh associated dashboard
  12. Heil Hydra Dashboard SSH Bruteforce

  13. Run the nikto scan attack and observe Wazuh associated dashboard
  14. Good old nikto Nginx 404

  15. Run the reverse shell listener script and execute the reverse shell binary on the webserver
  16. Reverse Shell Dashboard Reverse Shell

Success

How is the lab configured?

Having a working lab is good; understanding how it works is even better. That's the exact purpose of this part:

Webserver configuration:

This picture will help you understand how things work on the webserver to monitor firewall rules events detection by the Wazuh Agent:

Webserver structure

  1. firewall_setup.sh script to automate firewall rule creation for this lab
  2. the script define a clear and identifiable log message as that will ease the log parsing and detection later
  3. iptables will drop *AND* log the drop event in the OS journal (you can see them by using command: "journalctl -f")
  4. these events are isolated by rsyslog into a specific log file
  5. Wazuh-agent monitor this file for events and if events appear they will be reported to the SIEM

Concretely, in our case it gives the following:

The script '/home/webserver/firewall_setup.sh' is made to create firewall rules that will generate following message in case of DROP event: [FW-ANTI-....] by iptable.

I know. I don't like these naming tag either. Perfect. It will be a good starting exercice for you to change them.

If these events are detected by rsyslog, then these events are isolated in the following log file: /var/log/iptables.log

rsyslogfile

Content of the rsyslog file

rsyslogfile content

Finally we need to add monitoring on the file /var/log/ipatables.log into Wazuh-agent. The configuration file to modify is the following: /var/ossec/etc/ossec.conf

ossec conf file

Restart rsyslog and Wazuh-Agent services.

Done.

The SIEM: let's ingest our custom firewall config above

Have a look at the following configuration files:

If you add/change/remove rules you MUST restart wazuh-server service or you will have headache for nothing.

Decoder and Rules are setup. Now it's time to have fun with the GUI.

Dashboard time !

Choose one of the attack that triggers firewall events.

Login to Wazuh and go to Discover.

  1. Click "Add filter"
  2. Type "data.fwfilter" (which is the field we have added above)
  3. Select the Operator "is"
  4. Select the Value you want

Add filter

You can also have a look at other parameters like "agent.id", "agent.ip", "data.action" and so on...

Perfect, you are now able to isolate the information you want. You just need to be able to make it a nice dashboard. For this point I would recommend you to simply go to the "Visualize" menu > "FW Null Scan". Review how it's created, the filter behind, the type the Y-axis, the X-axis options.

Now that you have understood how the firewall rules were configured you will have no trouble reversing what I did for the ssh bruteforce and for the reverse shell detection. Look at Wazuh documentation if need me.

Easy Peasy, now you are ready for new adventures.

What's next ?

Imagination is your limit. From now, I recommend you to build more.

You might not be happy with my iptables configuration, great! Change it and the associated message. Go and play with it. I fyou break it. You can always download it again and restart.

Some ideas for you:

Conclusion

I hope you enjoyed this lab and that it made you discover the strength of blue team. Even better I hope it makes you realize the complexity of this part of the force, its own challenges. Now imagine that in a big company with thousands of servers, a growing business, configurations to manages, logs to review, alerts to investigate, false positive to kill, following-up on everyday new vulnerabilities and threats, keeping your rules alive and up to date (writing, testing, deploying), being part of meeting to make sure new projects consider cyber security at the very beginning and not at the end. Close your eyes. Let it sink in your mind. Realize how deep it is and all the possible cyber security roles around it.

Magic Cat

Cyber Spartan