Snort - Alert Log 分析

網址: http://sourceforge.net/

解壓縮 Snortsnarf[root@snort darwin]# tar zxvf SnortSnarf-1.0.tar.gz
因為snorfsnarf目錄內缺少Time-modules 所以要去下載安裝

解壓縮/安裝 Time-modules網址: http://www.cpan.org/modules/by-authors/id/MUIR/modules/
[root@snort darwin]# tar zxvf Time-modules-2006.0814.tar.gz
[root@snort darwin]# cd Time-modules-2006.0814
[root@snort Time-modules-2006.0814]# perl Makefile.PL
[root@snort Time-modules-2006.0814]# make
[root@snort Time-modules-2006.0814]# make install
[root@snort darwin]# mkdir /var/www/cgi-bin/snortsnarf  //存放一些perl的地方
[root@snort darwin]# mkdir /var/www/html/snortsnarf      //輸出index.html的地方

安裝snortsnarf[root@snort darwin]# cd SnortSnarf-1.0
[root@snort SnortSnarf-1.0]# cp cgi/* /var/www/cgi-bin/snortsnarf/
[root@snort SnortSnarf-1.0]# cp -r include/ /var/www/cgi-bin/snortsnarf/
[root@snort SnortSnarf-1.0]# cp snortsnarf.pl /var/www/cgi-bin/snortsnarf/
[root@snort snortsnarf]# cd /var/www/cgi-bin/snortsnarf/
[root@snort snortsnarf]# vi snortsnarf.pl

將第一行 #!/usr/bin/perl –w 的-w去掉
參數的意義如下:
-cgidir是apache中跑perl的地方
-d是輸出成網頁的地方
-homenet是自己的主機IP網段
-color設定顏色,只有yes及no,我當然是用yes啦!!
-rulesdir  snort規則地方
/var/log/snort/alert是snort的輸出檔 也就是alert檔案, 作為snortsnarf 分析使用,可以加上snort的相關輸出檔,也可以2個以上, 如果要snort輸出好幾個檔案,那就要在snort.conf中設定, 預設是關掉的

執行結果[root@snort snortsnarf]# perl snortsnarf.pl -cgidir /var/www/cgi-bin/snortsnarf -d /var/www/html/snortsnarf -homenet 102.168.1.* -color='yes' -rulesfile snort.conf -rulesdir /etc/snort/rules /var/log/snort/alert

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料