HACKIS - Hacking Internet Security
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Tuyệt Kỹ Đong Giai Chân Kinh (tuyệt Kỹ cua trai)
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyThu Aug 23, 2012 5:38 am by Admin

» Tuyệt kỹ cua giai
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyThu Aug 23, 2012 5:36 am by Admin

» NETCAT.........
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyMon Aug 13, 2012 6:35 am by Admin

» Bảo mật CSDL bằng phương pháp mã hóa.
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyTue Apr 17, 2012 10:04 pm by Admin

» Hàm mã hóa MD5 bằng JavaScript
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyTue Apr 17, 2012 10:03 pm by Admin

» Giá của món quà
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyFri Apr 13, 2012 6:01 am by Admin

» Sẽ chỉ yêu ai?
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyFri Apr 13, 2012 6:01 am by Admin

» Cách đọc bảng chữ cái!
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyThu Apr 12, 2012 10:37 pm by Admin

» Gắn trojan, keylog, virus vào website, forum
Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  EmptyTue Apr 10, 2012 1:14 am by Admin

Affiliates
free forum


Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID

Go down

Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID  Empty Cài đặt nhanh hệ thống phát hiện xâm nhập dùng Snort+ACID

Post  Admin Mon Jun 13, 2011 4:16 am

Hướng dẫn cài đặt nhanh hệ thống phát hiện xâm nhập (IDS) trên Linux/Unix sử dụng Snort với cơ sở dữ liệu mysql để lưu log, alert và ACID làm giao diện theo dõi.

* Yêu cầu hệ thống:

- mysql-3.23+ http://www.mysql.org/
- apache-1.3+ http://httpd.apache.org/
- php-4.04+ http://www.php.net/
- snort-1.8.3+ http://www.snort.org/
- acid-0.9.6+ http://www.andrew.cmu.edu/~rdanyliw/snort/snortacid.html
- adodb-1.2+ http://php.weblogs.com/adodb
- phplot-4.4.6+ http://phplot.sourceforge.net/ (tuỳ chọn để xem các thống kê dạng biểu đồ đưọc vẽ bằng thư viện gd, yêu cầu php phải được biên dịch hỗ trợ gd)

* Giả thiết:

- Hệ thống đã được cài đặt mysql, apache, php và hoạt động tốt (ví dụ RH 7.2).
- Địa chỉ mạng cục bộ cần theo dõi: 192.168.1.0/24

* Cài đặt snort và cấu hình snort.

Download mã nguồn:
http://www.snort.org/dl/snort-1.8.6.tar.gz

Code:
# tar zxvf snort-1.8.6.tar.gz
# cd snort-1.8.6
# ./configure --with-mysql=/usr
# make
# make install
# mkdir /etc/snort
# cp *.rules classification.config snort.conf /etc/snort/

Tạo bảng dữ liệu để lưu trữ snort log, alert:

Code:
# mysql -u root -p
mysql> create database snort;
mysql> grant INSERT,SELECT on snort.* to snort@localhost identified by '<password>';
mysql> exit
# mysql snort -u root -p < ./contrib/create_mysql

Sửa các thông số sau trong file /etc/snort/snort.conf

Code:
var HOME_NET 192.168.1.0/24
...
output database: log, mysql, user=snort password=<password> dbname=snort host=localhost
output database: alert, mysql, user=snort password=<password> dbname=snort host=localhost
Khởi động snort:

Code:
# /usr/local/bin/snort -D -d -v -i eth0 -c /etc/snort/snort.conf

* Cài đặt và cấu hình acid

Download mã nguồn:
http://www.andrew.cmu.edu/~rdanyliw/snort/acid-0.9.6b21.tar.gz
http://phplens.com/lens/dl/adodb190.tgz
http://prdownloads.sourceforge.net/phplot/phplot-4.4.6.tar.gz

Giải nén và đặt adodb, acid vào thư mục con của httpd DocumentRoot:

Code:
# cp acid-0.9.6b21.tar.gz /var/www/html
# tar zxvf acid-0.9.6b21.tar.gz
# cp adodb190.tgz /var/www/html
# tar zxvf adodb190.tgz
# cp phplot-4.4.6.tar.gz /var/www/html
# tar zxvf phplot-4.4.6.tar.gz

Kiểm tra xem php có được cấu hình đúng với gd không:
http://locolhost/phplot-4.4.6/examples/test_setup.php

Nếu không xem được các biểu đồ ví dụ, bạn phải xem lại php có được biên dịch với thư viện gd và đã bật hỗ trợ gd trong /etc/php.ini chưa (extension=gd.so).

Tạo bảng dữ liệu để lưu trữ các alert dành riêng cho acid:

Code:
# mysql -u root -p
mysql> create database snort_archive;
mysql> grant INSERT,SELECT on snort.* to snort_archive@localhost identified by '<password>';
mysql> exit
# mysql snort -u root -p < create_acid_tbls_mysql.sql

Cấu hình các thông số cần thiết cho acid trong file acid_conf.php

Code:
$DBlib_path = "../adodb";
$DBtype = "mysql";

/* Alert DB connection parameters */

$alert_dbname = "snort";
$alert_host = "localhost";
$alert_port = "";
$alert_user = "snort";
$alert_password = "<password>";

/* Archive DB connection parameters */

$archive_dbname = "snort_archive";
$archive_host = "localhost";
$archive_port = "";
$archive_user = "snort";
$archive_password = "<password>";

$ChartLib_path = "../phplot-4.4.6"; // tuỳ chọn, nếu php hỗ trợ gd

/* File format of charts ('png', 'jpeg', 'gif') */
$chart_file_format = "png";

Để an toàn, nên thiết lập yêu cầu xác thực cho các truy xuất đến thư mục acid trên web server.

Code:
File /var/www/html/acid/.htaccess:

AuthName ACID Secure Area
AuthType Basic
AuthUserFile /var/www/html/acid/.htpasswd
Allow from all
<limit GET POST>
require valid-user
</limit>

File /var/www/html/acid/.htpasswd:
acid:<encrypted password>

Thiết lập browser của bạn cho phép tất cả cookie từ host chạy acid. Hoàn tất quá trình cài đặt và bắt đầu sử dụng acid để theo dõi các hoạt động trên mạng được snort phát hiện:

http://localhost/acid/

* Tham khảo:

http://www.snort.org/
http://www.andrew.cmu.edu/~rdanyliw/snort/snortacid.html


Admin
Admin
Admin

Tổng số bài gửi : 782
Join date : 2009-08-15

https://hackis.forumvi.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum