[Day 9] 5. Suricata
Suricata is an open-source, high-performance Intrusion Detection and Prevention System (IDS/IPS) that analyzes network traffic for malicious activity. It’s fast, scalable, and supports real-time traffic analysis, alerting, and logging, making it a popular alternative to Snort for network security monitoring. It can be called as a lightweight and easy configurable version of Snort.
Suricata Installation and Configuration
-
Install Suricata:
bashsudo apt-get install suricata -
Check the status: Run the following command to see if Suricata is running. Initially, it should show as "failed":
bashsudo systemctl status suricata -
Edit Suricata YAML configuration: Open the Suricata configuration file:
bashsudo vim /etc/suricata/suricata.yaml-
Set the correct network interface: Look for the
section and change it to your working interface (e.g.,af-packet:).ens33 -
Add rule files: Search for the
section and add the following lines:rule-filesplaintextrule-files: - suricata.rules - local.rules
-
-
Create custom rules: Create a
file:local.rulesbashsudo nano /etc/suricata/rules/local.rulesAdd the following rule to
:local.rulestextalert icmp any any -> any any (msg: "Kuch Bhi"; sid:1000001; rev:1;) -
Restart and Check the Suricata status again:
bashsudo systemctl restart suricata sudo systemctl status suricata -
Test Suricata:
- Ping the machine from another device to generate traffic.
- Monitor Suricata logs in real-time using:
bashsudo tail -f /var/log/suricata/fast.log
This setup makes Suricata capture and alert on ICMP traffic, similar to Snort, but it's more lightweight and easier to configure. You can further refine Suricata's functionality by adding more specific rules or changing its configurations.
Read Next
[Day 9] 6. Blockchain
**Blockchain** is like a chain made of blocks. Each block holds some information, and the blocks are connected in a sequence. You can store anything i...
[Day 9] 7. Extra
#### **Root CA (Certificate Authority)** Once a **Root CA (Certificate Authority)** is created, it is kept secure and **untouched**. It is like a m...