Download các tập luật

Một phần của tài liệu Xây dựng, quản lý, thực thi và cập nhật các tập luật (Trang 69 - 70)

4. Xây dựng và quản lý các tập luật

4.1.Download các tập luật

Trong các gói cài đặt Snort đã bao gồm các tập luật nhưng ta vẫn phải cập nhật các tập luật thường xuyên. Có thể download những tập luật mới nhất từ http://www.snort.org. Việc lưu các tập luật tại vị trí nào là do người quản trị hệ thống đặt ra. Một số người thích đặt trong thư mục /etc/snort, một số người khác thích đặt trong thư mục /usr/local/etc/snort. Ngoài ra ta cũng có thể copy vào file snort.conf. Một ví dụ quản lý các tập luật: tạo thư mục snort_rules trong thư mục /usr/local/share/. Trong thư mục snort_rules tạo các thư mục tương chẳng hạn /usr/local/share/snort_rules/010406. Download các tập luật vào các thư mục tương ứng rồi giải nén:

tar -zxvf snortrules-snapshot-2_1.tar.gz

Bất kể ta quyết định đặt các tập luật ở thư mục nào, cần chắc chắn rằng biến RULE_PATH trong file snort.conf được trỏ tới vị trí của thư mục chứa *.rules . Dưới đây là danh sách các file rules(mỗi luật bao gồm 1 file snort.conf và nhiều file *.config được dùng bởi Snort ):

attack-responses.rules local.rules shellcode.rules backdoor.rules misc.rules smtp.rules

bad-traffic.rules multimedia.rules snmp.rules chat.rules mysql.rules sql.rules ddos.rules netbios.rules telnet.rules deleted.rules nntp.rules tftp.rules dns.rules oracle.rules virus.rules

dos.rules other-ids.rules web-attacks.rules experimental.rules p2p.rules web-cgi.rules exploit.rules policy.rules web-client.rules finger.rules pop2.rules web-coldfusion.rules ftp.rules pop3.rules web-frontpage.rules icmp-info.rules porn.rules web-iis.rules icmp.rules rpc.rules web-misc.rules imap.rules rservices.rules web-php.rules info.rules scan.rules x11.rules

Mỗi file luật bao gồm 1 danh sách các luật được tổ chức dựa theo loại tấn công hoặc loại traffic cần theo dõi. Để disable một tập luật ta thêm dấu # trước dòng INCLUDE của file snort.conf. Để disable từng luật riêng rẽ ta thêm dấu # trước luật đó.

Một phần của tài liệu Xây dựng, quản lý, thực thi và cập nhật các tập luật (Trang 69 - 70)