ClamAV is a powerful antivirus and is handy while you try to check the vulnerable files on a Linux server, so as long as you have a root access to the server, this will work quite easily.
Here is the quickest method available to install clamav and scan a folder and it happens over few minutes.
First we start by updating the repository for the latest version of ClamAV, I am using DAG:
64bit:
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
32bit:
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
once this is done, the next step is :
yum install clamav-db clamav clamd
optionally you may want to run yum update before the command, but I do not prefer it is going to be few more minutes and lots of updates if you haven't used the yum update feature yet.
Once the software gets installed, run the command:
-bash-3.2# freshclam
ClamAV update process started at Wed Jan 2 06:25:53 2013
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cvd is up to date (version: 16293, sigs: 474141, f-level: 63, builder: neo)
bytecode.cvd is up to date (version: 209, sigs: 40, f-level: 63, builder: neo)
optionally you can set the following on /etc/clamd.conf :
TCPAddr 127.0.0.1
TCPSocket 3310
User root
MaxThreads 30
That should be the ideal result. And once the clamAV is updated, you can run the scan :
-bash-3.2# clamscan -i -r /home > reports.txt
I prefer redirecting it to a text and the report will include only the infected files list and the scan will be done recursively.
Hope this helps!
- Unknown Updated at: Wednesday, January 02, 2013