Suricata Integration with Wazuh [DL Series-6]
Gibin K John
Cybersecurity Professional | Skilled in Wazuh & Open-Source Security Tools | ISO/IEC 27001:2022 LA | CompTIA Security+ | Committed to Security Engineering & Cyber Defense
Welcome to the 6th part of our Detection Lab(DL) series. In this article, we’ll explore Suricata, a powerful open-source intrusion detection and prevention system (IDS/IPS), and its integration into and its integration into Wazuh .
What is Suricata?
Suricata is a high-performance, versatile, and open-source network threat detection engine developed by the Open Information Security Foundation (OISF). It functions as an intrusion detection system (IDS), intrusion prevention system (IPS), and network security monitoring (NSM) tool. Suricata is widely adopted for its ability to analyze network traffic in real-time, inspect protocols, and detect malicious activities using predefined rule sets.
Key Features of Suricata
Installing and Configuring Suricata in the Detection Lab
In our Detection Lab, we set up Suricata on a Linux endpoint running Ubuntu 22.04. Below are the steps to install and configure Suricata and integrate it with the Wazuh server.
Step 1: Install Suricata
First, add the official Suricata repository and install it:
sudo add-apt-repository ppa:oisf/suricata-stable
sudo apt-get update
sudo apt-get install suricata -y
Step 2: Download and Apply Emerging Threats Ruleset
Suricata uses rule sets to detect malicious activities. Download and extract the Emerging Threats 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 && sudo mkdir /etc/suricata/rules && sudo mv rules/*.rules /etc/suricata/rules/
sudo chmod 640 /etc/suricata/rules/*.rules
Step 3: Configure Suricata
Identify your network interface by using this command:
ip addr
Open the suricata.yaml file
vi /etc/suricata/suricata.yaml
Make the following changes
HOME_NET: "<Linux EP_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
Step 4: Enable Suricata Service
sudo systemctl daemon-reload
sudo systemctl enable suricata.service
sudo systemctl start suricata.service
领英推荐
Step 5: Configure Wazuh to Monitor Suricata Logs
Edit the Wazuh agent configuration file to read Suricata’s logs by adding the following configuration snippet:
vi /var/ossec/etc/ossec.conf
<localfile>
<log_format>json</log_format>
<location>/var/log/suricata/eve.json</location>
</localfile>
Restart Wazuh agent
sudo systemctl restart wazuh-agent.service
Test the Setup
Verify Suricata Installation
To confirm that Suricata is running and logging events, use the following command to tail the fast.log file:
tail -f /var/log/suricata/fast.log
You should see output similar to below snippet:
Check Logs in the Wazuh Dashboard
Navigate to the Wazuh dashboard and go to the Discover section. Add the following filter to display Suricata logs:
Once filter is applied, you should see Suricata events populated in the Wazuh dashboard as shown in the above snippet, confirming successful integration.
Acknowledgments
I extend my gratitude to the founder of Wazuh - Santiago Bassett for creating an exceptional platform that empowers security professionals with robust monitoring and incident response capabilities. A special acknowledgment also goes to the Suricata Project | Open Information Security Foundation (OISF) for developing Suricata, a powerful and versatile tool that has revolutionized network security monitoring and threat detection.
Upcoming
In our next article, we’ll dive into the power of jq — a versatile tool for parsing and processing JSON data. Using the Suricata logs we set up in this article, we’ll learn how to filter, format, and extract critical insights, turning raw logs into actionable intelligence for effective security monitoring.
Check out the next article here: Suricata Log Parsing using jq [DL Series-7]
Feel free to ask questions or share your feedback in the comments section — I’d love to hear from you! You can also connect with me on Gibin John to to clarify any doubts or continue the conversation.
Follow my Medium profile to stay updated on the full series: Gibin John.
#SuricataIntegration #Wazuh #NetworkSecurity #ThreatDetection #CyberSecurityTools #IntrusionDetection #OpenSourceSecurity #SecurityMonitoring #DetectionLab #CyberThreats #SuricataLogs #SOCEngineering #JSONParsing #CyberDefense #EndpointSecurity #LogAnalysis #SecurityTools #ITSecurity #SIEMIntegration #IncidentResponse
Thanks a lot. Very helpful
IT Management || Security Awareness || Phishing Analysis || Risk Assessments || Vulnerability Scans || Firewall Mgmt || Endpoint Security || System Administration || PowerShell || HIPAA
3 周Great post, the step-by-step is very helpful. Do you have anything on creating custom alerts?
| SOC Analyst | CSA | NSE 1 | Blue Team | SOC | NOC | Incident Response | Information Security
1 个月Great article. I have the knowledge for implementations for Linux servers, however I find it difficult to handle the suricata configuration file, when they are on a Windows server. Suricata is consuming a lot of server resources and does not obey the log file size limitation rule. Do you have any suggestions?
?? International Keynote Speaker | Driving OEM Partnerships & Cybersecurity Innovation | Empowering Businesses to Thrive in a Secured Digital World ?? | Strategic Advisor | #nodrama
1 个月Great article!
IT specialist|Computer System Security Expert | SOC Analyst
1 个月In addition to that using SELK vs Suricat&Wazuh arcitecture which one is more reliable on your side