近来在复习网络安全,以前搞过一些时间的CIW,近来想搞搞这个。公司的服务器上用。

安装前的配置

最开始先在 /etc/yum.repos.d/添加源

#vi kbsingh-CentOS-Extras.repo

加入下面的内容
-------------------------------------------------
[kbs-CentOS-Extras]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgcheck=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=1
baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/
-------------------------------------------------

安装

#yum install tripwire

检查安装结果

#cd /etc/tripwire

#ls

twcfg.txt twpol.txt

配置

运行下面的命令配置tripwire.在配置过程中会提示你输入site keyfile passphraselocal keyfile passphrase.
#
tripwire-setup-keyfiles

安装后的配置

为了安全起见,我们还需要删除明文形式的策略和配置文件,命令如下所示:
# rm twcfg.txt twpol.txt


使用Tripwire

产生初始化数据库,保存当前系统的状态, tripwire建立数据库并用local进行签名。 tripwire --init

使用数据库,校验系统当前的状态, tripwire –check

更新你的twpol.txt 策略文件后

#/usr/sbin/twadmin -m P /etc/tripwire/twpol.txt
#tripwire –init

定时检查

可在 /etc/cron.daily/ 下新增 script: (tw-check)
#!/bin/bash
/usr/sbin/tripwire -m c | mail -s "Tripwire Daily Report from {$HOSTNAME}" iakuf@163.comt

,

引用地址:http://www.php-oa.com/2007/10/17/%e4%bd%bf%e7%94%a8tripwire%e6%a0%a1%e9%aa%8c%e7%b3%bb%e7%bb%9f%e7%9a%84%e5%ae%8c%e6%95%b4%e6%80%a7%e5%9c%a8redhat4centos4%e4%b8%ad%e5%ae%89%e8%a3%85tripwire.html

要说点啥就在这吧