![]() |
|
$ tar xvzf libpcap-0.7.1.tar.gz $ cd libpcap-0.7.1 $ ./configure $ make $ su # make install |
checking for libnet version 1.0.2a... ./configure: libnet-config: command not found no ********************************************** ERROR: unable to find libnet 1.0.2a (libnet.h) checked in the following places ********************************************** |
$ wget http://www.packetfactory.net/libnet/dist/deprecated/libnet-1.0.2a.tar.gz $ tar xvzf libnet-1.0.2a.tar.gz $ cd Libnet-1.0.2a $ ./configure $ make $ su # make install # exit $ cd.. |
$ wget http://www.snort.org/dl/snort-2.0.0.tar.gz $ tar xvzf snort-2.0.0.tar.gz $ cd snort-2.0.0 $ ./configure --enable-flexresp --with-postgresql=/usr/local/pgsql $ make $ su # make install |
# mkdir /usr/local/snort # cp etc/snort.conf /usr/local/snort # cp etc/classification.config /usr/local/snort # cp etc/reference.config /usr/local/snort # cp etc/*.map /usr/local/snort # cp etc/sid /usr/local/snort # cp rules/*.rules /usr/local/snort/ # cp -R contrib /usr/local/snort/ # cd /usr/local/snort/ # vi snort.conf |
# mkdir /var/log/snort |
# /usr/local/bin/snort -i eth0 -c /usr/local/snort/snort.conf |
# useradd snort -s /bin/false # chown -R snort:snort /var/log/snort # chown -R snort.snort /usr/local/snort # chmod -R 770 /usr/local/snort # /usr/local/bin/snort -i eth0 -Dde -h 192.168.0.1/32 -u snort -g snort -l /var/log/snort \ -c /usr/local/snort/snort.conf |
# su - postgres $ createuser snort Shall the new user be allowed to create databases? (y/n) n Shall the new user be allowed to create more new users? (y/n) n CREATE USER $ cd /usr/local/snort/contrib $ createdb snort CREATE DATABASE $ psql -f create_postgresql snort snort $ exit |
# cd /usr/local/ # wget http://phplens.com/lens/dl/adodb340.tgz # tar xvzf adodb340.tgz # wget http://ftp1.sourceforge.net/phplot/phplot-4.4.6.tar.gz # tar xvzf phplot-4.4.6.tar.gz # ln -s phplot-4.4.6 phplot # cd /usr/local/apache/htdocs/ # wget http://acidlab.sourceforge.net/acid-0.9.6b23.tar.gz # tar xvzf acid-0.9.6b23.tar.gz |
$DBtype = "postgres"; $DBlib_path = "/usr/local/adodb"; $ChartLib_path = "/usr/local/phplot"; $alert_dbname = "snort"; $alert_host = "localhost"; $alert_port = ""; $alert_user = "snort"; $alert_password = ""; |
#!/bin/sh
#
# Startup script for the Snort IDS
#
# chkconfig: 345 91 35
# description: Snort IDS system.
# processname: snort
# pidfile: /var/run/snort_eth0.pid
# Source function library.
. /etc/rc.d/init.d/functions
SERVER="/usr/local/bin/snort"
ARGS="-i eth0 -Ddeo -u snort -g snort -l /var/log/snort -c /usr/local/snort/snort.conf"
# See how we were called.
case "$1" in
start)
echo -n "Starting snort: "
daemon "$SERVER $ARGS"
echo
touch /var/lock/subsys/snort
;;
stop)
echo -n "Shutting down snort: "
killproc snort
echo
rm -f /var/lock/subsys/snort
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
|
# chkconfig --add snortd # /etc/rc.d/init.d/snortd start |
/usr/local/bin/snort: error while loading shared libraries: libpq.so.2: cannot open shared object file: No such file or directory |
/usr/local/pgsql/lib |
# /sbin/ldconfig |
$ tar xvzf libpcap-0.7.1.tar.gz $ cd libpcap-0.7.1 $ ./configure $ make $ su # make install |
$ tar xvzf snort-1.9.0.tar.gz $ cd snort-1.9.0 $ ./configure $ make $ su # make install |
# mkdir /usr/local/snort # cp etc/snort.conf /usr/local/snort # cp etc/classification.config /usr/local/snort # cp etc/reference.config /usr/local/snort # cp etc/*.map /usr/local/snort # cp etc/sid /usr/local/snort # cp rules/*.rules /usr/local/snort/ # cd /usr/local/snort/ # vi snort.conf |
# mkdir /var/log/snort |
# /usr/local/bin/snort -i eth0 -c /usr/local/snort/snort.conf |
# useradd snort -s /bin/false # chown -R snort:snort /var/log/snort # /usr/local/bin/snort -i eth0 -Dde -h 192.168.0.1/32 -u snort -g snort -l /var/log/snort \ -c /usr/local/snort/snort.conf |
$ tar xvzf SnortSnarf-021024.1.tar.gz $ cd SnortSnarf-021024.1/Time-modules $ perl Makefile.PL $ make $ make test # su # make install # cd ../ # mkdir /usr/local/snortsnarf # cp -R * /usr/local/snortsnarf/ # cd /usr/local/snortsnarf # ./snortsnarf.pl -d /home/httpd/html/snort \ /var/log/snort/alert /var/log/snort/portscan.log |
# vi snortsnarf.sh ----------------------------------------------------------- #!/bin/sh cd /usr/local/snortsnarf ./snortsnarf.pl -d /home/httpd/html/snort /var/log/snort/alert /var/log/snort/portscan.log ----------------------------------------------------------- # chmod +x snortsnarf.sh |
$ tar xvzf oinkmaster-0.8.tar.gz $ cd oinkmaster-0.8 $ su # mkdir /usr/local/oinkmaster # cp oinkmaster.pl oinkmaster.conf /usr/local/oinkmaster |
# mkdir /usr/local/snort/backup # chown -R snort.snort /usr/local/snort/backup # chmod 770 /usr/local/snort/backup |
# su - # useradd -g snort -d /usr/local/oinkmaster oinkmaster # chown -R oinkmaster.snort /usr/local/oinkmaster # chmod -R 770 /usr/local/snort |
# mkdir /tmp/snort
# chown -R snort.snort /tmp/snort
# chmod 770 /tmp/snort
# cd /usr/local/oinkmaster
# su oinkmaster
$ ./oinkmaster.pl -o /tmp/snort -C /usr/local/oinkmaster/oinkmaster.conf
Downloading rules archive from http://www.snort.org/dl/rules/snortrules-stable.tar.gz...
13:04:57 URL:http://www.snort.org/dl/rules/snortrules-stable.tar.gz [112609/112609] -> "/tmp/oinkmaster.5429/snortrules.tar.gz" [1]
Archive successfully downloaded, unpacking... done.
Disabling rules... 5 out of 2039 rules disabled.
Setting up rules structures... done.
Comparing new files to the old ones... done.
[***] Results from Oinkmaster started Fri Oct 31 13:04:59 2003 [***]
[*] Rules modifications: [*]
None.
[*] Non-rule line modifications: [*]
None.
[+] Added files (consider updating your snort.conf to include them): [+]
-> attack-responses.rules
-> backdoor.rules
-> bad-traffic.rules
-> chat.rules
-> classification.config
-> ddos.rules
-> deleted.rules
-> dns.rules
-> dos.rules
-> experimental.rules
-> exploit.rules
-> finger.rules
-> ftp.rules
-> gen-msg.map
-> icmp-info.rules
-> icmp.rules
-> imap.rules
-> info.rules
-> misc.rules
-> multimedia.rules
-> mysql.rules
-> netbios.rules
-> nntp.rules
-> oracle.rules
-> other-ids.rules
-> p2p.rules
-> policy.rules
-> pop2.rules
-> pop3.rules
-> porn.rules
-> reference.config
-> rpc.rules
-> rservices.rules
-> scan.rules
-> shellcode.rules
-> sid-msg.map
-> smtp.rules
-> snmp.rules
-> sql.rules
-> telnet.rules
-> tftp.rules
-> virus.rules
-> web-attacks.rules
-> web-cgi.rules
-> web-client.rules
-> web-coldfusion.rules
-> web-frontpage.rules
-> web-iis.rules
-> web-misc.rules
-> web-php.rules
-> x11.rules
$ cd /tmp/snort
$ ls
attack-responses.rules info.rules shellcode.rules
backdoor.rules misc.rules sid-msg.map
bad-traffic.rules multimedia.rules smtp.rules
chat.rules mysql.rules snmp.rules
classification.config netbios.rules sql.rules
ddos.rules nntp.rules telnet.rules
deleted.rules oracle.rules tftp.rules
dns.rules other-ids.rules virus.rules
dos.rules p2p.rules web-attacks.rules
experimental.rules policy.rules web-cgi.rules
exploit.rules pop2.rules web-client.rules
finger.rules pop3.rules web-coldfusion.rules
ftp.rules porn.rules web-frontpage.rules
gen-msg.map reference.config web-iis.rules
icmp-info.rules rpc.rules web-misc.rules
icmp.rules rservices.rules web-php.rules
imap.rules scan.rules x11.rules
$ exit
|
# chown -R snort.snort /usr/local/snort # chmod 770 /usr/local/snort # cd /usr/local/oinkmaster # su oinkmaster $ ./oinkmaster.pl -o /usr/local/snort -b /usr/local/snort/backup -C /usr/local/oinkmaster/oinkmaster.conf $ ls /usr/local/snort/backup rules-backup-20031031-1308.tar.gz |
$ cat /usr/local/oinkmaster/oinkmaster.conf # $Id: oinkmaster.conf,v 1.73 2003/09/02 19:40:29 andreaso Exp $ # ################################################ # General options you may want to change # ################################################ # URL to the rules archive to download (or copy). # Must begin with http://, ftp:// or file:// and end with .tar.gz # Use this one if you're running the latest release version of Snort # (or following snort-STABLE): url = http://www.snort.org/dl/rules/snortrules-stable.tar.gz # Use this one *only* if you're following snort-CURRENT. # This ruleset usually only works with recent develop versions of Snort! # url = http://www.snort.org/dl/rules/snortrules-current.tar.gz # Or if you prefer to download the rules archive from outside Oinkmaster, # you can then point to the file on your local filesystem by using # file:// |
$ cd ~ $ ./oinkmaster.pl -o /usr/local/snort -r |
|
セキュリティ情報ディレクトリ リンク集 Presented by ITNAVI.com