<![CDATA[Latest posts for the topic "BASE trên Snort không hiển thị thông tin."]]> /hvaonline/posts/list/24.html JForum - http://www.jforum.net BASE trên Snort không hiển thị thông tin. Code:
output unified2: filename snort.log, limit 128
file config của Barnyard là: Code:
config logdir: /var/log/barnyard2
config hostname:        localhost
config interface:       eth0
config waldo_file: /var/log/snort/barnyard2.waldo
output database: log, mysql, user=snort password=snortpass dbname=snort host=localhost
Các file, thư mục cần thiết em đã đều tạo rồi, cơ sở dữ liệu cũng đã tạo fie base_conf.php Code:
$alert_dbname   = 'snort';
$alert_host     = 'localhost';
$alert_port     = '';
$alert_user     = 'snort';
$alert_password = 'snortpass';
Sau đó em viết thử một rule để test trong local.rules như sau Code:
alert icmp any any -> any any (msg:"ICMP Testing Rule"; sid:1000001;)
alert tcp any any -> any 80 (msg:"TCP Testing Rule"; sid:1000002;)
alert udp any any -> any any (msg:"UDP Testing Rule"; sid:1000003;)
Start snort và barnyard2 Code:
# snort -c /etc/snort/snort.conf -A console
# barnyard2 -c /etc/snort/barnyard2 -d /var/log/barnard2/ -f snort.log -w /var/log/snort/barnyard2.waldo
Sau đó em thử ping tử một máy khác thì các cảnh báo đã hiển ra console. Nhưng khi truy cập vô BASE thì lại không thấy bất cứ cái gì, log trong /var/log/snort cũng đã được tạo ra. Em không biết sai chỗ nào, nhở mọi người giúp đỡ với ạ ]]>
/hvaonline/posts/list/43893.html#271505 /hvaonline/posts/list/43893.html#271505 GMT
BASE trên Snort không hiển thị thông tin. Code:
chmod 755 -R /var/log/snort
Và test lại thử nhưng BASE vẫn chưa thể đọc được log của Snort.]]>
/hvaonline/posts/list/43893.html#271507 /hvaonline/posts/list/43893.html#271507 GMT
BASE trên Snort không hiển thị thông tin. /hvaonline/posts/list/43893.html#271513 /hvaonline/posts/list/43893.html#271513 GMT BASE trên Snort không hiển thị thông tin.

vd_ wrote:
barnyard2 đã đưa được vào mysql chưa? snort -> unified2 -> barnyard2 -> mysql BASE chỉ đọc từ mysql nên bạn phải chắc barnyard2 đã out ra được mysql 
Vấn đề của mình chính là chỗ này, hôm qua khi xem mình cứ nghĩ là do permision của thư mục chứa log mà BASE ko thể đọc được. Sau đó mình thử kiểm tra lại tất cả cấu hình và các file config, sau đó start lại Snort và start lại Barnyard2 và thấy log có tạo ra đúng thuộc sở hữu của Snort. Sau đó mình để ý thấy một điều lại là Barnyard2 không record bất cứ gói tin nào. Dù bên Snort vẫn báo có khoảng bao nhiêu % gói tin TCP, ICMP... Vấn đề mình đã xác định được là do Barnyard2 ko record đc, nhưng kiểm tra đi kiểm tra lại vấn chưa thấy lỗi ở đâu.]]>
/hvaonline/posts/list/43893.html#271529 /hvaonline/posts/list/43893.html#271529 GMT
BASE trên Snort không hiển thị thông tin. /hvaonline/posts/list/43893.html#271538 /hvaonline/posts/list/43893.html#271538 GMT BASE trên Snort không hiển thị thông tin. Code:
# ./configure --with-mysql –with-mysql-libraries=/usr/lib64/mysql && make && make install
# cp etc/barnyard2.conf /etc/snort # Copy tập tin cấu hình của Barnyard2 đặt vào thư mục cấu hình của Snort.
# mkdir /var/log/barnyard2
# chmod 666 /var/log/barnyard2
# touch /var/log/snort/barnyard2.waldo
# cp sid-msg.map /etc/snort -> file này nằm trong tập luật tải về.
Tập tin cấu hình của Barnyard2 như sau: Code:
config reference_file: /etc/snort/reference.config
config classification_file: /etc/snort/classification.config
config gen_file: /etc/snort/gen-msg.map
config sid_file: /etc/snort/sid-msg.map
config logdir: /var/log/barnyard2
config hostname: localhost
config interface: eth0
config waldo_file: /var/log/snort/barnyard2.waldo
#output alert_fast: stdout
output database: log, mysql, user=snort password=snortpass dbname=snort host=localhost
Sau đó em chạy snort và barnyard2 với 2 command sau Code:
# snort –u snort –g snort-c /etc/snort/snort.conf –i eth0
# barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort/ -f snort.log -w /var/log/snort/barnyard2waldo
Và kết quả là Barnyard2 không record đc packet nào.]]>
/hvaonline/posts/list/43893.html#271630 /hvaonline/posts/list/43893.html#271630 GMT
BASE trên Snort không hiển thị thông tin. /hvaonline/posts/list/43893.html#271683 /hvaonline/posts/list/43893.html#271683 GMT BASE trên Snort không hiển thị thông tin.

vd_ wrote:
1. thư mục /var/log/snort có file unified2 nào không? => đảm bảo snort đã capture được[code] 
Dạ, đã có log dạng snort.log.xxx rồi. Và đã có thông tin trong đó luôn

vd_ wrote:
2. file waldo là barnyard2.waldo hay là barnyard2waldo? 
Chỗ này em paste nhầm, command chạy đúng là file baryard2.waldo.]]>
/hvaonline/posts/list/43893.html#271710 /hvaonline/posts/list/43893.html#271710 GMT
BASE trên Snort không hiển thị thông tin. /hvaonline/posts/list/43893.html#271717 /hvaonline/posts/list/43893.html#271717 GMT