KasperskyがOSSのアンチウイルスツールを公開したので試してみた(Kaspersky Virus Removal Tool for Linux)

こんにちは。
午前中でメモリ枯渇
システムソリューション部のかわいです。

最近OSSのアンチウイルスソフト製品でいいのないかなーと探していたんですが、
かの有名なKaspersky社が「Kaspersky Virus Removal Tool for Linux」なるツールを6月くらいに公開して気になっていたので簡単に検証してみた内容を備忘録がてらに記事にしようと思います。

ダウンロード

■検証環境

Ubuntu 24.04 LTS
Kaspersky Virus Removal Tool 24.0.5.0 

早速以下からダウンロードしてみます。
https://www.kaspersky.com/downloads/free-virus-removal-tool

基本的には公式の手順に沿って進めればok。
都度実行のためインストール不要で便利です。
https://support.kaspersky.com/help/kvrt/2024/en-us/269465.htm

ブラウザからダウンロード後にパーミッションを変更、実行してみます。
まずはGUIから実行するパターン。

$ cd ~/Downloads
$ chmod +x kvrt.run

$ ./kvrt.run
Running with root privileges
Generated directory is </tmp/9d208c686fe9d56312596>
Verifying archive integrity...  100%   SHA256 checksums are OK. All good.
Uncompressing Kaspersky Virus Removal Tool 24.0.5.0 for Linux  100%  
=================================
Running kvrt with args <>
=================================
compver: 24.0.5.0 x86-64 (Jul  9 2024 17:36:48)
Product folder </var/opt/KVRT2024_Data>


----------------------------

▼ 利用規約が表示されるので、それぞれ確認できればチェックを付けて次に進みます

▼ 初回はバージョン情報が表示されるので確認できればCLoseを押下、早速【Start Scan】をクリックしてみます。

▼ スキャンが実行されるので待ちます。今回クリーンイメージで実行したので、何も検出されませんでした。

このツールはあくまでもスポットで実行できるのみで、リアルタイムスキャン機能は持っていません。
手動実行ならGUIでも問題ないですが、定期実行の場合はcronに仕込んだうえでCLI経由の実行が推奨されます。

次はCLI経由で試してみます。

CLI経由で実施

まずはヘルプ。
https://support.kaspersky.com/help/kvrt/2024/en-us/269475.htm

-h                             - show help
-d <folder_path>               - path to quarantine and reports folder
-accepteula                    - accept EULA, Privacy Policy and KSN Statement
-trace                         - enable trace collection
-tracelevel <level>            - set the level of traces:
	ERR - only error messages
	WRN - warnings and errors
	INF - information, warnings and errors
	DBG - all messages
-processlevel <level>          - set the level of danger of object which will be neutralized:
	0 - skip objects with high, medium and low danger level
	1 - neutralize objects with high danger level
	2 - neutralize objects with high and medium danger level
	3 - neutralize objects with high, medium and low danger level
-dontencrypt                   - disable encryption of trace files/reports/dump files
-details                       - enable detailed reports
-proxyconfig <config_file_path> - path to file with proxy config
-silent                        - run scan without GUI
-adinsilent                    - run active disinfection in silent mode
-allvolumes                    - add all volumes to scan
-custom <folder_path>          - path to custom folder for scan
-customlist <file_path>        - path to file with custom folders for scan
-exclude <folder_path>         - exclude path from custom scan
-excludelist <file_path>       - path to file with excludes for custom scan
-customonly                    - run scan of custom folders only

最低限のオプションで実行してみます。

-silent でGUIを起動させない。
-accepteula で規約をスキップします。

$ ./kvrt.run -- -silent -accepteula
Graphical mode is <wayland>
localuser:root being added to access control list
Running with root privileges
Generated directory is </tmp/92302b5bca4f82e716374>
Verifying archive integrity...  100%   SHA256 checksums are OK. All good.
Uncompressing Kaspersky Virus Removal Tool 24.0.5.0 for Linux  100%  
=================================
Running kvrt with args <-trace -silent -accepteula>
=================================
compver: 24.0.5.0 x86-64 (Jul  9 2024 17:36:48)
Product folder </var/opt/KVRT2024_Data>
=================================
Scan is started
=================================
=================================
Scan is finished with results:
	Processed: 27957
	Processing errors: 0
	Detected: 0
	Password protected: 0
	Corrupted: 0
=================================
=================================
kvrt exited with code <0>
=================================
localuser:root being removed from access control list

GUI実行時と同様、何も検出されませんでした。

マルウェアを検出させてみる

次に、マルウェアを検出させてみます。
下準備として、以下eicarのサイトからファイルをダウンロード(./Downloads配下)しておきます。
https://www.eicar.org/download-anti-malware-testfile/

▼ Downloads以下にeicarファイルを配置します。

