在正式安裝前,請大家先下載下列檔案
.appserv-win32-2.4.1.exe
作用:可快速建立Apache/PHP/MySQL環境。
網址:http://prdownloads.sourceforge.net/appserv/appserv-win32-2.4.1.exe?download
備註:請下載2.4.1版本即可,否則Snort連結至MySQL會產生錯誤。
.WinPcap_3_0.exe
作用:把網卡設置為“混雜”模式,然後處理網路截取的封包
網址:http://www.winpcap.org/install/bin/WinPcap_3_0.exe
備註:原本在電腦中可能存在的版本3.1須先刪除,在安裝3.0版。
.Snort_232_Build12_Installer.exe
作用:Windows版的Snort安裝程式
網址:http://www.snort.org/dl/binaries/win32/old/Snort_232_Build12_Installer.exe
.acid-0.9.6b23.tar.gz
作用:PHP網頁模式的入侵偵測資料庫分析控制台。
網址:http://www.andrew.cmu.edu/user/rdanyliw/snort/acid-0.9.6b23.tar.gz
.adodb461.zip
作用:PHP資料庫程式庫
網址:http://prdownloads.sourceforge.net/adodb/adodb461.zip?download
.jpgraph-1.17.tar.gz
作用:Object-Oriented圖形程式庫For
PHP
網址:http://members.chello.se/jpgraph/jpgdownloads/jpgraph-1.19.tar.gz
安裝步驟
一、首先安裝appserv-win32-2.4.1.exe。
二、安裝完畢後,至C:\WINDOWS開啟php.ini這個檔案,尋找
allow_call_time_pass_reference
= Off字串,將它更改為
allow_call_time_pass_reference =
On後,存檔離開。
三、『開始』→『程式集』→『Appserv』→『Apache Control Server』
→『Apache
Monitor』,會出現在系統列(小時鐘旁邊),按右鍵
『Open Apache
Monitor』開啟後,按下『restart』重新載入php.ini
四、開啟IE,網址打入自己的IP位址(http://localhost)測試Appserv是否安裝成功。
五、安裝WinPcap_3_0.exe。
六、安裝Snort_232_Build12_Installer.exe
七、進入http://localhost/phpmyadmin新增Snort使用者
使用者名稱:snort
主 機:% (設定任何主機都可登入)
密 碼:(自己設定)
確認密
碼:(自己設定)
八、建立snort與snort_archive資料庫。
九、匯入C:\Snort\schemas內之create_mysql為snort與snort_archive資料庫資料庫結構。
十、解壓縮adodb461.zip至C:\Appserv\php\adodb目錄中
十一、解壓縮jpgraph-1.17.tar.gz至C:\Appserv\php\jpgraph目錄中
十二、解壓縮acid-0.9.6b23.tar.gz至C:\Appserv\www\acid目錄中
十三、編輯C:\Appserv\www\acid\acid_conf.php檔案如下(利用尋找功能去修改字串)
$DBlib_path="c:\appserv\php\adodb"
$alert_dbname = "snort";
$alert_host =
"localhost";
$alert_port = "";
$alert_user = "root";
$alert_password =
"";
$archive_dbname = "snort_archive";
$archive_host =
"localhost";
$archive_port = "";
$archive_user =
"root";
$archive_password = "";
$ChartLib_path =
"c:\AppServ\php\jpgraph\src";
十四、建立acid所需要的資料庫,使用IE進入http://localhost/acid/acid_db_setup.php
依照指示建立即可。
十五、編輯C:\Snort\etc\snort.config檔案如下
var RULE_PATH
c:\snortules
output database: alert, mysql, user=snort
password=snort dbname=snort host=localhost (若沒有設定密碼,不需要password)
include
c:\Snort\etc\classification.config
include c:\Snort\etceference.config
十六、至C:\Snort\bin目錄底下新增runsnort.bat檔案,內容如下
snort
-c "c:\snort\etc\snort.config" -l "c:\snort\log" -d -e
-X
十七、『開始』→『執行』鍵入cmd進入命令提示字元模式,鍵入
『cd
c:\snort\bin』至C:\snort\bin目錄下,再鍵入『runsnort』。
十八、開啟後勿關閉視窗。回到IE打入http://localhost/acid觀看,即完成Snort設定。
=======================================================================
補充:
安裝SAM(Snort
Alert Monitor)
安裝文件列表
.j2re-1_4_2_07-windows-i586-p.exe
功用:Java Runtime
Environment,安裝後才能執行sam.jar程式
網址:http://java.sun.com/j2se/1.4.2/download.html
.sam_20050206_bin.zip
功能:Snort監控程式
網址:http://prdownloads.sourceforge.net/snortalertmon/sam_20050206_bin.zip?download
安裝步驟
一、安裝j2re-1_4_2_07-windows-i586-p.exe後,解壓縮
sam_20050206_bin.zip至C:\SAM目錄中,利用JRE開啟
sam.jar程式。
二、Database
Login畫面中設定
hostname→localhost:3306
Database→snort
username→snort
password→(剛才在mysql設定snort的密碼)
按下OK即可。
======================================================================
原始網址:http://blog.xuite.net/big.chris/nids/4500109
下一則: 輕鬆解決各種疑難雜症 免費實用的Sysinternals Utilities技術問答TOP 11(續)