linux实现数据完整性检查工具 tripwire

Tripwire是一款开放源码的完整性检查工具,Tripwire会对文件或目录状态生成唯一的标识(又称为 "快照"),并将其存放起来以备后用。当Tripwire程序运行时,与快照比较,如果发现不匹配的话,它就报告系统管理人员文件已经被修改。

通过对以上运行机制的了解我们不难发现,完整性检查工具的安装时机非常重要,最好是在交付用户使用和连入网络之前的Linux系统初装时进行。因为完整性检查工具只有保留了系统文件的初始状态(快照),才能确保系统文件的完整性;如果在系统使用一段时间后再取其快照的话,它很可能已经不再是原系统文件的映象(如已经遭到破坏),所以这时的完整性检测的可靠性已经打了折扣


实验环境

centos-5.8


实验软件

gcc gcc-c++ make wget

tripwire-2.4.2-src.tar.bz2


软件安装

yum install -y gcc gcc-c++ make wget

tar jxvf tripwire-2.4.2-src.tar.bz2

cd tripwire-2.4.2-src

./configure --prefix=/usr/local/tripwire

make

make install

Press ENTER to view the License Agreement.            q跳过

license agreement. [do not accept] accept             注册信息

Continue with installation? [y/n]  y

Enter the site keyfile passphrase:                    输入密码

Verify the site keyfile passphrase:                   二次确认

Enter the local keyfile passphrase:                   输入密码和第一次的一样

Verify the local keyfile passphrase:                                        

Please enter your site passphrase:                                            

这样tripwire就安装完毕了


配置

cd /usr/local/etc/

ll

total 44

-rw-r----- 1 root root   931 Nov 26 14:49 localhost.localdomain-local.key

-rw-r----- 1 root root   931 Nov 26 14:49 site.key

-rw-r----- 1 root root  4586 Nov 26 14:49 tw.cfg

-rw-r----- 1 root root   516 Nov 26 14:49 twcfg.txt

-rw-r----- 1 root root  4159 Nov 26 14:49 tw.pol

-rw-r----- 1 root root 13715 Nov 26 14:49 twpol.txt


twadmin   --create-cfgfile --cfgfile tw.cfg --site-keyfile site.key twcfg.txt

twadmin   --create-polfile –cfgfile tw.cfg --site-keyfile site.key twpol.txt

                                                   对这两个文件做签名处理

tripwire  --init                                    策略初始化

tripwire --check                                    初始化检查




本文转自 mailfile 51CTO博客,原文链接:http://blog.51cto.com/mailfile/1332335,如需转载请自行联系原作者

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值