Wazuh SIEM, Suricata IDS, OpenWRT
Suricata is a popular intrusion detection system (IDS) that monitors network traffic for suspicious activity. Wazuh XDR (Extended Detection and Response), on the other hand, is a tool that allows you to collect, analyze and correlate data from a variety of sources, such as operating systems, network devices, applications, databases and more. Integrating these two systems running on separate virtual machines makes it possible to create a security monitoring solution. In this article, I'll discuss how to combine Wazuh SIEM with Suricata IDS, running on a separate VM that receives network traffic routed from an OpenWRT router using iptables and the 'TEE' module which is used to clone network packets and forward them to another host or network interface.
I personally use Proxmox as a virtualization management platform to run and manage virtual machines (VMs) and containers (LXCs) on a physical server. With ready-made OVA (Open Virtual Appliance) images, installing Wazuh can be greatly simplified. All we need to do is convert the OVA file to a Proxmox-compatible format.
The next step is to configure the VM (Debian) for Suricata IDS with an additional network interface used only to listen for packets forwarded by OpenWRT (iptables-mod-tee). The configurations of the additional network bridge in Proxmox, which behaves like a HUB, are obtained through the parameter 'bridge_ageing 0'
I hook up an additional network interface 'vmbr1' to the VM and run Suricata in a Docker container for easy installation and management.
We still need to install the Wazuh agent, which is a lightweight client program that is installed on end systems (servers, desktops, virtual machines, containers, etc.) to monitor, collect data and provide threat protection on our machine where the IDS is running.
The basic configuration of the Wazuh agent like pointing to the 'eve.json' file which is the main log file used by Suricata to record network traffic analysis events and Suricata where we need to point to the appropriate network interface is described here.
The final step is to configure our router, or in this case OpenWRT, to duplicate network packets and forward them to the virtual machine where Suricata is running using the 'TEE' module in iptables.
Now we can check if the packets are duplicated correctly on the target machine using 'tcpdump', a tool used to capture and analyze network packets.
We can also see the event in Suricat's logs in the 'fast.log' file, which is a log used to record alerts detected by the IDS engine.
Incidents are also transferred to the user interface in the Wazuh platform for data visualization.
Integrating Suricata IDS with Wazuh brings many benefits, such as centralization of security management, advanced threat analysis, and automation of incident response. By combining these tools, it is possible to consolidate data from different sources, making it easier to identify and correlate incidents, supporting the detection of more complex attacks. Wazuh also enables automated corrective actions, incident notifications and compliance monitoring to help meet audit requirements.
If you do not see any traffic on the network interface that is used to capture packets then the problem may be with traffic routing and the two default gateways - the solution to the problem is here