■レベル0でのレポートファイル表示

 次に簡易で表示される、レベル0でも同様に行ってみる。

# twprint --print-report --report-level 0 --twrfile /var/lib/tripwire/report/linux-20021007-103915.twr

Note: Report is not encrypted.
TWReport linux 20021007103915 V:1 S:33 A:0 R:0 C:1

 表示されたレポートファイルの見方は下記のようになる。

V:違反の数
S:重要度
A:追加ファイル
R:削除ファイル
C:変更ファイル

 上記のレベル0のレポートファイルは「 V:1 S:33 A:0 R:0 C:1」とされているので、違反が1個、重要度は33、変更ファイルが1個ある、ということが分かる。このように、レベルを指定することで、状況にあわせてレポートファイルを参照することができるわけだ。

■データーベースのアップデート

 今回は、index.htmlを変更したため違反として報告されたが、このままでは毎回チェック時に違反として報告されることになる。たとえば、管理者が故意に変更したファイルを、次回からの整合性チェック時には違反として報告しないようにするには、データーベースをその都度アップデートする必要があるわけだ。

 では、今回の変更を次回から違反として報告しないようにデーターベースをアップデートしてみよう。

 アップデートは

tripwire --update --twrfile [レポートファイルへのパス]

のようにして行う。

# tripwire --update --twrfile /var/lib/tripwire/report/linux-20021007-103915.twr

 上記のようにコマンドを入力するとエディタ(デフォルトはvi)が起動する。画面をスクロールしていくと下記のような画面が出てくるだろう。


===================================================================

-------------------------------------------------------------------
# Section: Unix File System
-------------------------------------------------------------------

-------------------------------------------------------------------
Rule Name: web-sample (/var/www/html)
Severity Level: 33
-------------------------------------------------------------------

Remove the "x" from the adjacent box to prevent updating the database
with the new values for this object.

Modified:
[x] "/var/www/html/index.html"

===================================================================

 「[x]」とチェックがついている箇所が、データーベースに反映されることになる。このままでよければ、これを保存する。チェックを外したものはデーターベースに反映されないことになる。保存するときにはローカルパスフレーズが求められるので、パスフレーズを入力すればデーターベースのアップデートが完了する。

Please enter your local passphrase:(ローカルパスフレーズの入力)
Wrote database file: /var/lib/tripwire/linux.twd

 整合性のチェックを行う際に、自動的にデータベースのアップデートに移るようにするには、下記のように入力すればよい(インタラクティブモードという)。

tripwire --check --interactive

 では、データーベースのアップデートが完了したら、再度、整合性のチェックを行ってみよう。アップデートが完了していれば、下記のように違反は報告されないだろう。

#tripwire --check
Parsing policy file: /etc/tripwire/tw.pol
*** Processing Unix File System ***
Performing integrity check...
Wrote report file: /var/lib/tripwire/report/linux-20021007-104704.twr


Tripwire(R) 2.3.0 Integrity Check Report

Report generated by:root
Report created on:2002年10月07日 10時47分04秒
Database last updated on: 2002年10月07日 10時45分54秒

===================================================================
Report Summary:
===================================================================

Host name:linux
Host IP address:127.0.0.1
Host ID:None
Policy file used: /etc/tripwire/tw.pol
Configuration file used:/etc/tripwire/tw.cfg
Database file used: /var/lib/tripwire/linux.twd
Command line used:tripwire --check

===================================================================
Rule Summary:
===================================================================

-------------------------------------------------------------------
Section: Unix File System
-------------------------------------------------------------------

Rule Name Severity LevelAddedRemovedModified
--------- ----------------------------------
web-sample33000
(/var/www/html)

Total objects scanned:9
Total violations found:0

===================================================================
Object Summary:
===================================================================

-------------------------------------------------------------------
# Section: Unix File System
-------------------------------------------------------------------

No violations.←違反は報告されない

===================================================================
Error Report:
===================================================================

No Errors←違反は報告されない

-------------------------------------------------------------------
*** End of report ***

Tripwire 2.3 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered
trademark of Tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY;
for details use --version. This is free software which may be redistributed
or modified only under certain conditions; see COPYING for details.
All rights reserved.
Integrity check complete.

PREV 3/4 NEXT