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

  1. 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
    
  2. Download the Suricata ruleset:

    $ sudo suricata-update
    
  3. Edit Suricata settings in the /etc/suricata/suricata.yaml file 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>
    
  4. Restart the Suricata service:

    $ sudo systemctl restart suricata
    
  5. Append the following configuration to the /var/ossec/etc/ossec.conf file 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>
    
  6. Add the wazuh user to the suricata group to give the Wazuh agent read access to the /var/log/suricata directory:

    $ sudo usermod -aG suricata wazuh
    
  7. Restart the Wazuh agent to apply the changes:

    $ sudo systemctl restart wazuh-agent
    

Wazuh dashboard

  1. Navigate to Ruleset management > Overview.

  2. Enter suricata in the search box and select the suricata integration.

  3. Click the suricata integration name to open it, then click Actions and select Enable. Wait a few minutes before you generate test traffic.

    Wazuh dashboard Ruleset management page for the suricata integration with the Actions menu open and Enable highlighted

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.

Wazuh dashboard Threat Hunting Findings tab filtered by wazuh.integration.name suricata, showing the Suricata finding

Click the magnifying glass icon to view the finding details, including the source and destination IP addresses.

Wazuh dashboard document details panel for a Suricata finding showing the source and destination IP addresses