Różnice między wybraną wersją a wersją aktualną.
Nowa wersja | Poprzednia wersja | ||
notatki:security_ips_snort [2025/06/02 13:02] – utworzono administrator | notatki:security_ips_snort [2025/06/02 14:17] (aktualna) – administrator | ||
---|---|---|---|
Linia 1: | Linia 1: | ||
====== Security: pfSense IDS/IPS Snort ====== | ====== Security: pfSense IDS/IPS Snort ====== | ||
+ | |||
+ | źródło: https:// | ||
+ | |||
+ | ===== 1. Konfiguracja kodu OinkCode ===== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | ===== 2. Wymuszenie aktualizacji zasad ===== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | ===== 3. Dodanie interfejsu do monitorowania SNORT ===== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | ===== 4. Włączenie zasad community GPLv2 ===== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | ===== 5. Dodanie zasady żeby ping był reportowany ===== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | ===== 6. Test Ping ===== | ||
+ | |||
+ | {{.: | ||
+ | |||
+ | ===== 7. Dodanie innych reguł ===== | ||
+ | |||
+ | reguły dodane w custom.rules: | ||
+ | < | ||
+ | # BLOCK ICMP PING (Echo Request) | ||
+ | drop icmp any any -> any any (msg:" | ||
+ | |||
+ | # BLOCK NMAP Stealth Scan (SYN) | ||
+ | drop tcp any any -> any any (flags:S; msg:" | ||
+ | |||
+ | # BLOCK Null Scan | ||
+ | drop tcp any any -> any any (flags:0; msg:" | ||
+ | |||
+ | # BLOCK Xmas Scan | ||
+ | drop tcp any any -> any any (flags:FPU; msg:" | ||
+ | |||
+ | # BLOCK Shellcode-like Payloads | ||
+ | drop tcp any any -> any any (content:" | ||
+ | |||
+ | # BLOCK FTP Login Attempt | ||
+ | drop tcp any any -> any 21 (msg:" | ||
+ | |||
+ | # BLOCK Netcat Backdoor Attempt | ||
+ | drop tcp any any -> any 31337 (msg:" | ||
+ | |||
+ | # BLOCK HTTP Directory Traversal | ||
+ | drop tcp any any -> any 80 (msg:" | ||
+ | |||
+ | # BLOCK Suspicious User-Agent (e.g., sqlmap) | ||
+ | drop tcp any any -> any 80 (msg:" | ||
+ | |||
+ | # BLOCK IRC Bot Connection Attempt | ||
+ | drop tcp any any -> any 6667 (msg:" | ||
+ | </ | ||
+ | |||
+ | ===== 8. Przetestowanie za pomocą kali linux ===== | ||
+ | |||
+ | Historia poleceń kali:\\ | ||
+ | < | ||
+ | 104 ftp 172.16.32.1 | ||
+ | 105 ping 172.16.32.1 | ||
+ | 106 curl -A " | ||
+ | 107 nmap -sS -p 80 172.16.32.1\n | ||
+ | 108 nmap -sN -p 80 172.16.32.1\n | ||
+ | 109 nmap -sX -p 80 172.16.32.1\n | ||
+ | 110 printf ' | ||
+ | 111 telnet 172.16.32.1 21\n | ||
+ | 112 nc 172.16.32.1 31337\n | ||
+ | 113 curl http:// | ||
+ | 114 telnet 172.16.32.1 6667\n | ||
+ | 115 (echo "NICK bot123"; | ||
+ | 116 history | tail | ||
+ | </ | ||
+ | |||
+ | Logi z snorta:\\ | ||
+ | < | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | 06/ | ||
+ | </ | ||