エンタープライズ:特集 2002/10/08 00:00:00 更新


第3回:レポートの参照とデータベースのアップデート (2/4)

変更を加えて整合性のチェックを行う

 次に、故意に/var/www/html以下のファイルを変更して、整合性のチェックを行ってみよう。ここでは、index.htmlファイルの一部を書き換えてから、整合性のチェックを行っている。整合性チェック後のレポートを見てみると、index.htmlの変更が違反として報告されているのが分かるだろう。

#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-103915.twr


Tripwire(R) 2.3.0 Integrity Check Report

Report generated by: root
Report created on: 2002年10月07日 10時39分15秒
Database last updated on: Never

===================================================================
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 Level Added Removed Modified
--------- -------------- ----- ------- --------
* web-sample 33 0 0 1
(/var/www/html)

Total objects scanned: 9
Total violations found: 1

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

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

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

Modified:
"/var/www/html/index.html"←違反として報告

===================================================================
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.

■レポートファイルの参照

 整合性のチェックを行った際のレポートファイルは、チェック時に表示されるレポートの冒頭に「Wrote report file: /var/lib/tripwire/report/linux-20021007-103915.twr」という記述があるように、「/var/lib/tripwire/report/」以下に保存されている。レポートファイルは

ホスト名-日付-時間.twr

という形で保存され、「linux-20021007-103915.twr」は「ホスト名がlinux、作成された日付・時間が2002年10月07日の10時39分15秒である」ということになる。これらの設定(レポートの保存場所・保存名)はTripwireの設定ファイル(tw.cfg)で変更することも可能だ。レポートファイルを参照する際には、twprintコマンドを使用する。レポートファイルの表示は、0〜4までの5段階レベルで表示することが可能で、4が一番詳細な表示、0が簡易表示になる。

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

 では、実際に先程の「変更を加えて整合性のチェックを行う」で保存されたレポートファイルをレベルを変更して参照してみよう。まず、以下のコマンドを入力して、一番詳細なレベル4で表示してみる。

twprint --print-report --report-level [0〜4を指定] --twrfile [レポートファイルへのパス]

 下記の表示結果を見てみれば分かるように、先ほどと違い、変更が加えられたファイルの中で、チェック内容のうちの「なにが変更されたか」を詳細に知ることができる。変更箇所は「* Size」のように「*」マークが付いて表示されている。

# twprint --print-report --report-level 4 --twrfile /var/lib/tripwire/report/linux-20021007-103915.twr
Note: Report is not encrypted.
Tripwire(R) 2.3.0 Integrity Check Report

Report generated by: root
Report created on: 2002年10月07日 10時39分15秒
Database last updated on: Never

===================================================================
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 Level Added Removed Modified
--------- -------------- ----- ------- --------
* web-sample 33 0 0 1
(/var/www/html)

Total objects scanned: 9
Total violations found: 1

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

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

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

Modified:
"/var/www/html/index.html"

===================================================================
Object Detail:
===================================================================

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

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

Modified object name: /var/www/html/index.html

Property: Expected Observed
------------- ----------- -----------
Object Type Regular File Regular File
Device Number 5637 5637
* Inode Number 1310735 1310736
Mode -rw-r--r-- -rw-r--r--
Num Links 1 1
UID root (0) root (0)
GID root (0) root (0)
* Size 2851 2875
* Modify Time 2002年10月07日 06時34分54秒 2002年10月07日 10時39分06秒
Blocks 8 8
* CRC32 A2wTCT D5rzIB
* MD5 B7qEH0F67mXyXdYpwq/8Cs AgCzbLMgEfCbZ8H6lnousc

↑詳細な内容が記述されている

===================================================================
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.

前のページ | 1 2 3 4 | 次のページ

[TTS,ITmedia]