Network IDS integration
Wazuh integrates with a network-based intrusion detection system (NIDS) to enhance threat detection by monitoring and analyzing network traffic.
In this use case, you integrate Suricata with Wazuh. Suricata provides additional insights into your network's security with its network traffic inspection capabilities.
Infrastructure
Endpoint |
Description |
|---|---|
Ubuntu 24.04 |
This is the endpoint where you install Suricata. In this use case, Wazuh monitors and analyzes the network traffic generated on this endpoint. |
Configuration
Take the following steps to configure Suricata on the Ubuntu endpoint and send the generated logs to the Wazuh manager.
Ubuntu endpoint
Install Suricata on the Ubuntu endpoint. We tested this process with version 8.0.8:
$ sudo add-apt-repository ppa:oisf/suricata-stable $ sudo apt-get update $ sudo apt-get install suricata -y
Download the Suricata ruleset:
$ sudo suricata-update
Edit Suricata settings in the
/etc/suricata/suricata.yamlfile and change these values under their parent keys. Leave the other settings as they are:vars: address-groups: HOME_NET: "<UBUNTU_IP>" EXTERNAL_NET: "any" af-packet: - interface: <INTERFACE>
Replace
<UBUNTU_IP>with the IP address of the Ubuntu endpoint and<INTERFACE>with its network interface name.Run the following command to find the interface name:
$ ip -br link
The command output looks similar to this:
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> enp0s3 UP 08:00:27:14:65:bd <BROADCAST,MULTICAST,UP,LOWER_UP>
Restart the Suricata service:
$ sudo systemctl restart suricata
Append the following configuration to the
/var/ossec/etc/ossec.conffile of the Wazuh agent. This allows the Wazuh agent to read the Suricata log file:<ossec_config> <localfile> <log_format>json</log_format> <location>/var/log/suricata/eve.json</location> </localfile> </ossec_config>
Add the
wazuhuser to thesuricatagroup to give the Wazuh agent read access to the/var/log/suricatadirectory:$ sudo usermod -aG suricata wazuh
Restart the Wazuh agent to apply the changes:
$ sudo systemctl restart wazuh-agent
Wazuh dashboard
Navigate to Ruleset management > Overview.
Enter
suricatain the search box and select the suricata integration.Click the suricata integration name to open it, then click Actions and select Enable. Wait a few minutes before you generate test traffic.
Attack emulation
Wazuh automatically parses data from /var/log/suricata/eve.json and generates related findings on the Wazuh dashboard.
Run the command below on the Ubuntu endpoint to generate suspicious traffic:
$ curl -s http://1.1.1.1/
Check that Suricata raised an alert:
$ sudo grep '"event_type":"alert"' /var/log/suricata/eve.json | tail -1
The output includes "signature":"ET HUNTING curl User-Agent to Dotted Quad".
Visualize the findings
You can visualize the findings in the Wazuh dashboard. Go to Threat intelligence > Threat Hunting > Findings, then filter for wazuh.integration.name: suricata. The finding title is Suricata IDS alert triggered - uncategorized - ET HUNTING curl User-Agent to Dotted Quad.
Click the magnifying glass icon to view the finding details, including the source and destination IP addresses.