Ubuntu 25.04
Sponsored Link

Install Clam AntiVirus2025/04/21

 

Install Clam AntiVirus to protect server from virus.

[1] Install Clamav.
root@dlp:~#
apt -y install clamav
root@dlp:~#
sed -i -e "s/^NotifyClamd/#NotifyClamd/g" /etc/clamav/freshclam.conf

root@dlp:~#
systemctl stop clamav-freshclam
# update pattern files manually

root@dlp:~#
freshclam

ClamAV update process started at Mon Apr 21 11:32:12 2025
Mon Apr 21 11:32:12 2025 -> daily.cvd database is up-to-date (version: 27614, sigs: 2074646, f-level: 90, builder: raynman)
Mon Apr 21 11:32:12 2025 -> main database available for download (remote version: 62)
Time:   12.2s, ETA:    0.0s [========================>]  162.58MiB/162.58MiB
Testing database: '/var/lib/clamav/tmp.bf12d2dbb9/clamav-a9ba037f0cab514df98a3d5e154d766b.tmp-main.cvd' ...
Database test passed.
Mon Apr 21 11:32:31 2025 -> main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
Mon Apr 21 11:32:31 2025 -> bytecode database available for download (remote version: 336)
Time:    0.1s, ETA:    0.0s [========================>]  277.52KiB/277.52KiB
Testing database: '/var/lib/clamav/tmp.bf12d2dbb9/clamav-df669a503447212bfc0d7637def1c938.tmp-bytecode.cvd' ...
Database test passed.
Mon Apr 21 11:32:31 2025 -> bytecode.cvd updated (version: 336, sigs: 83, f-level: 90, builder: nrandolp)

root@dlp:~#
systemctl start clamav-freshclam
[2] Try to scan.
root@dlp:~#
clamscan --infected --remove --recursive /home


----------- SCAN SUMMARY -----------
Known viruses: 8706419
Engine version: 1.4.2
Scanned directories: 4
Scanned files: 4
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 12.961 sec (0 m 12 s)
Start Date: 2025:04:21 11:34:57
End Date:   2025:04:21 11:35:10

# download test virus

root@dlp:~#
wget https://files.trendmicro.com/products/eicar-file/eicar.com
root@dlp:~#
clamscan --infected --remove --recursive ./

/root/eicar.com: Win.Test.EICAR_HDB-1 FOUND
/root/eicar.com: Removed.

----------- SCAN SUMMARY -----------
Known viruses: 8706419
Engine version: 1.4.2
Scanned directories: 3
Scanned files: 6
Infected files: 1
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 12.907 sec (0 m 12 s)
Start Date: 2025:04:21 11:35:36
End Date:   2025:04:21 11:35:49
Matched Content