在交互式检查模式功能中,Tripwire验证相对于原始数据库添加、删除或更改的文件或目录,并询问用户是否应更新数据库条目。此模式是保持数据库最新的最便捷方式,但它要求用户在控制台。如果您打算使用此模式,请按照以下简单步骤操作。
Tripwire必须有一个数据库进行比较,因此我们首先创建文件信息数据库。此操作将创建一个名为tw.db_[hostname]在您指定的用于保存数据库的目录中,其中[hostname]将被替换为您的机器主机名。要为Tripwire创建文件信息数据库,请使用命令
[root@deep] /# cd /var/spool/tripwire/ [root@deep ]/tripwire# /usr/sbin/tripwire --initialize |
一旦创建了Tripwire的文件信息数据库,我们现在就可以在交互式检查模式. 此模式将提示用户是否应更新系统上每个更改的条目以反映文件的当前状态。要在交互式检查模式下运行,请使用命令
[root@deep] /# cd /var/spool/tripwire/database/ [root@deep ]/database# cp tw.db_myserverhostname /var/spool/tripwire/ [root@deep ]/database# cd .. [root@deep ]/tripwire# /usr/sbin/tripwire --interactive |
Tripwire(tm) ASR (Academic Source Release) 1.3.1 File Integrity Assessment Software (c) 1992, Purdue Research Foundation, (c) 1997, 1999 Tripwire Security Systems, Inc. All Rights Reserved. Use Restricted to Authorized Licensees. ### Phase 1: Reading configuration file ### Phase 2: Generating file list ### Phase 3: Creating file information database ### Phase 4: Searching for inconsistencies ### ### Total files scanned: 15722 ### Files added: 34 ### Files deleted: 42 ### Files changed: 321 ### ### Total file violations: 397 ### added: -rwx------ root 22706 Dec 31 06:25:02 1999 /root/tmp/firewall ---> File: '/root/tmp/firewall' ---> Update entry? [YN(y)nh?] |
: 在交互模式下,Tripwire首先报告所有添加、删除和更改的文件,然后允许用户更新数据库中的条目。