Hi There!

I run ASSP version 2.3.4(13335) on Ubuntu 12,4 LTS and have installed clamd
for antivirus scanning.
For some reason it does not catch anything running it with ASSP.
If I run tests with eicar.com (txt, zip, 2xzip) files via commadline
(clamscan) picks it out, but if I mail them by ASSP there is no catch.
So, I installed AVG commandline scanner and made a script to use it as a
filescanner and ran some testruns, no catch via filescan in ASSP.
(logs say files where OK but they should not have been)
Running the AVG commadline scanner by hand worked every time, but not in
ASSP.
So, I rewrote the script to use clamscan as a filescanner, made same tests,
still no catch.

Somehow, I belive, ASSP write the .eml files, in the  virusscan directory,
in a fashion(I don't kon how), so it makes clamd, clamscan/filescanners
unable to catch the eicar.com(txt, zip, 2xzip) and then probably all other
viruses.

Here is the script I used for filescanning in ASSP:
#!/bin/bash
# Filename: avg.sh
# Createor: Pontus Hellgren 20131201
# Use: Script using avgscan for filescanning in ASSP

logfile=/var/log/assp-avg.log # Set a logfile

if [ -z "$1" ] # Check for input filename
then
echo "OK" # NO filename input, no need to confuse ASSP
echo "No file to scan, sending [OK]" >> $logfile # Log it to logfile
exit # No need to continue
fi

scanfilename=$1 # Set filename to scan

if [ -f "$scanfilename" ] # If file exist do scan
then
result=`avgscan -a $scanfilename >/dev/null 2>&1; echo $?` # Scan with AVG
and save result, discard other output
if [ $result -eq 0  ] # If 0 then no virus found, reply OK else reply VIRUS
then
echo "OK"
echo "$scanfilename [OK]" >> $logfile # Log ok to logfile
echo >> $logfile
elif [[ $result -eq 4 || $result -eq 5 ]] # If 4 or 5, Virus or potentially
unwanted program detected
then
echo "VIRUS"
echo "$scanfilename [VIRUS]" >> $logfile # Log virus to logfile
echo >> $logfile
else
echo "OK" # Return of any other number equals to us an error, don't confuse
ASSP
echo "$scanfilename [ERROR]" >> $logfile # Log error to logfile
echo >> $logfile
fi
fi

In ASSP I set the following:
FileScanDir: /usr/share/assp/virusscan/
FileScanCMD: /usr/share/assp/virusscan/avg.sh FILENAME
FileScanBad:VIRUS
FileScanGood:OK
FileScanRespRe:

Any ideeas to what goes wrong?

To use script for clamscan, change "avgscan -a" to "clamscan", change the
ELIF to only 1 for VIRUS.
Clamscan only reports 2 for any error else but OK or VIRUS.

Regards,
Pontus





------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to