Linuxに唯一のウィルスソフトを入れる
そもそもLinuxはカーネルの構造的な問題があるためウィルスを作りづらいが、ネットワーク機能が優れているのでそこいらへんを見逃さないクラッカーはネットワークの親和性の良いウィルスを開発することが可能である(既に開発されている) 特にトロイの木馬的にウィルスを混入させてサーバーに穴を開けてリモート操作したりするようなウィルスソフトは近年珍しくないと言える 皆さんには是非に、このウィルスソフトを入れてほしい
ここで説明するウィルスソフトのClamavはマイクロソフトのWindowsなにがしのウィルスソフトと違って常駐して入りと出を監視するのではなくあくまでもスキャン型が主な機能である スキャンしてウィルスを見つけたらワクチンを打って死滅させるタイプのウィルスソフトである だから、サーバーの様に常時稼働中であればいいが電源を落とすタイプのクライアントホスト運用の場合の使用にはかなり問題がある たとえCronを仕掛けるにしてもサーバー的運用が必要である 例えば、クライアントホストで利用するならばマシンを立ち上げたら、手動でウィルスチェックコマンドを打って簡易スキャンを行ってから作業を始めるとかするしか無いかもしれない(例えば・・・) あるいは、OSの起動スクリプトに予めclamscanコマンド動作を書いておくべきかと思う とにかく毎回チェックするディレクトリーは/home/各ユーザーフォルダーの下など念入りにスキャンしたほうが良いかもしれない あと、Clamassasinでウィルスメールチェックチェックもできる メールに使うのはかなり効果的かと思う。
いずれにせよウィルス定義ファイルも結構頻繁に更新されるのでなかなか重宝する インストールもUbuntuの場合はリポジトリにあるため「apt install」コマンドでインスコ出来るのも初心者には嬉しい しかし、他のOS他のディストリビューターのOSでは多少異なるかと思う
1.リポジトリーからのインストール
mity@LubuntuPC:~$ sudo apt install clamav clamav-daemon
これでインストールおしまい
2.さて実際に使ってみる
1)途中経過とサマリーを出す場合
mity@LubuntuPC:~$ sudo clamscan -r /tmp
[sudo] mity のパスワード:
/tmp/.com.google.Chrome.XnTnoU/SingletonCookie: Symbolic link
/tmp/qipc_sharedmemory_qlipper369fd8e65859e0e38e0398aab01e8d03e0419d1f: Empty file
/tmp/qipc_systemsem_qlipper369fd8e65859e0e38e0398aab01e8d03e0419d1f: Empty file
----------- SCAN SUMMARY -----------
Known viruses: 8692845
Engine version: 0.103.11
Scanned directories: 26
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 67.940 sec (1 m 7 s)
Start Date: 2024:05:16 12:33:20
End Date: 2024:05:16 12:34:28
2)サマリーのみの表示の場合
mity@LubuntuPC:~$ sudo clamscan -r -i /tmp
----------- SCAN SUMMARY -----------
Known viruses: 8692845
Engine version: 0.103.11
Scanned directories: 28
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 63.475 sec (1 m 3 s)
Start Date: 2024:05:16 12:35:59
End Date: 2024:05:16 12:37:03
3.ウィルス定義ファイルの更新
1)clamウィルスソフトのログの在処
mity@LubuntuPC:~$ cd /var/log/clamav/
mity@LubuntuPC:/var/log/clamav$ ls -al
合計 164
drwxr-xr-x 2 clamav clamav 4096 5月 19 00:00 .
drwxrwxr-x 15 root syslog 4096 5月 19 00:01 ..
-rw-r----- 1 clamav adm 5068 5月 19 08:00 freshclam.log
-rw-r----- 1 clamav clamav 100937 5月 19 00:00 freshclam.log.1
-rw-r----- 1 clamav adm 5657 5月 12 00:00 freshclam.log.2.gz
-rw-r----- 1 clamav adm 4995 5月 5 00:00 freshclam.log.3.gz
-rw-r----- 1 clamav adm 5652 4月 28 00:00 freshclam.log.4.gz
-rw-r----- 1 clamav clamav 5202 4月 21 00:00 freshclam.log.5.gz
-rw-r----- 1 clamav clamav 7763 4月 14 00:00 freshclam.log.6.gz
-rw-r----- 1 clamav clamav 1428 4月 7 00:00 freshclam.log.7.gz
2)更新のプロセス
freshclamと言うコマンドがウィルス定義ファイルの更新を管理している 以下がそのコマンドのログを表す
mity@LubuntuPC:/var/log/clamav$ more freshclam.log
Sun May 19 00:00:04 2024 -> ClamAV update process started at Sun May 19 00:00:04 2024
Sun May 19 00:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 00:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 00:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 00:00:04 2024 -> --------------------------------------
Sun May 19 01:00:04 2024 -> Received signal: wake up
Sun May 19 01:00:04 2024 -> ClamAV update process started at Sun May 19 01:00:04 2024
Sun May 19 01:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 01:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 01:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 01:00:04 2024 -> --------------------------------------
Sun May 19 02:00:04 2024 -> Received signal: wake up
Sun May 19 02:00:04 2024 -> ClamAV update process started at Sun May 19 02:00:04 2024
Sun May 19 02:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 02:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 02:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 02:00:04 2024 -> --------------------------------------
Sun May 19 03:00:04 2024 -> Received signal: wake up
Sun May 19 03:00:04 2024 -> ClamAV update process started at Sun May 19 03:00:04 2024
Sun May 19 03:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 03:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 03:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 03:00:04 2024 -> --------------------------------------
Sun May 19 04:00:04 2024 -> Received signal: wake up
Sun May 19 04:00:04 2024 -> ClamAV update process started at Sun May 19 04:00:04 2024
Sun May 19 04:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 04:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 04:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 04:00:04 2024 -> --------------------------------------
Sun May 19 05:00:04 2024 -> Received signal: wake up
Sun May 19 05:00:04 2024 -> ClamAV update process started at Sun May 19 05:00:04 2024
Sun May 19 05:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 05:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 05:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 05:00:04 2024 -> --------------------------------------
Sun May 19 06:00:04 2024 -> Received signal: wake up
Sun May 19 06:00:04 2024 -> ClamAV update process started at Sun May 19 06:00:04 2024
Sun May 19 06:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 06:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 06:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 06:00:04 2024 -> --------------------------------------
Sun May 19 07:00:04 2024 -> Received signal: wake up
Sun May 19 07:00:04 2024 -> ClamAV update process started at Sun May 19 07:00:04 2024
Sun May 19 07:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 07:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 07:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 07:00:04 2024 -> --------------------------------------
Sun May 19 08:00:04 2024 -> Received signal: wake up
Sun May 19 08:00:04 2024 -> ClamAV update process started at Sun May 19 08:00:04 2024
Sun May 19 08:00:04 2024 -> daily.cld database is up-to-date (version: 27279, sigs: 206136 4, f-level: 90, builder: raynman)
Sun May 19 08:00:04 2024 -> main.cvd database is up-to-date (version: 62, sigs: 6647427, f -level: 90, builder: sigmgr)
Sun May 19 08:00:04 2024 -> bytecode.cvd database is up-to-date (version: 335, sigs: 86, f -level: 90, builder: raynman)
Sun May 19 08:00:04 2024 -> --------------------------------------