Hướng dẫn chi tiết cài đặt và cấu hình snort (ai cũng làm theo được)

9 10.6K 139
Hướng dẫn chi tiết cài đặt và cấu hình snort (ai cũng làm theo được)

Đang tải... (xem toàn văn)

Thông tin tài liệu

Guide install + test snort trên ubuntu 1. Cấu hình cài đặt thử nghiệm: • Snort 2.9.6.0 • Snort rule 2960 • Hệ điều hành Ubuntu 12.04 2. Các gói cần thiết phải có trước khi cài đặt snort. Đầu tiên kiểm tra xem hệ thống ping được ra ngoài mạng không sudo ping 8.8.8.8 Sau đó đặt ip tĩnh cho hệ thống: sudo vim /etc/network/interfaces Giải sử đặt địa chỉ tĩnh như sau: • auto eth0 • iface eth0 inet static • address 192.168.1.101 • netmask 255.255.255.0 • gateway 192.168.1.1 Sudo /etc/init.d/networking restart Tiếp theo phải update source.list đảm bảo link tải các gói còn hoạt động: sudo aptitude update Tiến hành cài các gói với câu lệnh : sudo aptitude install <tên gói> • Apache2 • php5 • php5-gd • php5-mysql • php-pear • mysql-client-5.5 • mysql-server-5.5 (chú ý khi cài đặt gói này phải đặt mật khẩu cho mysql) • libpcap0.8-dev • libmysqlclient-dev (tạo thư viện cho banyard 2) • g++ • make • libtool • libdnet-dev (cài đặt theo cấu hình mặc định) • libpcre3-dev • flex • byacc • bison • linux-headers-generic • autoconf (tạo file configure trong quá trình cài đặt banyard 2 ) Download các phần mềm bổ trợ, ở đây download tất cả vào /root/download mkdir /root/download sudo wget https://www.snort.org/downloads/2778 sudo tar xvfz 2778 (giải nén dap) sudo wget https://www.snort.org/downloads/2787 sudo tar xvfz 2787 (giải nén snort) sudo wget http:// libdnet.googlecode.com/files/libdnet-1.12.tgz tar xvfz libdnet-1.12.tgz 3. Cài đặt snort - Đầu tiên cài dap 2.0.2: cd /root/download/daq-2.0.2 ./configure && make && make install - Cài đặt libdnet cd /root/download/libdnet-1.12/ ./configure && make && make install ln -s /usr/local/lib/libdnet.1.0.1 /usr/lib/libdnet.1 - Cài snort: cd /root/download/snort-2.9.6.0 ./configure prefix=/etc/snort enable-sourcefire && make && make install # prefix: đưa toàn bộ file cài snort vào thư mục /etc/snort. Sau đó tạo môi trường cho snort hoạt động mkdir /var/log/snort groupadd snort useradd -g snort snort chown snort:snort /var/log/snort - Download rules (download tại trang chủ: http://www.snort.org/snort-rules/) tar xfzv snortrules-snapshot-2960.tar.gz -C /etc/snort/ mkdir /etc/snort/lib/snort_dynamicrules cp /etc/snort/so_rules/precompiled/Ubuntu-12.04/i386/2.9.6.0/* /etc/snort/lib/snort_dynamicrules touch /etc/snort/rules/white_list.rules touch /etc/snort/rules/black_list.rules ldconfig - Cấu hình snort : chỉnh sửa file snort.conf Edit snort.conf vim /etc/snort/etc/snort.conf #Edit RULE_PATH > /etc/snort/rules SO_RULE PATH > /etc/snort/rules PREPROC_RULE_PATH > /etc/snort/rules WHITELIST, BLACKLIST > /etc/snort/rules # thay đổi đường dẫn dynamicpreprocessor directory /etc/snort/lib/snort_dynamicpreprocessor/ dynamicengine /etc/snort/lib/snort_dynamicengine/libsf_engine.so dynamicdetection directory /etc/snort/lib/snort_dynamicrules # thêm dòng (nếu sử dụng banyard2 để import log vào cơ sở dữ liệu) output unified2: filename snort.u2, limit 128 #Uncomment các luật trong dynamic library rules - Kiểm tra snort đã hoạt động hay chưa: /etc/snort/bin/snort -u snort -g snort -c /etc/snort/etc/snort.conf . Kiểm tra snort đã hoạt động hay chưa: /etc /snort/ bin /snort -u snort -g snort -c /etc /snort/ etc /snort. conf

Ngày đăng: 03/07/2014, 16:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan