Sending Suricata Logs to Wazuh

In the previous article’s we saw installation of Suricata and Wazuh in Ubuntu, now let’s see how we can send Suricata logs to Wazuh using wazuh agents.

Let’s first check the status of Suricata,

sudo systemctl status suricata

Now that suricata is running, let us deploy wazuh agents on Suricata machine.

Using the Wazuh Dashboard, deploy agent give the wazuh machine IP in the Server address and name the agent and run the generated command in the Suricata machine.

Copy the generated commands and run the command in the suricata machine,

Once the agent is installed reload and start the agent.

Once the agent starts we can view the agent information in the wazuh dashboard.

Once the agent is successfully deployed, change the directory to /var/ossec/etc and edit ossec.conf

Add the suricata eve.json file path as shown below.

In the suricata machine, download and extract the Emerging Threats Suricata ruleset

cd /tmp/ && curl -LO https://rules.emergingthreats.net/open/suricata-6.0.8/emerging.rules.tar.gz
sudo tar -xvzf emerging.rules.tar.gz && mkdir /etc/suricata/rules && sudo mv rules/*.rules /etc/suricata/rules/
sudo chmod 640 /etc/suricata/rules/*.rules

Now modify Suricata settings in the /etc/suricata/suricata.yaml file and set the following variables

HOME_NET: "<UBUNTU_IP>"
EXTERNAL_NET: "any"
default-rule-path: /etc/suricata/rules
rule-files:
- "*.rules"
# Global stats configuration
stats:
enabled: yes
# Linux high speed capture support
af-packet:
- interface: enp0s3

Now restart Suricata and wazuh-agent,

systemctl restart suricata
systemctl restart wazuh-agent

Wazuh automatically parses data from /var/log/suricata/eve.json and generates related alerts on the Wazuh dashboard.

Ping the Ubuntu endpoint IP address from the Wazuh server

ping -c 20 "<UBUNTU_IP>"

Now we can see the Suricata logs in Wazuh Dashboard.

Subscribe to our YouTube channel: https://www.youtube.com/@CyberToolGuardian/featured

Follow us on Instagram:
https://instagram.com/cybertoolguardian

Check out the website:
https://cybertoolguardain.com

Comments

Popular posts from this blog

Zeek Installation in Ubuntu

What is ELK and Installing ELK stack (elasticsearch, logstash, kibana) in Ubuntu

Sending Zeek logs to ELK using Filebeats