OinkMaster
ติดตั้งและคอนฟิก OinkMaster (Update Snort Rules)
Download : http://oinkmaster.sourceforge.net/
(oinkmaster-2.0.tar.gz )
$ tar -zxvf oinkmaster-2.0.tar.gz
$ cd oinkmaster-2.0
$ cp oinkmaster.conf oinkmaster.pl /etc/snort/
$ chowm root:snort /etc/snort/*
$ chmod g+x /etc/snort/oinkmaster.pl
$ chmod g+w /etc/snort/ -R
$ cp oinkmaster.pl /usr/local/bin/
$ cp oinkmaster.1 /usr/local/man/man1/
ลงทะเบียนสมัครสมาชิก
https://www.snort.org/pub-bin/register.cgi
จากนั้น Login (https://www.snort.org/login/) เข้าระบบตามรหัสผ่านที่ได้รับ คลิกปุ่ม Get Codeแล้วนำ code มาใส่ตรง <oinkcode> และ uncomment URL
แก้ไขไฟล์คอนฟิก OinkMaster
$ vi /etc/snort/oinkmaster.conf
…
# Example for Snort 2.4
url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-2.4.tar.gz
…
$ cp oinkmaster-2.0/contrib/makesidex.pl /etc/snort
$ cd /etc/snort/
$ ./makesidex.pl /etc/snort/rules > autodisable.conf
คำสั่ง Update Rules (Never run this as root)
$ oinkmaster.pl -C /etc/snort/oinkmaster.conf -C /etc/snort/autodisable.conf -o /etc/snort/rules
...
alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS 443 (msg:"WEB-MISC SSLv3 invalid data version attempt"; flow:to_server,established; content:"|16 03|"; depth:2; content:"|01|"; depth:1; offset:5; content:!"|03|"; depth:1; offset:9; reference:bugtraq,10115; reference:cve,2004-0120; reference:nessus,12204; reference:url,www.microsoft.com/technet/security/bulletin/MS04-011.mspx; classtype:attempted-dos; sid:2505; rev:9;)
[*] Non-rule line modifications: [*]
None.
[+] Added files (consider updating your snort.conf to include them if needed): [+]
-> classification.config
-> reference.config
-> sid-msg.map
-> specific-threats.rules
-> spyware-put.rules
-> threshold.conf
-> unicode.map
-> VRT-License.txt
You have new mail in /var/mail/root
…
ตั้งเวลา Auto Update Rules (5:30 every morning)
$ crontab -e
#update snort rules
30 5 * * * snort /etc/snort/oinkmaster.pl -C /etc/snort/oinkmaster.conf -C /etc/autodisable.conf -o /etc/snort/rules | mail -s “OinkMaster” root@yourdomain
ReloadSnort
$ rcsnrot reload
Shutting down snort
=========================================================================
Snort received 20059 packets
Analyzed: 175(0.872%)
Dropped: 19884(99.128%)
=========================================================================
Breakdown by protocol:
TCP: 10 (0.050%)
UDP: 2 (0.010%)
ICMP: 0 (0.000%)
ARP: 0 (0.000%)
EAPOL: 0 (0.000%)
IPv6: 0 (0.000%)
ETHLOOP: 0 (0.000%)
IPX: 0 (0.000%)
FRAG: 0 (0.000%)
OTHER: 0 (0.000%)
DISCARD: 0 (0.000%)
=========================================================================
Action Stats:
ALERTS: 0
LOGGED: 0
PASSED: 0
=========================================================================
Snort exiting
done
Starting snort done
เป็นอันเสร็จ.

SUSE Linux Enterprise & openSUSE Community
SUSE Linux Enterprise Cool Solutions
|







































