Suricata: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 7: Zeile 7:
 
*LANDEV=enp0s8
 
*LANDEV=enp0s8
 
{{#drawio:ids}}
 
{{#drawio:ids}}
=IDS=
+
*[[Suricata IDS]]
==Local Rules==
+
*[[Suricata IPS]]
*cat  /etc/suricata/rules/local.rules
 
alert icmp any any -> any any (msg:"ICMP Test"; sid:1000000002;)
 
alert tcp any any -> any any (flags: S; msg: "SYN packet"; sid:100000003;)
 
 
 
*https://suricata.readthedocs.io/en/suricata-6.0.0/rules/
 
 
 
==Start suricata==
 
*suricata -i $LANDEV
 
 
 
==check==
 
*tail -f /var/log/suricata/fast.log
 
  
 
=IPS=
 
=IPS=

Version vom 20. September 2022, 16:07 Uhr

Schaubild

suricata
  • WANDEV=enp0s3
  • LANDEV=enp0s8

IPS

  • Wir können mit iptables Pakete abfangen und einer QUEUE übergeben
  • Diese QUEUE wird von suricata gelesen und ihrem REGELWERK übergeben.
  • Wenn das Paket mit einer Regel übereinstimmt, wird eine Aktion ausgelöst.
  • Alert führt zu einer Meldung
  • Bei Drop wird das Paket verworfen.

Local Rules

  • cat /etc/suricata/rules/local.rules
drop icmp any any -> 10.0.10.11 any (msg:"DROP Test"; sid:1000000001;)
alert icmp any any -> any any (msg:"ICMP Alert Test"; sid:1000000002;)

Start suricata

  • suricata -q0

Send all Forward Packets to suricata

  • iptables -I FORWARD -i $WANDEV -o $LANDEV -j NFQUEUE

Links