エンタープライズ:特集 2003/03/11 17:23:00 更新

rootkitによるハッキングとその防御
第3回 rootkit検出ツールによる検査 (3/6)

 chkrootkitはこのように既知のrootkitを元に作成されているため、それに当てはまらない新しいタイプのrootkitなどは検出できないことになる。たとえば、tuxkit(OpticKit)に関する項目がスクリプトに記述される以前のchkrootkit(Version 0.35以下)で同様に検査を行うと、検出されるのはChecking `aliens'の項目と隠蔽されたプロセスのみで、コマンド類の改ざんなどは検出されない。./chkrootkitですべてのrootkitが検出できるわけではないことは覚えておく必要があるだろう。

chkrootkit Version 0.35にて検査したケース

 Optickitが検査項目に加わる前のchkrootkit(Version 0.35)でtuxkitをインストールしたシステムを検査した結果。実行ファイル関連の改ざんがまったくく検出されていないことがわかるだろう。

# ./chkrootkit -p /mnt/floppy
ROOTDIR is `/'
Checking `amd'... not found
Checking `basename'... not infected
Checking `biff'... not found
Checking `chfn'... not infected
Checking `chsh'... not infected
Checking `cron'... not infected
Checking `date'... not infected
Checking `du'... not infected
Checking `dirname'... not infected
Checking `echo'... not infected
Checking `egrep'... not infected
Checking `env'... not infected
Checking `find'... not infected
Checking `fingerd'... not found
Checking `gpm'... not infected
Checking `grep'... not infected
Checking `hdparm'... not infected
Checking `su'... not infected
Checking `ifconfig'... not infected
Checking `inetd'... not tested
Checking `inetdconf'... not found
Checking `identd'... not found
Checking `killall'... not infected
Checking `ldsopreload'... not infected
Checking `login'... not infected
Checking `ls'... not infected
Checking `lsof'... not infected
Checking `mail'... not infected
Checking `mingetty'... not infected
Checking `netstat'... not infected
Checking `named'... not infected
Checking `passwd'... not infected
Checking `pidof'... not infected
Checking `pop2'... not found
Checking `pop3'... not found
Checking `ps'... not infected
Checking `pstree'... not infected
Checking `rpcinfo'... not infected
Checking `rlogind'... not found
Checking `rshd'... not found
Checking `slogin'... not infected
Checking `sendmail'... not infected
Checking `sshd'... not infected
Checking `syslogd'... not infected
Checking `tar'... not infected
Checking `tcpd'... not infected
Checking `top'... not infected
Checking `telnetd'... not found
Checking `timed'... not found
Checking `traceroute'... not infected
Checking `write'... not infected
Checking `aliens'... 
/dev/tux/.addr /dev/tux/.proc /dev/tux/tools/mirkforce/realnames
Searching for sniffer's logs, it may take a while... nothing found
Searching for HiDrootkit's default dir... nothing found
Searching for t0rn's default files and dirs... nothing found
Searching for t0rn's v8 defaults... nothing found
Searching for Lion Worm default files and dirs... nothing found
Searching for RSHA's default files and dir... nothing found
Searching for RH-Sharpe's default files... nothing found
Searching for Ambient's rootkit (ark) default files and dirs... nothing found
Searching for suspicious files and dirs, it may take a while... 
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/.packlist /usr/lib
/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/NKF/.packlist
Searching for LPD Worm files and dirs... nothing found
Searching for Ramen Worm files and dirs... nothing found
Searching for Maniac files and dirs... nothing found
Searching for RK17 files and dirs... nothing found
Searching for Ducoci rootkit... nothing found
Searching for Adore Worm... nothing found
Searching for ShitC Worm... nothing found
Searching for Omega Worm... nothing found
Searching for Sadmind/IIS Worm... nothing found
Searching for MonKit... nothing found
Searching for anomalies in shell history files... nothing found
Checking `asp'... not infected
Checking `bindshell'... not infected
Checking `lkm'... You have     1 process hidden for ps command
Warning: Possible LKM Trojan installed
Checking `rexedcs'... not found
Checking `sniffer'... 
eth0 is not promisc
Checking `wted'... nothing deleted
Checking `z2'... nothing deleted

chkrootkitのコマンドオプション

 先ほど紹介した「-p」のほかにもさまざまなオプションが用意されている。ここでコマンドの一覧と使用例を紹介しておこう。

表2■chkrootkitのコマンドオプション
-h ヘルプの表示
-V バージョンの表示
-l テストモード(検査する項目の表示)
-d デバッグモード
-q 必要な情報のみの表示
-x エキスパートモード、詳細な情報を表示
-r dir チェックするルートディレクトリの指定。指定をしない場合は/になる
-p dir1:dir2:dirN 別途マウントしたメディアにあるコマンド群を利用する際に指定する


■必要な情報のみを表示させる
# ./chkrootkit -q
Checking `du'... INFECTED
Checking `find'... INFECTED
Checking `ifconfig'... INFECTED
Checking `killall'... INFECTED
Checking `ls'... INFECTED
Checking `netstat'... INFECTED
Checking `ps'... INFECTED
Checking `pstree'... INFECTED
Checking `syslogd'... INFECTED
Checking `tcpd'... INFECTED
Checking `top'... INFECTED

/dev/tux/.addr /dev/tux/.proc /dev/tux/tools/mirkforce/realnames

/usr/lib/perl5/5.8.0/i386-linux-thread-multi/.packlist /usr/lib/
perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/NKF/.packlist

You have 35 process hidden for ps command
Warning: Possible LKM Trojan installed

eth0 is not promisc

■指定したコマンドファイルとネットワークインターフェースがプロミスキャスモードになっていないかをチェックする。
# ./chkrootkit ps ls sniffer
ROOTDIR is `/'
Checking `ps'... INFECTED
Checking `ls'... INFECTED
Checking `sniffer'...
eth0 is not promisc

■エキスパートモードにて詳細な情報を表示する。
# ./chkrootkit -x | more
ROOTDIR is `/'
not found
###
### Output of: /usr/bin/strings -a /bin/basename
###
/lib/ld-linux.so.2
libc.so.6
stdout
putc_unlocked
getopt_long
__fpending
__ctype_b
puts
mbrtowc
〜省略〜

■エキスパートモードにて、egrepを使用して特定の文字を検索する。
# ./chkrootkit -x | egrep 'xsf'
### Output of: /usr/bin/find /usr/bin -name xchk -o -name xsf
/usr/bin/xsf
EXE 279: /usr/bin/xsf

■chkrootkitの利用するコマンドファイルのディレクトリを指定する。
# ./chkrootkit -p /mnt/floppy

■検査項目を確認する。
# # ./chkrootkit -l
./chkrootkit: tests: aliens asp bindshell lkm rexedcs sniffer wted scalper slapper z2 amd basename biff chfn chsh cron date du dirname echo egrep env find fingerd gpm grep hdparm su ifconfig inetd inetdconf identd killall ldsopreload login ls lsof mail mingetty netstat named passwd pidof pop2 pop3 ps pstree rpcinfo rlogind rshd slogin sendmail sshd syslogd tar tcpd tcpdump top telnetd timed traceroute w write

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

[TTS,ITmedia]