$ ls -l
total 151296
-rw-rw-r-- 1 hamchan hamchan        68 Oct 29 10:26 eicar.com
-rw-rw-r-- 1 hamchan hamchan       184 Oct 28 14:01 eicar_com.zip

今回はDownloads配下を指定して実行してみます。

-trace トレースを有効にします。
-tracelevel 「DEBUG」に設定し、イベントログをすべて出力させます。
-custom 検査ディレクトリを指定します。
-processlevel 今回は3に設定し、low~highの範囲すべての脅威を検出させます。

 ./kvrt.run -- -accepteula  -trace -tracelevel DBG -custom /home/hamchan/Downloads/ -processlevel 3 -silent
Graphical mode is <wayland>
localuser:root being added to access control list
Running with root privileges
Generated directory is </tmp/74a8bcf3a3339fc810150>
Verifying archive integrity...  100%   SHA256 checksums are OK. All good.
Uncompressing Kaspersky Virus Removal Tool 24.0.5.0 for Linux  100%  
=================================
Running kvrt with args <-accepteula -trace -tracelevel DBG -custom /home/hamchan/Downloads/ -processlevel 3 -silent>
=================================
compver: 24.0.5.0 x86-64 (Jul  9 2024 17:36:48)
Product folder </var/opt/KVRT2024_Data>
=================================
Scan is started
=================================
Threat <EICAR-Test-File> is detected on object </home/hamchan/Downloads/eicar.com>
Threat <EICAR-Test-File> is detected on object </home/hamchan/Downloads/eicar_com.zip>
=================================
Scan is finished with results:
	Processed: 27961
	Processing errors: 0
	Detected: 2
	Password protected: 0
	Corrupted: 0
=================================
Action <Cure> is selected for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar.com>
Action <Cure> is selected for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar_com.zip>
=================================
Disinfection is started
=================================
Disinfection action <Quarantine> for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar.com> is finished with status <Quarantined>
Disinfection action <Quarantine> for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar_com.zip> is finished with status <Quarantined>
Disinfection action <Cure> for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar.com> is finished with status <CureFailed>
Disinfection action <Cure> for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar_com.zip> is finished with status <CureFailed>
Disinfection action <Delete> for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar.com> is finished with status <Deleted>
Disinfection action <Delete> for threat <EICAR-Test-File> on object </home/hamchan/Downloads/eicar_com.zip> is finished with status <Deleted>
=================================
Disinfection is finished with results:
	Processed: 4
	Processing errors: 0
	Skipped: 0
	Quarantined: 2
	Quarantine failed: 0
	Cured: 0
	Cure failed: 2
	Cure on reboot: 0
	Deleted: 2
	Delete on reboot: 0
	Restored: 0
	Restore on reboot: 0
=================================
=================================
kvrt exited with code <0>
=================================
localuser:root being removed from access control list

ログを見る感じ、無事検出に成功し、隔離後に削除されたようですね。
ディレクトリからもファイルが消えています。

$ ls -lha
drwxr-xr-x  2 hamchan hamchan 4.0K Oct 29 10:49 .
drwxr-x--- 17 hamchan hamchan 4.0K Oct 29 10:44 ..

ちなみに実行毎に隔離ファイルは以下に保存されます(root実行の場合)。

$ sudo ls -l /var/opt/KVRT2024_Data
total 24
drwx------ 2 root root 4096 Oct 28 13:52  Anomalies
drwx------ 2 root root 4096 Oct 29 10:45 'Legal notices'
drwx------ 4 root root 4096 Oct 29 10:49  Quarantine
drwx------ 2 root root 4096 Oct 29 10:45  Reports
drwx------ 2 root root 4096 Oct 29 10:49  Temp
drwx------ 2 root root 4096 Oct 29 10:45  Traces

$ sudo ls -l /var/opt/KVRT2024_Data/Quarantine
total 12
drwx------ 2 root root 4096 Oct 29 10:49 KVRTQ0001
drwx------ 2 root root 4096 Oct 29 11:34 KVRTQ0002
drwx------ 2 root root 4096 Oct 29 11:41 KVRTQ0003

過検知等でファイルをリストアしたい場合、GUI経由で可能です。
https://support.kaspersky.com/help/kvrt/2024/en-us/269476.htm
▼ リストからファイルを選択しリストアをかけると、元のディレクトリにファイルがリストアされます。

以上、有償で提供されているソフトに比べると簡素ではありますが、
OSSでここまでできて、かつ動作も比較的軽いので、個人利用であれば結構ありなんじゃないかと思いました。
Microsoft社も最近Linux向けツールを出したみたいなので、また時間があれば検証してみたいと考えています。

この記事がお役に立てば【 いいね 】のご協力をお願いいたします!
11
読み込み中...
11 票, 平均: 1.00 / 111
1,425
X facebook はてなブックマーク pocket

この記事をかいた人

About the author

かわ けん

システムソリューション部所属
好奇心旺盛ポケ○ン