エンタープライズ:特集 | 2002/09/11 00:00:00 更新 |
第1回:Tripwireを導入する (2/4)
Tripwireのインストール |
Tripwireのインストール方法は、RPMを利用するか、ソースからコンパイルするか、のいずれかで行う。Tripwireには製品として販売されているもののほかにフリーソフトウェア版があり、「Tripwire Open Source Project」や「RedHatLinux」のDownloadページ、「SourceForge.net」などから入手できる。
Tripwire Open Source ProjectのDownloadページには
・Tripwire Open Source RPM 3.0(Red Hat 5.x-6.2.x)
・Tripwire Open Source RPM 4.0(Red Hat 7.x)
・Tripwire Open Source tarball
の3種類のファイルがある。RPM形式でインストールするのであれば、利用しているシステムに合うもの(RPM 3.0もしくはRPM 4.0)を選択する。
RedHatLinux 7.3を利用している場合、インストール時に選択したパッケージによっては、すでにTripwireがインストールされている。RedHatLinux 7.3に付属しているTripwireは、「Tripwire Open Source Project」のDownloadページから入手できるtripwire-2.3-47よりも新しいバージョン(tripwire-2.3.1-10)になっているため、以下のコマンドを入力して、事前にインストールされているかを確認しておこう。
# rpm -q tripwire tripwire-2.3.1-10 |
では、ファイルをダウンロードしてインストールしてみよう。
(RPM4.0の場合) # wget http://www.tripwire.org/files/rpm4/tripwire-2.3-47.i386.tar.gz # tar xvzf tripwire-2.3-47.i386.tar.gz # rpm -ivh tripwire-2.3-47.i386.rpm |
RPMでのインストールが完了すると「/etc/tripwire」以下には「twinstall.sh」、「twcfg.txt」、「twpol.txt」が作成されている。twcfg.txtは設定ファイル、twpol.txtはサンプルポリシーファイルとなる。Tripwireの初期設定を変更したい場合にはtwcfg.txtをエディタで編集する(後述する「設定ファイル(twcfg.txt)」の項目を参照)。準備ができたら、次に「/etc/tripwire/twinstall.sh」を実行する。
ここで、サイトパスフレーズとローカルパスフレーズを求められるので、あらかじめそれぞれのパスフレーズを考えておく。各パスフレーズともに8文字以上(最大で1023文字)の英数字や記号を織り交ぜ、サイトパスフレーズとローカルパスフレーズは別々のもので且つ、rootのパスワードとも異なるものを選択しておく(Tripwire自体にはパスフレーズの文字数制限などはない)。
設定するパスフレーズは、Tripwireに関するファイル(設定ファイル、ポリシーファイル、データベースファイル、レポートファイル)で利用されるサイトキー、ローカルキーのそれぞれのキーファイルを暗号化するために必要になる。つまり、クラッカーが侵入に成功したとしても、パスフレーズを知らなければ、Tripwireに関するファイルを見たり、書き換えたりといったことができないようになっているわけだ。
|
# /etc/tripwire/twinstall.sh ---------------------------------------------- The Tripwire site and local passphrases are used to sign a variety of files, such as the configuration, policy, and database files. Passphrases should be at least 8 characters in length and contain both letters and numbers. See the Tripwire manual for more information. ---------------------------------------------- Creating key files... (When selecting a passphrase, keep in mind that good passphrases typically have upper and lower case letters, digits and punctuation marks, and are at least 8 characters in length.) Enter the site keyfile passphrase: サイトパスフレーズを入力 Verify the site keyfile passphrase: 再度サイトパスフレーズを入力 Generating key (this may take several minutes)...Key generation complete. (When selecting a passphrase, keep in mind that good passphrases typically have upper and lower case letters, digits and punctuation marks, and are at least 8 characters in length.) Enter the local keyfile passphrase: ローカルパスフレーズを入力 Verify the local keyfile passphrase: 再度ローカルパスフレーズを入力 Generating key (this may take several minutes)...Key generation complete. ---------------------------------------------- Signing configuration file... 設定ファイル(tw.cfg)への署名を行う Please enter your site passphrase: 上記で選択したサイトパスフレーズを入力 Wrote configuration file: /etc/tripwire/tw.cfg A clear-text version of the Tripwire configuration file /etc/tripwire/twcfg.txt has been preserved for your inspection. It is recommended that you delete this file manually after you have examined it. ---------------------------------------------- Signing policy file... ポリシーファイル(tw.pol)への署名を行う Please enter your site passphrase: 上記で選択したサイトパスフレーズを入力 Wrote policy file: /etc/tripwire/tw.pol A clear-text version of the Tripwire policy file /etc/tripwire/twpol.txt has been preserved for your inspection. This implements a minimal policy, intended only to test essential Tripwire functionality. You should edit the policy file to describe your system, and then use twadmin to generate a new signed copy of the Tripwire policy. |
○tarballでのインストール
tarballからインストールする場合は、ダウンロードしたアーカイブを展開したあと「./install.sh」を実行する。インストールに関する設定の変更は、設定ファイル(install.cfg)で行うことができる。
# wget http://www.tripwire.org/files/tripwire-2.3-47.bin.tar.gz # tar xvzf tripwire-2.3-47.bin.tar.gz # cd tripwire-2.3 # ./install.sh Installer program for: Tripwire(R) 2.3 Open Source for Linux Copyright (C) 1998-2000 Tripwire (R) Security Systems, Inc. Tripwire (R) is a registered trademark of the Purdue Research Foundation and is licensed exclusively to Tripwire (R) Security Systems, Inc. LICENSE AGREEMENT for Tripwire(R) 2.3 Open Source for Linux Please read the following license agreement. You must accept the agreement to continue installing Tripwire. Press ENTER to view the License Agreement. 〜省略〜 Please type "accept" to indicate your acceptance of this license agreement. [do not accept] accept ← ライセンスを受諾するかの確認が表示されるので「accept」と入力する Using configuration file install.cfg Checking for programs specified in install configuration file.... 〜省略〜 ---------------------------------------------- Verifying existence of binaries... ./bin/i686-pc-linux_r/siggen found ./bin/i686-pc-linux_r/tripwire found ./bin/i686-pc-linux_r/twprint found ./bin/i686-pc-linux_r/twadmin found This program will copy Tripwire files to the following directories: TWBIN: /usr/sbin TWMAN: /usr/man TWPOLICY: /etc/tripwire TWREPORT: /var/lib/tripwire/report TWDB: /var/lib/tripwire TWSITEKEYDIR: /etc/tripwire TWLOCALKEYDIR: /etc/tripwire CLOBBER is false. Continue with installation? [y/n] yをタイプ 〜省略〜 |
このあと、サイトキーとローカルキーのパスフレーズを求められるので、パスフレーズを入力する。以下は「○RPM形式でのインストール」と同様であるため割愛する。
The Tripwire site and local passphrases
are used to sign a variety of files, such as the configuration, policy, and database files. Passphrases should be at least 8 characters in length and contain both letters and numbers. See the Tripwire manual for more information. ---------------------------------------------- Creating key files... 〜省略〜 The installation succeeded. Please refer to /usr/doc/tripwire/Release_Notes for release information and to the printed user documentation for further instructions on using Tripwire 2.3 Open Source for Linux. |
[TTS,ITmedia]