「ClamAV」の版間の差分

提供: セキュリティ
移動: 案内検索
(ページの作成:「<!-- vim: filetype=mediawiki --> 読み方 ;ClamAV:くらむえーぶい __TOC__ == 概要 == ClamAV は、オープンソースの[[ウイルス対策ソフ...」)
 
 
(同じ利用者による、間の5版が非表示)
行1: 行1:
<!--
+
[[ClamAV]] とは、[[オープンソース]]の[[ウイルス対策ソフト]]です。[[Linux]]や[[FreeBSD]]などの[[Unix]] OSでも利用できます。clamfsを利用して、リアルタイムスキャンを行えます。
vim: filetype=mediawiki
+
-->
+
  
読み方
+
'''読み方'''
 
;[[ClamAV]]:くらむえーぶい
 
;[[ClamAV]]:くらむえーぶい
 
__TOC__
 
__TOC__
  
 
== 概要 ==
 
== 概要 ==
 
 
[[ClamAV]] は、オープンソースの[[ウイルス対策ソフト]]です。
 
[[ClamAV]] は、オープンソースの[[ウイルス対策ソフト]]です。
 
[[Unix]] 系 OS で利用できます。
 
[[Unix]] 系 OS で利用できます。
 
 
== インストール ==
 
== インストール ==
 +
* [[ClamAVをFreeBSDにインストールする]]
 +
* [[ClamAVをCentOSにインストールする]]
 +
* [[ClamAVをUbuntuにインストールする]]
 +
== リアルタイムスキャン ==
 +
fuse を使用して、
 +
clamfs を使用して、 fuse を使用した自動的にチェックされるディレクトリを作成することで、擬似的なリアルタイムスキャンが可能です。
 +
<syntaxhighlight lang="bash">
 +
$ sudo apt install clamfs
 +
</syntaxhighlight>
  
{{ports|/usr/ports/security/clamav|clamav}}
+
<syntaxhighlight lang="bash">
 +
$ sudo mkdir /etc/clamfs
 +
$ sudo cp /usr/share/doc/clamfs/clamfs-sample.xml.gz /etc/clamfs/
 +
$ sudo gunzip /etc/clamfs/clamfs-sample.xml.gz
 +
$ sudo mv /etc/clamfs/clamfs-sample.xml /etc/clamfs/clamfs.xml
 +
</syntaxhighlight>
  
{{yum|clamav}}
+
<syntaxhighlight lang="bash">
 +
$ sudo mkdir -p /clamfs/tmp
 +
$ sudo chgrp adm /clamfs/tmp
 +
$ sudo chmod g+w /clamfs/tmp
 +
$ sudo sed -i "s/^#user_allow_other/user_allow_other/" /etc/fuse.conf
 +
</syntaxhighlight>
  
== 使い方 ==
+
<syntaxhighlight lang="bash">
 +
$ sudo clamfs /etc/camfs/clammfs.xml
 +
</syntaxhighlight>
  
 +
設定に問題があるとエラーになって動作しません。
 +
<syntaxhighlight lang="bash">
 +
$ sudo clamfs /etc/camfs/clammfs.xml
 +
18:12:10 (clamfs.cxx:963) ClamFS v1.0.1
 +
18:12:10 (clamfs.cxx:964) Copyright (c) 2007,2008 Krzysztof Burghardt <krzysztof@burghardt.pl>
 +
18:12:10 (clamfs.cxx:965) http://clamfs.sourceforge.net/
 +
18:12:10 (clamfs.cxx:1006) socket, root and mountpoint must be defined
 +
</syntaxhighlight>
 +
== 使い方 ==
 
=== ウイルスデータベースの更新 ===
 
=== ウイルスデータベースの更新 ===
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
sudo freshclam
 
sudo freshclam
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
=== ウイルススキャンの実行 ===
 
=== ウイルススキャンの実行 ===
 
 
メールスプールをスキャンする例です。
 
メールスプールをスキャンする例です。
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
clamscan -r /var/spool/mail
 
clamscan -r /var/spool/mail
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
=== clamscan のコマンドラインオプション ===
 +
<syntaxhighlight lang="bash">
 +
$ clamscan --version
 +
ClamAV 0.98.6/20212/Fri Mar 20 19:48:24 2015
 +
$ clamscan -h
  
== 関連項目 ==
+
                      Clam AntiVirus Scanner 0.98.6
 +
          By The ClamAV Team: http://www.clamav.net/about.html#credits
 +
          (C) 2007-2009 Sourcefire, Inc.
  
 +
    --help                -h            Print this help screen
 +
    --version            -V            Print version number
 +
    --verbose            -v            Be verbose
 +
    --archive-verbose    -a            Show filenames inside scanned archives
 +
    --debug                              Enable libclamav's debug messages
 +
    --quiet                              Only output error messages
 +
    --stdout                            Write to stdout instead of stderr
 +
    --no-summary                        Disable summary at end of scanning
 +
    --infected            -i            Only print infected files
 +
    --suppress-ok-results -o            Skip printing OK files
 +
    --bell                              Sound bell on virus detection
 +
 +
    --tempdir=DIRECTORY                  Create temporary files in DIRECTORY
 +
    --leave-temps[=yes/no(*)]            Do not remove temporary files
 +
    --database=FILE/DIR  -d FILE/DIR    Load virus database from FILE or load
 +
                                        all supported db files from DIR
 +
    --official-db-only[=yes/no(*)]      Only load official signatures
 +
    --log=FILE            -l FILE        Save scan report to FILE
 +
    --recursive[=yes/no(*)]  -r          Scan subdirectories recursively
 +
    --allmatch[=yes/no(*)]  -z          Continue scanning within file after finding a match
 +
    --cross-fs[=yes(*)/no]              Scan files and directories on other filesystems
 +
    --follow-dir-symlinks[=0/1(*)/2]    Follow directory symlinks (0 = never, 1 = direct, 2 = always)
 +
    --follow-file-symlinks[=0/1(*)/2]    Follow file symlinks (0 = never, 1 = direct, 2 = always)
 +
    --file-list=FILE      -f FILE        Scan files from FILE
 +
    --remove[=yes/no(*)]                Remove infected files. Be careful!
 +
    --move=DIRECTORY                    Move infected files into DIRECTORY
 +
    --copy=DIRECTORY                    Copy infected files into DIRECTORY
 +
    --exclude=REGEX                      Don't scan file names matching REGEX
 +
    --exclude-dir=REGEX                  Don't scan directories matching REGEX
 +
    --include=REGEX                      Only scan file names matching REGEX
 +
    --include-dir=REGEX                  Only scan directories matching REGEX
 +
 +
    --bytecode[=yes(*)/no]              Load bytecode from the database
 +
    --bytecode-unsigned[=yes/no(*)]      Load unsigned bytecode
 +
    --bytecode-timeout=N                Set bytecode timeout (in milliseconds)
 +
    --bytecode-statistics[=yes/no(*)]    Collect and print bytecode statistics
 +
    --detect-pua[=yes/no(*)]            Detect Possibly Unwanted Applications
 +
    --exclude-pua=CAT                    Skip PUA sigs of category CAT
 +
    --include-pua=CAT                    Load PUA sigs of category CAT
 +
    --detect-structured[=yes/no(*)]      Detect structured data (SSN, Credit Card)
 +
    --structured-ssn-format=X            SSN format (0=normal,1=stripped,2=both)
 +
    --structured-ssn-count=N            Min SSN count to generate a detect
 +
    --structured-cc-count=N              Min CC count to generate a detect
 +
    --scan-mail[=yes(*)/no]              Scan mail files
 +
    --phishing-sigs[=yes(*)/no]          Signature-based phishing detection
 +
    --phishing-scan-urls[=yes(*)/no]    URL-based phishing detection
 +
    --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found
 +
    --phishing-ssl[=yes/no(*)]          Always block SSL mismatches in URLs (phishing module)
 +
    --phishing-cloak[=yes/no(*)]        Always block cloaked URLs (phishing module)
 +
    --partition-intersection[=yes/no(*)] Detect partition intersections in raw
 +
    disk images using heuristics.
 +
    --algorithmic-detection[=yes(*)/no]  Algorithmic detection
 +
    --scan-pe[=yes(*)/no]                Scan PE files
 +
    --scan-elf[=yes(*)/no]              Scan ELF files
 +
    --scan-ole2[=yes(*)/no]              Scan OLE2 containers
 +
    --scan-pdf[=yes(*)/no]              Scan PDF files
 +
    --scan-swf[=yes(*)/no]              Scan SWF files
 +
    --scan-html[=yes(*)/no]              Scan HTML files
 +
    --scan-archive[=yes(*)/no]          Scan archive files (supported by libclamav)
 +
    --detect-broken[=yes/no(*)]          Try to detect broken executable files
 +
    --block-encrypted[=yes/no(*)]        Block encrypted archives
 +
    --nocerts                            Disable authenticode certificate chain verification in PE files
 +
    --dumpcerts                          Dump authenticode certificate chain in PE files
 +
 +
    --max-filesize=#n                    Files larger than this will be skipped and assumed clean
 +
    --max-scansize=#n                    The maximum amount of data to scan for each container file (**)
 +
    --max-files=#n                      The maximum number of files to scan for each container file (**)
 +
    --max-recursion=#n                  Maximum archive recursion level for container file (**)
 +
    --max-dir-recursion=#n              Maximum directory recursion level
 +
    --max-embeddedpe=#n                  Maximum size file to check for embedded PE
 +
    --max-htmlnormalize=#n              Maximum size of HTML file to normalize
 +
    --max-htmlnotags=#n                  Maximum size of normalized HTML file to scan
 +
    --max-scriptnormalize=#n            Maximum size of script file to normalize
 +
    --max-ziptypercg=#n                  Maximum size zip to type reanalyze
 +
    --max-partitions=#n                  Maximum number of partitions in disk image to be scanned
 +
    --max-iconspe=#n                    Maximum number of icons in PE file to be scanned
 +
    --enable-stats                      Enable statistical reporting of malware
 +
    --disable-pe-stats                  Disable submission of individual PE sections in stats submissions
 +
    --stats-timeout=#n                  Number of seconds to wait for waiting
 +
    a response back from the stats server
 +
    --stats-host-id=UUID                Set the Host ID used when submitting
 +
    statistical info.
 +
 +
(*) Default scan settings
 +
(**) Certain files (e.g. documents, archives, etc.) may in turn contain other
 +
  files inside. The above options ensure safe processing of this kind of data.
 +
</syntaxhighlight>
 +
=== ClamAVのテスト用ファイル clamav-testfiles ===
 +
動作テスト用のファイルとして  clamav-testfiles パッケージが提供されています。
 +
<syntaxhighlight lang="bash">
 +
$ sudo apt install clamav-testfiles
 +
</syntaxhighlight>
 +
テストコマンドは、以下の通りです。
 +
<syntaxhighlight lang="bash">
 +
$ cp /usr/share/clamav-testfiles/clam.zip /clamfs/tmp
 +
$ unzip /clamfs/tmp/clam.zip
 +
$ clamscan
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight lang="bash">
 +
$ clamscan /usr/share/clamav-testfiles
 +
/usr/share/clamav-testfiles/clam.bz2.zip: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.cab: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.impl.zip: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.bin-be.cpio: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-fsg.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.d64.zip: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam_IScab_ext.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.ole.doc: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.bin-le.cpio: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.mail: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-nsis.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.odc.cpio: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-aspack.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-upack.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.newc.cpio: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.mbox.base64: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.szdd: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam_IScab_int.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.pdf: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-yc.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-pespin.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.rtf: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.binhex: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.mbox.uu: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam_ISmsi_int.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.tar.gz: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.zip: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.ppt: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.ea05.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.html: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.chm: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.exe.bz2: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.tnef: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-upx.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-mew.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-petite.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam_ISmsi_ext.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.7z: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.sis: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam-wwpack.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.ea06.exe: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam_cache_emax.tgz: ClamAV-Test-File FOUND
 +
/usr/share/clamav-testfiles/clam.arj: ClamAV-Test-File FOUND
 +
 +
----------- SCAN SUMMARY -----------
 +
Known viruses: 3772508
 +
Engine version: 0.98.6
 +
Scanned directories: 1
 +
Scanned files: 44
 +
Infected files: 44
 +
Data scanned: 13.15 MB
 +
Data read: 6.21 MB (ratio 2.12:1)
 +
Time: 24.254 sec (0 m 24 s)
 +
[2]    5638 exit 1    clamscan /usr/share/clamav-testfiles
 +
</syntaxhighlight>
 +
== GUIフロントエンド ==
 +
=== ClamTk ===
 +
<syntaxhighlight lang="bash">
 +
$ sudo apt install clamtk
 +
</syntaxhighlight>
 +
=== KlamAV ===
 +
KlamAV は、KDE向けのGUIパッケージです。
 +
<syntaxhighlight lang="bash">
 +
$ sudo apt install klamav
 +
</syntaxhighlight>
 +
== バージョン ==
 +
=== ClamAV 0.98 ===
 +
* シグネチャの改善
 +
*: [[PDF]] ファイル、[[Adobe Flash|Flash]] ファイル、[[Javaクラスファイル]] ( [[Java]] アーカイブファイル( [[JAR]] ) は、[[Java]] ターゲットではありません) を追加しました。ハッシュシグネチャ は、もしファイルサイズがわからない場合、 * (ワイルドカード) サイズを指定できます。後方互換の問題を回避するため、ワイルドカードサイズを指定する場合には、最小のエンジン FLEVEL の設定が必要です。
 +
* スキャニングの拡張
 +
*: 新しいファイルは、中身を出して、スキャンすることができ、[[ISO9660]]、[[Adobe Flash|Flash]] 、自己解凍式 [[7z]] ファイルを含みます。[[PDF]] ハンドリングは、より協力で、暗号化 [[PDF]] ファイルをよりよくハンドリングします。
 +
* 認証コード
 +
*: [[ClamAV]] は、 署名された PE ([[Portable Executable]]) ファイルをスキャンするとき、[[証明書]] チェインを理解します。データベースが信頼できるルート認証局のシグネチャを持っている時、エンジンは、有効なシグネチャの[[PE]] ファイルを[[ホワイトリスト]] します。同じデータベースファイルは、[[危殆化]] した証明書を拒否できます。この機能は、 clamd.conf (DisableCertCheck) かコマンドラインオプション (nocerts) で無効にできます。
 +
* 新しいオプション
 +
*: clamscan と clamd に新しいオプションが追加されました。[[ClamAV]] は、感染しているファイルやエラーファイルを表示することや、OK の結果の表示を抑制できます。これは、大量のファイルのスキャンを行うときに役に立ちます。この新しいオプションは、 clamscan の "-o" と clamd の LogClean です。
 +
* 新しいコールバックのためのAPIの追加
 +
*: libclamav API に [[ClamAV]] スキャンをラッピングするときに開発者が使用するフックを追加しました。このタイプの関数は、プレフィックス が clcb_ で、ライブラリの直接の変更なしに、スキャンプロセスのたしかなステップのロジックの追加を開発者に許します。clamav.h ファイルをよくみてください。
 +
* より多くの制限の設定が可能になった
 +
*: いくつかのハードコードされた値は、設定可能なパラメータになり、エンジンのチューニングのためのより多くのオプションが提供されました。clamd.conf と clamscan のヘルプメッセージを参照してください。
 +
* パフォーマンスの改善
 +
*: スキャニングやアンパッキングの過程でメモリマップを使用します。複素数関数は、 libtommath から tomsfastmath 関数にスイッチしました。 A/C macher コードは、スピードアップのために最適化されました。
 +
* Clamuko/Dazukoからfanotifyに置き換えたオンアクセススキャンのサポート
 +
*: それにより、オンアクセススキャンに関連するclamd.conf の設定は、Clamukoが削除されました。Clamuko の指定された設定は、すでに非推奨です。もはや使用すべきではありません。
 +
 +
== 関連項目 ==
 
* [[ウイルス対策ソフト]]
 
* [[ウイルス対策ソフト]]
 +
* [[ソースファイア]]
 +
<!--
 +
vim: filetype=mediawiki
 +
-->

2015年3月20日 (金) 22:05時点における最新版

ClamAV とは、オープンソースウイルス対策ソフトです。LinuxFreeBSDなどのUnix OSでも利用できます。clamfsを利用して、リアルタイムスキャンを行えます。

読み方

ClamAV
くらむえーぶい

概要

ClamAV は、オープンソースのウイルス対策ソフトです。 Unix 系 OS で利用できます。

インストール

リアルタイムスキャン

fuse を使用して、 clamfs を使用して、 fuse を使用した自動的にチェックされるディレクトリを作成することで、擬似的なリアルタイムスキャンが可能です。

$ sudo apt install clamfs
$ sudo mkdir /etc/clamfs
$ sudo cp /usr/share/doc/clamfs/clamfs-sample.xml.gz /etc/clamfs/
$ sudo gunzip /etc/clamfs/clamfs-sample.xml.gz 
$ sudo mv /etc/clamfs/clamfs-sample.xml /etc/clamfs/clamfs.xml
$ sudo mkdir -p /clamfs/tmp
$ sudo chgrp adm /clamfs/tmp
$ sudo chmod g+w /clamfs/tmp
$ sudo sed -i "s/^#user_allow_other/user_allow_other/" /etc/fuse.conf
$ sudo clamfs /etc/camfs/clammfs.xml

設定に問題があるとエラーになって動作しません。

$ sudo clamfs /etc/camfs/clammfs.xml
18:12:10 (clamfs.cxx:963) ClamFS v1.0.1
18:12:10 (clamfs.cxx:964) Copyright (c) 2007,2008 Krzysztof Burghardt <krzysztof@burghardt.pl>
18:12:10 (clamfs.cxx:965) http://clamfs.sourceforge.net/
18:12:10 (clamfs.cxx:1006) socket, root and mountpoint must be defined

使い方

ウイルスデータベースの更新

sudo freshclam

ウイルススキャンの実行

メールスプールをスキャンする例です。

clamscan -r /var/spool/mail

clamscan のコマンドラインオプション

$ clamscan --version
ClamAV 0.98.6/20212/Fri Mar 20 19:48:24 2015
$ clamscan -h
 
                       Clam AntiVirus Scanner 0.98.6
           By The ClamAV Team: http://www.clamav.net/about.html#credits
           (C) 2007-2009 Sourcefire, Inc.
 
    --help                -h             Print this help screen
    --version             -V             Print version number
    --verbose             -v             Be verbose
    --archive-verbose     -a             Show filenames inside scanned archives
    --debug                              Enable libclamav's debug messages
    --quiet                              Only output error messages
    --stdout                             Write to stdout instead of stderr
    --no-summary                         Disable summary at end of scanning
    --infected            -i             Only print infected files
    --suppress-ok-results -o             Skip printing OK files
    --bell                               Sound bell on virus detection
 
    --tempdir=DIRECTORY                  Create temporary files in DIRECTORY
    --leave-temps[=yes/no(*)]            Do not remove temporary files
    --database=FILE/DIR   -d FILE/DIR    Load virus database from FILE or load
                                         all supported db files from DIR
    --official-db-only[=yes/no(*)]       Only load official signatures
    --log=FILE            -l FILE        Save scan report to FILE
    --recursive[=yes/no(*)]  -r          Scan subdirectories recursively
    --allmatch[=yes/no(*)]   -z          Continue scanning within file after finding a match
    --cross-fs[=yes(*)/no]               Scan files and directories on other filesystems
    --follow-dir-symlinks[=0/1(*)/2]     Follow directory symlinks (0 = never, 1 = direct, 2 = always)
    --follow-file-symlinks[=0/1(*)/2]    Follow file symlinks (0 = never, 1 = direct, 2 = always)
    --file-list=FILE      -f FILE        Scan files from FILE
    --remove[=yes/no(*)]                 Remove infected files. Be careful!
    --move=DIRECTORY                     Move infected files into DIRECTORY
    --copy=DIRECTORY                     Copy infected files into DIRECTORY
    --exclude=REGEX                      Don't scan file names matching REGEX
    --exclude-dir=REGEX                  Don't scan directories matching REGEX
    --include=REGEX                      Only scan file names matching REGEX
    --include-dir=REGEX                  Only scan directories matching REGEX
 
    --bytecode[=yes(*)/no]               Load bytecode from the database
    --bytecode-unsigned[=yes/no(*)]      Load unsigned bytecode
    --bytecode-timeout=N                 Set bytecode timeout (in milliseconds)
    --bytecode-statistics[=yes/no(*)]    Collect and print bytecode statistics
    --detect-pua[=yes/no(*)]             Detect Possibly Unwanted Applications
    --exclude-pua=CAT                    Skip PUA sigs of category CAT
    --include-pua=CAT                    Load PUA sigs of category CAT
    --detect-structured[=yes/no(*)]      Detect structured data (SSN, Credit Card)
    --structured-ssn-format=X            SSN format (0=normal,1=stripped,2=both)
    --structured-ssn-count=N             Min SSN count to generate a detect
    --structured-cc-count=N              Min CC count to generate a detect
    --scan-mail[=yes(*)/no]              Scan mail files
    --phishing-sigs[=yes(*)/no]          Signature-based phishing detection
    --phishing-scan-urls[=yes(*)/no]     URL-based phishing detection
    --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found
    --phishing-ssl[=yes/no(*)]           Always block SSL mismatches in URLs (phishing module)
    --phishing-cloak[=yes/no(*)]         Always block cloaked URLs (phishing module)
    --partition-intersection[=yes/no(*)] Detect partition intersections in raw
    						disk images using heuristics.
    --algorithmic-detection[=yes(*)/no]  Algorithmic detection
    --scan-pe[=yes(*)/no]                Scan PE files
    --scan-elf[=yes(*)/no]               Scan ELF files
    --scan-ole2[=yes(*)/no]              Scan OLE2 containers
    --scan-pdf[=yes(*)/no]               Scan PDF files
    --scan-swf[=yes(*)/no]               Scan SWF files
    --scan-html[=yes(*)/no]              Scan HTML files
    --scan-archive[=yes(*)/no]           Scan archive files (supported by libclamav)
    --detect-broken[=yes/no(*)]          Try to detect broken executable files
    --block-encrypted[=yes/no(*)]        Block encrypted archives
    --nocerts                            Disable authenticode certificate chain verification in PE files
    --dumpcerts                          Dump authenticode certificate chain in PE files
 
    --max-filesize=#n                    Files larger than this will be skipped and assumed clean
    --max-scansize=#n                    The maximum amount of data to scan for each container file (**)
    --max-files=#n                       The maximum number of files to scan for each container file (**)
    --max-recursion=#n                   Maximum archive recursion level for container file (**)
    --max-dir-recursion=#n               Maximum directory recursion level
    --max-embeddedpe=#n                  Maximum size file to check for embedded PE
    --max-htmlnormalize=#n               Maximum size of HTML file to normalize
    --max-htmlnotags=#n                  Maximum size of normalized HTML file to scan
    --max-scriptnormalize=#n             Maximum size of script file to normalize
    --max-ziptypercg=#n                  Maximum size zip to type reanalyze
    --max-partitions=#n                  Maximum number of partitions in disk image to be scanned
    --max-iconspe=#n                     Maximum number of icons in PE file to be scanned
    --enable-stats                       Enable statistical reporting of malware
    --disable-pe-stats                   Disable submission of individual PE sections in stats submissions
    --stats-timeout=#n                   Number of seconds to wait for waiting
    						a response back from the stats server
    --stats-host-id=UUID                 Set the Host ID used when submitting
    						statistical info.
 
(*) Default scan settings
(**) Certain files (e.g. documents, archives, etc.) may in turn contain other
   files inside. The above options ensure safe processing of this kind of data.

ClamAVのテスト用ファイル clamav-testfiles

動作テスト用のファイルとして clamav-testfiles パッケージが提供されています。

$ sudo apt install clamav-testfiles

テストコマンドは、以下の通りです。

$ cp /usr/share/clamav-testfiles/clam.zip /clamfs/tmp
$ unzip /clamfs/tmp/clam.zip
$ clamscan
$ clamscan /usr/share/clamav-testfiles
/usr/share/clamav-testfiles/clam.bz2.zip: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.cab: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.impl.zip: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.bin-be.cpio: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-fsg.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.d64.zip: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam_IScab_ext.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.ole.doc: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.bin-le.cpio: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.mail: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-nsis.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.odc.cpio: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-aspack.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-upack.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.newc.cpio: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.mbox.base64: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.szdd: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam_IScab_int.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.pdf: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-yc.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-pespin.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.rtf: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.binhex: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.mbox.uu: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam_ISmsi_int.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.tar.gz: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.zip: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.ppt: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.ea05.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.html: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.chm: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.exe.bz2: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.tnef: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-upx.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-mew.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-petite.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam_ISmsi_ext.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.7z: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.sis: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam-wwpack.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.ea06.exe: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam_cache_emax.tgz: ClamAV-Test-File FOUND
/usr/share/clamav-testfiles/clam.arj: ClamAV-Test-File FOUND
 
----------- SCAN SUMMARY -----------
Known viruses: 3772508
Engine version: 0.98.6
Scanned directories: 1
Scanned files: 44
Infected files: 44
Data scanned: 13.15 MB
Data read: 6.21 MB (ratio 2.12:1)
Time: 24.254 sec (0 m 24 s)
[2]    5638 exit 1     clamscan /usr/share/clamav-testfiles

GUIフロントエンド

ClamTk

$ sudo apt install clamtk

KlamAV

KlamAV は、KDE向けのGUIパッケージです。

$ sudo apt install klamav

バージョン

ClamAV 0.98

  • シグネチャの改善
    PDF ファイル、Flash ファイル、Javaクラスファイル ( Java アーカイブファイル( JAR ) は、Java ターゲットではありません) を追加しました。ハッシュシグネチャ は、もしファイルサイズがわからない場合、 * (ワイルドカード) サイズを指定できます。後方互換の問題を回避するため、ワイルドカードサイズを指定する場合には、最小のエンジン FLEVEL の設定が必要です。
  • スキャニングの拡張
    新しいファイルは、中身を出して、スキャンすることができ、ISO9660Flash 、自己解凍式 7z ファイルを含みます。PDF ハンドリングは、より協力で、暗号化 PDF ファイルをよりよくハンドリングします。
  • 認証コード
    ClamAV は、 署名された PE (Portable Executable) ファイルをスキャンするとき、証明書 チェインを理解します。データベースが信頼できるルート認証局のシグネチャを持っている時、エンジンは、有効なシグネチャのPE ファイルをホワイトリスト します。同じデータベースファイルは、危殆化 した証明書を拒否できます。この機能は、 clamd.conf (DisableCertCheck) かコマンドラインオプション (nocerts) で無効にできます。
  • 新しいオプション
    clamscan と clamd に新しいオプションが追加されました。ClamAV は、感染しているファイルやエラーファイルを表示することや、OK の結果の表示を抑制できます。これは、大量のファイルのスキャンを行うときに役に立ちます。この新しいオプションは、 clamscan の "-o" と clamd の LogClean です。
  • 新しいコールバックのためのAPIの追加
    libclamav API に ClamAV スキャンをラッピングするときに開発者が使用するフックを追加しました。このタイプの関数は、プレフィックス が clcb_ で、ライブラリの直接の変更なしに、スキャンプロセスのたしかなステップのロジックの追加を開発者に許します。clamav.h ファイルをよくみてください。
  • より多くの制限の設定が可能になった
    いくつかのハードコードされた値は、設定可能なパラメータになり、エンジンのチューニングのためのより多くのオプションが提供されました。clamd.conf と clamscan のヘルプメッセージを参照してください。
  • パフォーマンスの改善
    スキャニングやアンパッキングの過程でメモリマップを使用します。複素数関数は、 libtommath から tomsfastmath 関数にスイッチしました。 A/C macher コードは、スピードアップのために最適化されました。
  • Clamuko/Dazukoからfanotifyに置き換えたオンアクセススキャンのサポート
    それにより、オンアクセススキャンに関連するclamd.conf の設定は、Clamukoが削除されました。Clamuko の指定された設定は、すでに非推奨です。もはや使用すべきではありません。

関連項目