snort base daq ids


約束:ダウンロードアドレスが提示されていない場合はsourceforgeでダウンロードできます.
一、lamp環境の構成

  
  
  
  
  1. yum install pcre pcre-devel php php-common php-gd php-cli php-mysql mysql mysql-devel mysql-bench mysql-server  kernel-devel libxml2-devel vim-enhanced 
  2. service httpd start 
  3. service mysqld start 
  4. chkconfig --add httpd  
  5. chkconfig --add mysqld  
  6. chkconfig httpd on 
  7. chkconfig mysqld on 

二、libpcapの配置
 

  
  
  
  
  1. [root@onlinepay src]# tar -xf ~/libpcap-1.0.0.tar.gz   
  2. [root@onlinepay src]# ls 
  3. libpcap-1.0.0  snort-2.9.4 
  4. [root@onlinepay src]# cd libpcap-1.0.0/ 
  5. [root@onlinepay libpcap-1.0.0]# ./configure --prefix=/usr/local/libpcap
  6. [root@onlinepay libpcap-1.0.0]#mkdir -p /usr/local/libpcap/bin/ 
  7. [root@onlinepay libpcap-1.0.0]#make && make test && make install

  8.  

三、libdnetの構成
 

  
  
  
  
  1. [root@onlinepay src]# tar -xf ~/libdnet-1.12.tgz
  2. [root@onlinepay src]# cd libdnet-1.12/ 
  3. [root@onlinepay libdnet-1.12]# ./configure --prefix=/usr/local/libdnet 
  4. [root@onlinepay libdnet-1.12]# make && make install

四、daqの配置
daqダウンロードアドレスhttp://www.snort.org/downloads/2103
[root@onlinepay daq-2.0.0]# ./configure  --prefix=/usr/local/daq \
--with-libpcap-libraries=/usr/local/libpcap/lib/ \
--with-libpcap-includes=/usr/local/libpcap/include 
[root@onlinepay daq-2.0.0]# make && make install
五、コンパイルsnort
 

  
  
  
  
  1. [root@onlinepay snort-2.9.4]# ls 
  2. aclocal.m4    config.sub    COPYING  install-sh  Makefile.am    preproc_rules  snort.pc.in  verstuff.pl 
  3. ChangeLog     configure     depcomp  LICENSE     Makefile.in    RELEASE.NOTES  src          ylwrap 
  4. config.guess  configure.in  doc      ltmain.sh   missing        rpm            templates 
  5. config.h.in   contrib       etc      m4          mkinstalldirs  snort.8        tools 
  6. ./configure --prefix=/usr/local/snort --with-mysql\
  7. --with-libpcap-libraries=/usr/local/libpcap/lib\
  8. --with-libpcap-includes=/usr/local/libpcap/include\
  9. --with-dnet-libraries=/usr/local/libdnet/lib\
  10. --with-dnet-includes=/usr/local/libdnet/include\
  11. --with-daq-includes=/usr/local/daq/include\
  12. --with-daq-libraries=/usr/local/daq/lib/daq --enable-zlib

が表示された場合configure:line 21270:daq-modules-config:command not found daq-modules-configをpathに追加するかどうか、実行可能な権限があるかどうかを確認してください.
 

  
  
  
  
  1. configure: WARNING: unrecognized options: --with-mysql 
  2. [root@onlinepay snort-2.9.4]# make && make install 

ここのエラーは無視できます.
 
六.snortの構成
 

  
  
  
  
  1. [root@onlinepay snort-2.9.4]# mkdir /etc/snort 
  2. [root@onlinepay snort-2.9.4]# mkdir -p /var/log/snort 
  3. [root@onlinepay snort-2.9.4]# pwd 
  4. /usr/local/src/snort-2.9.4 
  5. [root@onlinepay snort-2.9.4]# cp etc/* /etc/snort/ 
  6. [root@onlinepay snort-2.9.4]#  

七、ロードルールファイル
解凍ルールファイルsnortrules-snapshot-2.8をダウンロードします.tar.gz  http://vdisk.weibo.com/s/lB1gI

  

  1. [root@onlinepay src]# tar -xvf ~/snortrules-snapshot-2.8.tar.gz
  2. [root@onlinepay src]# cp -R so_rules/ /etc/snort/

八、テストsnortインストール
 

  
  
  
  
  1. [root@onlinepay src]# /usr/local/snort/bin/snort -V 
  2.  
  3.    ,,_     -*> Snort! <*- 
  4.   o"  )~   Version 2.9.4 GRE (Build 40)  
  5.    ''''    By Martin Roesch & The Snort Team: http://www.snort.org/snort/snort-team 
  6.            Copyright (C) 1998-2012 Sourcefire, Inc., et al. 
  7.            Using libpcap version 1.0.0 
  8.            Using PCRE version: 6.6 06-Feb-2006 
  9.            Using ZLIB version: 1.2.3 

以上のようなヒントがあれば使えます
九、データベースの設定
未完待機
本文は“望月飛魚”のブログから出て、転載して作者と連絡してください!