GPGキーと設定ファイルの取り込み -2004年12月19日
「Clam AntiVirus」を「yum」でインストール出来るようGPGキーとダウンロー
ド先情報を取り込みます。
まずは、GPGキーのインポート
|
[root@station ~]# rpm --import http://crash.fce.vutbr.cz/Petr.Kristof-GPG-KEY
[root@station ~]#
|
|
で、ダウンロード先情報のダウンロード
|
[root@station ~]# wget http://crash.fce.vutbr.cz/crash-hat.repo
--02:09:41-- http://crash.fce.vutbr.cz/crash-hat.repo
=> `crash-hat.repo'
crash.fce.vutbr.cz をDNSに問いあわせています... 147.229.16.105
crash.fce.vutbr.cz[147.229.16.105]:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 142 [text/plain]
100%[====================================>] 142 --.--K/s
02:09:42 (1.35 MB/s) - `crash-hat.repo' saved [142/142]
[root@station ~]#
|
|
ダウンロードしたファイルを所定の位置に移動
|
[root@station ~]# mv crash-hat.repo /etc/yum.repos.d/
[root@station ~]#
|
|
Clam AntiVirusのインストール -2004年12月19日
|
[root@station ~]# yum -y install clamav
Setting up Install Process
Setting up Repo: crash-hat
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
crash-hat : ################################################## 65/65
base : ################################################## 2622/2622
updates-re: ################################################## 355/355
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package clamav.i386 72:0.80-4 set to be installed
--> Running transaction check
--> Processing Dependency: libidn for package: clamav
--> Processing Dependency: curl for package: clamav
--> Processing Dependency: libidn.so.11 for package: clamav
--> Processing Dependency: libcurl.so.3 for package: clamav
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package libidn.i386 0:0.5.6-1 set to be installed
---> Package curl.i386 0:7.12.1-1 set to be installed
--> Running transaction check
Dependencies Resolved
Transaction Listing:
Install: clamav.i386 72:0.80-4
Performing the following to resolve dependencies:
Install: curl.i386 0:7.12.1-1
Install: libidn.i386 0:0.5.6-1
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libidn 100 % done 1/3
Installing: curl 100 % done 2/3
Installing: clamav 100 % done 3/3
jp
Installed: clamav.i386 72:0.80-4
Dependency Installed: curl.i386 0:7.12.1-1 libidn.i386 0:0.5.6-1
Complete!
[root@station ~]#
|
|
「yum」がダウンロードした残骸を消します -2004年12月19日
「yum」がダウンロードしたファイルがディスクに溜まっているので消します。
|
[root@station ~]# yum clean packages
Cleaning up Packages>
3 packages removed
[root@station ~]#
|
|
すっきり♪
|
設定ファイルの変更 -2004年12月19日
ここではClam AntiVirusを定期的に起動して使う事とし、メールチェックのリレ
ーなどで使う予定が無いのでデーモンとして起動しません。
よってウイルスのパターンファイルの更新をするとデーモンにリロードコマンド
を投げた時に受け口が無くエラーとなるので設置ファイルの74〜79行目の7
9行目をコメントアウトします。
|
[root@station ~]# vi /etc/freshclam.conf
# Send the RELOAD command to clamd.
# Default: disabled
#NotifyClamd
# By default it uses the hardcoded configuration file but you can force an
# another one.
NotifyClamd /etc/clamd.conf
↓
# Send the RELOAD command to clamd.
# Default: disabled
#NotifyClamd
# By default it uses the hardcoded configuration file but you can force an
# another one.
#NotifyClamd /etc/clamd.conf
|
|
ウイルスパターンファイルの更新 -2004年12月19日
|
[root@station ~]# freshclam
ClamAV update process started at Sun Dec 19 03:07:28 2004
Downloading main.cvd [*]
main.cvd updated (version: 28, sigs: 26630, f-level: 3, builder: tomek)
Downloading daily.cvd [*]
daily.cvd updated (version: 633, sigs: 1794, f-level: 3, builder: tkojm)
Database updated (28424 signatures) from db.jp.clamav.net (219.106.255.66).
[root@station ~]#
|
|
ウイルスのスキャン -2004年12月19日
まず、実験用に無害なウイルスをダウンロードします。
|
[root@station ~]# wget http://www.eicar.org/download/eicar.com
--03:16:35-- http://www.eicar.org/download/eicar.com
=> `eicar.com'
www.eicar.org をDNSに問いあわせています... 81.3.3.133
www.eicar.org[81.3.3.133]:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 68 [application/x-msdos-program]
100%[====================================>] 68 --.--K/s
03:16:36 (664.06 KB/s) - `eicar.com' saved [68/68]
[root@station ~]#
|
|
で、スキャンしてみます。
|
[root@station ~]# clamscan --infected --remove --recursive /root
/root/eicar.com: Eicar-Test-Signature FOUND ← テスト用ウイルスを発見
/root/eicar.com: Removed. ← テスト用ウイルスを削除
----------- SCAN SUMMARY -----------
Known viruses: 28424
Scanned directories: 6
Scanned files: 16
Infected files: 1 ← 1つ発見
Data scanned: 1.61 MB
I/O buffer size: 131072 bytes
Time: 1.876 sec (0 m 1 s)
[root@station ~]#
|
|
先ほどは発見したら削除する「--remove」のオプションでスキャンしたのテスト
用のウイルスは居なくなっているはずです。 もう一度同様にスキャンします。
|
[root@station ~]# clamscan --infected --remove --recursive /root
----------- SCAN SUMMARY -----------
Known viruses: 28424
Scanned directories: 6
Scanned files: 15
Infected files: 0 ← 無くなりました♪
Data scanned: 1.61 MB
I/O buffer size: 131072 bytes
Time: 1.788 sec (0 m 1 s)
[root@station ~]#
|
|
|