Enable ClamAv Scanning of Compressed Attachments
Enable ClamAv Scanning of Compressed Attachments
Viruses are cabable of being delivered to their recipients. Instead of telling the end user that all emails are scanned for viruses except those with compressed .zip. .tar etc. etc. - enable ClamAv scanning of compressed attachments.
Original location:
http://www.hmailserver.com/tracker/?do=details&id=154
Original location:
http://www.hmailserver.com/tracker/?do=details&id=154
-
- New user
- Posts: 11
- Joined: 2005-02-28 19:05
That is true, but the standard installation of clamwin (not SOSDG) does not scan compressed files.
hmailserver 4.3 (242 Live)
hmailserver 5.0 (605 Test)
Windows 2003
MSSQL
ASSP 1.3.2
ClamAV (SOSDG)
http://www.realdesign.nl
hmailserver 5.0 (605 Test)
Windows 2003
MSSQL
ASSP 1.3.2
ClamAV (SOSDG)
http://www.realdesign.nl
I think that I had an installation of ClamAV (SOSDG) that did successfully scan emails with compressed attachments, but I can't get it to work anymore !!!
I changed my configuration to use the daemon instead of the command line tool (because the latest uses a lot of CPU, something like 1.5 second per email, when the daemon only uses 0.03 seconds). Now I can't find viruses in compressed attachments anymore.
BUT I can successfully find viruses in compressed files !!!
Example :
Email file containing the uncompressed eicar.com file :
Email file containing the uncompressed eicar_com.zip file :
Normal archive scan :
And even with recursive archives :
I changed my configuration to use the daemon instead of the command line tool (because the latest uses a lot of CPU, something like 1.5 second per email, when the daemon only uses 0.03 seconds). Now I can't find viruses in compressed attachments anymore.
BUT I can successfully find viruses in compressed files !!!
Example :
Email file containing the uncompressed eicar.com file :
Code: Select all
C:\clamav-devel\bin>clamdscan "D:\hMailServer\Data\eicar.eml"
D:\hMailServer\Data\eicar.eml: Eicar-Test-Signature FOUND
----------- SCAN SUMMARY -----------
Infected files: 1
Time: 0.038 sec (0 m 0 s)
Email file containing the uncompressed eicar_com.zip file :
Code: Select all
C:\clamav-devel\bin>clamdscan "D:\hMailServer\Data\eicar_com.eml"
D:\hMailServer\Data\eicar_com.eml: OK
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.032 sec (0 m 0 s)
Code: Select all
C:\clamav-devel\bin>clamdscan "D:\hMailServer\Data\eicar_com.zip"
D:\hMailServer\Data\eicar_com.zip: Eicar-Test-Signature FOUND
----------- SCAN SUMMARY -----------
Infected files: 1
Time: 0.025 sec (0 m 0 s)
Code: Select all
C:\clamav-devel\bin>clamdscan "D:\hMailServer\Data\eicarcom2.zip"
D:\hMailServer\Data\eicarcom2.zip: Eicar-Test-Signature FOUND
----------- SCAN SUMMARY -----------
Infected files: 1
Time: 0.027 sec (0 m 0 s)
I think the ! on your keyboard has locked itself. "Official" support for compressed attachments will be enabled in the next hMailServer version. I'm sure you can achive it in earlier versions as well, but it probably requires you to create an own bat script and use that as an external virus scanner.
I was able to get scanning of zip to work by adding the following to a file called clamwin.reg, then doubleclicking on that file to import it into the registry
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]
"TMPDIR"="/cygdrive/c/clamav-devel/tmp"
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2]
"cygdrive prefix"="/cygdrive"
"cygdrive flags"=dword:00000022 (hex 22, dec 34)
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/tmp]
"native"="C:\\temp"
"flags"=dword:0000000a
Confirmed this works: 4.2 B181 / clamwin 0.87.1. win2kpromartin wrote:I was able to get scanning of zip to work by adding the following to a file called clamwin.reg, then doubleclicking on that file to import it into the registry
Code: Select all
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment] "TMPDIR"="/cygdrive/c/clamav-devel/tmp" [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2] "cygdrive prefix"="/cygdrive" "cygdrive flags"=dword:00000022 (hex 22, dec 34) [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/tmp] "native"="C:\\temp" "flags"=dword:0000000a
-------------------------------------------------------------------------------------------------
VIRUS DETECTED:
The attachment(s) of this message was removed since a virus
was detected in at least one of them.
-------------------------------------------------------------------------------------------------

Mike
Hi all
With the latest clamwin update (0.88.1) and hMailServer 4.2.2 B199 or later, Hmailserver is scanning zip files with no other tweeks or scripts for me. So can any one else confirm or deny that this is the case ? Because if this is the case then this can be move to "implemented even though its not" (as Martin says).
Michael
With the latest clamwin update (0.88.1) and hMailServer 4.2.2 B199 or later, Hmailserver is scanning zip files with no other tweeks or scripts for me. So can any one else confirm or deny that this is the case ? Because if this is the case then this can be move to "implemented even though its not" (as Martin says).
Michael
Missing Hmailserver ... Now running Debian servers