前言:
ClamAV是Linux平台上領先的開源病毒掃描程序,如果你要為Linux桌面或服務器找到一個好的病毒掃描程序,這個應用程序應該是你的首選。它在命令行中運行,可以在Linux服務器和台式機上使用,並且可以很好地消除大量不同類型的惡意軟件,包括惡意軟件,電子郵件服務器漏洞,病毒,甚至是Windows漏洞利用程序。
值得注意的問題有:
- ClamAV是一個以命令行為中心的應用程序,它占用內存和CPU並不高。
- ClamAV可以檢測各種不同的病毒,包括惡意軟件,電子郵件服務器漏洞,病毒甚至Windows漏洞。
- 該軟件適用於服務器和Linux桌面。
- ClamAV的電子郵件病毒掃描功能支持各種文件類型,包括流行的存檔格式,可執行文件,MS Office文檔,HTML文件,PDF等。
- ClamAV的病毒定義數據庫每4小時更新一次,確保你始終擁有最新的漏洞利用信息。
一、安裝:
更新epel倉庫源,yum下載clamav
yum -y install epel-release yum install –y clamav clamav-update
二、病毒庫更新:
更新病毒庫(定期執行,將病毒庫更新至最新)
[root@localhost ~]# freshclam ClamAV update process started at Tue Mar 10 11:49:11 2020 WARNING: Your ClamAV installation is OUTDATED! WARNING: Local version: 0.101.5 Recommended version: 0.102.2 DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
nonblock_recv: recv timing out (30 secs) WARNING: getfile: Download interrupted: Operation now in progress (IP: 104.16.218.84) WARNING: Can't download main.cvd from database.clamav.net
Trying again in 5 secs... WARNING: Your ClamAV installation is OUTDATED! WARNING: Local version: 0.101.5 Recommended version: 0.102.2 DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Downloading main.cvd [100%] main.cvd updated (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr) Downloading daily.cvd [100%] daily.cvd updated (version: 25746, sigs: 2212842, f-level: 63, builder: raynman) Downloading bytecode.cvd [100%] bytecode.cvd updated (version: 331, sigs: 94, f-level: 63, builder: anvilleg) Database updated (6777838 signatures) from database.clamav.net (IP: 104.16.218.84) [root@localhost ~]#
三、使用說明:
掃描病毒
[root@localhost ~]# clamscan –ri / -l clamscan.log --remove –ri: No such file or directory WARNING: –ri: Can't access file
/bin: Symbolic link /sbin: Symbolic link /lib: Symbolic link /lib64: Symbolic link ----------- SCAN SUMMARY ----------- Known viruses: 6767433 Engine version: 0.101.5 Scanned directories: 1 Scanned files: 0 Infected files: 0 //被感染的文件數
Data scanned: 0.00 MB Data read: 0.00 MB (ratio 0.00:1) Time: 17.038 sec (0 m 17 s) [root@localhost ~]# ls anaconda-ks.cfg clamscan.log [root@localhost ~]# vi clamscan.log [root@localhost ~]# 會打印出掃描結果,並記錄到clamscan.log中
----------- SCAN SUMMARY ----------- Known viruses: 8153447 Engine version: 0.102.3 Scanned directories: 1 Scanned files: 1 Infected files: 0 #被感染的文件數量 Data scanned: 0.00 MB Data read: 0.00 MB (ratio 0.00:1) Time: 22.294 sec (0 m 22 s)
額外的幫助:
使用幫助如下:
clamscan –ri / -l clamscan.log --remove 這里遞歸掃描根目錄 / ,發現感染文件立即刪除
-r 遞歸掃面子文件
–i 只顯示被感染的文件
-l 指定日志文件
--remove 刪除被感染文件
--move隔離被感染文件
Comodo Antivirus
附:
批量分發安裝clamav:
ansible server -m copy -a "src=/home/ansible/test.tar.gz dest=/home/ansible/test.tar.gz mode=664" -i testhost ansible server -m shell -a "cd /home/ansible && tar -zxvf test.tar.gz && chmod +x test.sh && ./test.sh" -i testhost ansible server -m shell -a "sudo nohup clamscan -r / -l /home/ansible/scan.log &" -i testhost ansible server -m shell -a "sudo tail -n 10 /home/ansible/scan.log" -i testhost [server] 192.168.0.172
192.168.0.173
192.168.0.174
192.168.0.175
192.168.0.176
192.168.0.177
192.168.0.178
192.168.0.179
192.168.0.180 [server:vars] ansible_ssh_user=ansible ansible_ssh_port=22
補充:
Comodo Antivirus
Comodo Antivirus是一款適用於Mac、Windows和Linux的強大免費增值漏洞利用掃描程序,它可以檢測
大多數類型的病毒,間諜軟件,惡意軟件,該應用程序承諾“消除病毒”,同時保護你寶貴的CPU使用率。
雖然Comodo Antivirus可能不是許多Linux用戶的首選病毒掃描程序,但它有一組非常有用的功能,用
戶界面類似於流行的Windows病毒掃描應用程序。
Armadito
Armadito是適用於Windows和Linux的病毒掃描程序,它通過掃描包括惡意軟件,特洛伊木馬等在內的多種
攻擊來保護你的計算機。
Armadito病毒掃描程序應用程序非常類似於Linux和Windows上提供的許多其他掃描程序,但是,它通過提
供一些出色的功能而脫穎而出,例如運行Web控制台以便於遠程管理。
ClamTK Virus Scanner
ClamTK本身不是病毒掃描程序,它是一個易於使用的圖形界面,用於Linux的ClamAV反病毒
掃描程序,如果你喜歡ClamAV工具的功能,但不喜歡處理命令行,那么你將在一個簡單易用的界面
中獲得相同的有用功能。