内容包括如下:
打造FC3下的snort+BASE中文入侵检测系统
数据库安全:如何安全的配置和应用MySQL数据库?
DNS配置全过程
Proxy Server
Linux下架设代理服务器
IPTABLES指南
Linux策略性路由应用及深入分析
PC SERVER的选型
LIDS入侵检测和防御系统安装与研究 (转贴)
Linux的用户和用户组管理
[转帖]打造FC3下的snort+BASE中文入侵检测系统
所需软件包:snort2-3.0.tar.gz
下载地址:http://www.snort.org
apache.xxx.tar.gz
php-4.x.x.tar.gz
mysql-4.x.x.tar.gz
pcre5.0.tar.gz
下载地址:http://sourceforge.net/project/showfiles.p...?group_id=10194
ADODB
http://sourceforge.net/project/showfiles.p...?group_id=42718
JPGraph
http://fresh.t-systems-sfr.com/unix/src/ww...aph-1.17.tar.gz
BASE
http://sourceforge.net/project/showfiles.p...ckage_id=128846
apache+php+mysql的安装就不介绍了,多的是
注意的是编译php要加上GD参数
我的安装方法:
mysql:
./configure --prefix=/usr/local/mysql
make
make install
apache:
./configure --enable-so
make
make install
php:
#./configure --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib --with-jpeg --with-gd --with-png
--enable-track-vars --enable-sockets --disable-debug ; make ; make install
安装完后在www目录用下面的test.php检测:
<? phpinfo();?>
看看有没有gd,mysql支持.
开始安装snort:
1.先安装pcre:
tar –xvzf pcre-5.0.tar.gz
cd pcre-5.0
./configure
make
make install
2.安装 snort-2.3.0.tar.gz
tar -xvzf snort-2.3.0.tar.gz
cd snort-2.3.0
./configure --with-mysql
make
make install
groupadd snort //建立snort用户组
useradd -g snort snort //增加snort用户,并加入snort组
mkdir /etc/snort //在etc下建立snort目录
mkdir /etc/snort/rules //在etc下建立snort规则目录
mkdir /var/log/snort //建立snort日志目录
cd rules
cp * /etc/snort/rules //拷贝规则到etc下
cd ../etc
cp * /etc/snort //拷贝配置文件到etc下
编辑/etc/snort.conf:
更改var HOME_NET 10.2.2.0/24 //为你工作的网段
更改“var RULE_PATH ../rules” to “var RULE_PATH /etc/snort/rules”
把下面一行前面的#去掉,并改为下面的样式:
output database: log, mysql, user=snort password=snort dbname=snort host=localhost //将snort日志写入mysql的数据库snort,用户
名和密码是snort,稍后在建立这些
保存退出
增加一行到 /etc/rc.local 下次可以自动启动snort
“/usr/local/bin/snort -c /etc/snort/snort.conf -i eth0 -g snort”
新建一个数据库snort,并建立用户名和密码snort:
mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('xxx'); //改root密码
>Query OK, 0 rows affected (0.25 sec)
mysql> create database snort;
>Query OK, 1 row affected (0.01 sec)
mysql> grant INSERT,SELECT on root.* to snort@localhost;
>Query OK, 0 rows affected (0.02 sec)
mysql> SET PASSWORD FOR snort@localhost=PASSWORD('snort');
>Query OK, 0 rows affected (0.25 sec)
mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort@localhost;
>Query OK, 0 rows affected (0.02 sec)
mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort;
>Query OK, 0 rows affected (0.02 sec)
mysql> exit
>Bye
执行下面的命令:
mysql -u root -p < ~/snortinstall/snort-2.3.0/schemas/create_mysql snort //为snort建立数据表
Enter password: //输入root的密码
检查数据库和数据结构:
mysql -p
>Enter password:
mysql> SHOW DATABASES;
(You should see the following)
+------------+
| Database
+------------+
| mysql
| Snort
| test
+------------+
3 rows in set (0.00 sec)
mysql> use snort
>Database changed
mysql> SHOW TABLES;
+------------------+
| Tables_in_snort
+------------------+
| data
| detail
| encoding
| event
| icmphdr
| iphdr
| opt
| reference
| reference_system
| schema
| sensor
| sig_class
| sig_reference
| signature
| tcphdr
| udphdr
+------------------+
16 rows in set (0.00 sec)
exit;
看到上面的表就成功了.
安装BASE部分:
1.先安装JPGraph:
cp jpgraph-1.17.tar.gz /var/www/html //拷贝到你的www目录
cd /var/www/html
tar –xvzf jpgraph-1.17.tar.gz
rm –rf jpgraph-1.17.tar.gz
cd jpgraph-1.17
rm -rf README
rm -rf QPL.txt
2.安装ADODB:
cp adodb460.tgz /var/www/html/
cd /var/www/html
tar -xvzf adodb460.tgz
rm –rf adodb460.tgz
3.安装 BASE:
cp base-1.0.2.tar.gz /var/www/html/ //拷贝到你的www目录
cd /var/www/html
tar –xvzf base-1.0.2.tar.gz
rm –rf base-1.0.2.tar.gz
mv base-1.0.2 base //目录改个名字
cd /var/www/html/base/
cp base_conf.php.dist base_conf.php
4.启动你的apache
登陆
http://localhost/base/
第一次进入时需要输入一些相关参数,如mysql的一些连接参数,要输入刚刚建立的snort,密码snort
还可以选择预言,最后修改数据库接口,成功.
建议现将/var/www/html/base改成可写,因为稍后base要把你输入的一些信息写入base_conf.php
查看的时候,需要现运行snort把数据写入mysql:
snort -c /etc/snort/snort.conf -g snort
然后在看base就可以看到我那个画面了,应该会有数据了.
have fun...
javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)"> screen.width-300)this.width = (screen.width-300)}" border="0" /> |
17:42 | 评论 (0)
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/