首发站点 扶凯[http://www.php-oa.com]

使用Tripwire校验系统的完整性,在RedHat4,CentOS4中安装Tripwire

上一篇 / 下一篇  2008-03-21 16:31:00 / 个人分类:网络安全

近来在复习网络安全,以前搞过一些时间的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


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar