Difference between revisions of "Suricata: Test DDoS Attack"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 17: | Line 17: | ||
vi /etc/suricata/suricata.yaml | vi /etc/suricata/suricata.yaml | ||
+ | af-packet: | ||
+ | - interface: enp0s3 | ||
+ | .. | ||
rule-files: | rule-files: | ||
- suricata.rules | - suricata.rules |
Revision as of 09:54, 30 March 2020
Sumber: https://kifarunix.com/install-and-setup-suricata-on-ubuntu-18-04/
Kita akan uji nyali melakukan DDoS Attack ke server yan menjalankan SURICATA.
Menyiapkan Rules
Edit file
vi /etc/suricata/rules/test-ddos.rules
alert tcp any any -> $HOME_NET 80 (msg: "Possible DDoS attack"; flags: S; flow: stateless; threshold: type both, track by_dst, count 200, seconds 1; sid:1000001; rev:1;)
Rule ini akan mencatat jika ada 100 usaha connection dalam 10 detik.
Kita masukan rules test-ddos.rules di bagian rule-files:
vi /etc/suricata/suricata.yaml
af-packet: - interface: enp0s3 .. rule-files: - suricata.rules # - Custom Test rules - test-ddos.rules
Persiapan Attack
Pastikan kita disable packet offload features di network interface,
ethtool -K enp0s3 gro off lro off
Jika tidak bisa, tidak apa2. Pastikan denga perintah,
ethtool -k enp0s3 | grep large
large-receive-offload: off [fixed]
Run Suricata
Run,
killall suricata rm /var/run/suricata.pid suricata -D -c /etc/suricata/suricata.yaml -i enp0s3
Bisa dilihat dengan,
suricata --list-runmodes
Kali Linux Attack
Attack menggunakan Kali Linux
hping3 -S -p 80 --flood --rand-source 192.168.1.148
Bisa dilihat di
tail -f /var/log/suricata/fast.log