hi
I just remembered the --debug feature and I'm giving it a try to see what's up with that email with a rar inside. As of now, the email is correctly identified, the unrarlib gets called but then something goes wrong.
LibClamAV debug: fileblobSetFilename: mkstemp(_______\temp/clamav-8176506c32df6051/textpartXXXXXX)
LibClamAV debug: Saving attachment as _______\temp/clamav-8176506c32df6051/textpartwqdLGc
LibClamAV debug: fileblobDestroy: textpart
LibClamAV debug: cli_mbox returning 0
LibClamAV debug: Recognized RAR file
LibClamAV debug: in scanrar()
LibClamAV debug: ..\..\libclamav\unrarlib.c:2658:InitCRC Initialize CRC table
LibClamAV debug: ExtrFile(): dup(5) = 6
LibClamAV debug: Couldn't read next filename from archive (I/O error): 0
LibClamAV debug: RAR: Number of archived files: 1
LibClamAV debug: RAR: eicar.com, crc32: 0x6851cf3c, encrypted: 0, compressed: 68, normal: 68, method: 48, ratio: 1 (max: 250)
LibClamAV debug: ExtrFile(): dup(5) = 7
LibClamAV debug: unrarlib: Allocated 1048576 bytes.
LibClamAV debug: unrarlib: Allocating 68 bytes
LibClamAV debug: unknown compression method: 29 (min=13 max=20)
LibClamAV debug: RAR: Can't decompress file eicar.com
LibClamAV debug: RAR: Exit code: 100
LibClamAV debug: Virus offset: 66, expected: 0 (Eicar-Test-Signature)
LibClamAV debug: Calculated MD5 checksum: 9c4bf9b5558b1827f2f387192ec9f4f2
LibClamAV debug: Small data (3 bytes) |
Now I'll do some more tests with different unrar executables to see what the results are.
edit 31-08-2006 09:45
The attachment decoding routine does well, decodes the attachment, then passes on the control to the unpacking routine. This one calls unrarlib and when this fails due to unknown compression method, instead of correctly interpreting the --UNRAR cmd line parameter, simply quits right after printing the last line.
Here is the output from the same scan done on the archive without email wrapping.
LibClamAV debug: Recognized RAR file
LibClamAV debug: in scanrar()
LibClamAV debug: ..\..\libclamav\unrarlib.c:2658:InitCRC Initialize CRC table
LibClamAV debug: ExtrFile(): dup(4) = 5
LibClamAV debug: Couldn't read next filename from archive (I/O error): 0
LibClamAV debug: RAR: Number of archived files: 1
LibClamAV debug: RAR: eicar.com, crc32: 0x6851cf3c, encrypted: 0, compressed: 68, normal: 68, method: 48, ratio: 1 (max: 250)
LibClamAV debug: ExtrFile(): dup(4) = 6
LibClamAV debug: unrarlib: Allocated 1048576 bytes.
LibClamAV debug: unrarlib: Allocating 68 bytes
LibClamAV debug: unknown compression method: 29 (min=13 max=20)
LibClamAV debug: RAR: Can't decompress file eicar.com
LibClamAV debug: RAR: Exit code: 100
LibClamAV debug: Virus offset: 66, expected: 0 (Eicar-Test-Signature)
LibClamAV debug: Calculated MD5 checksum: 9c4bf9b5558b1827f2f387192ec9f4f2
V:\Desktop\b/eicar.rar: RAR module failure
UNRAR 3.00 beta 7 freeware Copyright (c) 1993-2002 Eugene Roshal
Extracting from V:\Desktop\b/eicar.rar
Extracting eicar.com OK
All OK
LibClamAV debug: Eicar-Test-Signature found in descriptor 4.
_______\temp/clamav-35f378a0c4e097aa/eicar.com: Eicar-Test-Signature FOUND
V:\Desktop\b/eicar.rar: Infected.Archive FOUND
|
Seems to me that
only in case of email wrapped archive the unrarlib failure isn't correctly recognized, leading to the archive not being passed through the external unrar routine, even if specified.
This happens both with unrar from unxutils and with unrar from the winrar site.
meanwhile I think I'll setup a filter not letting through RAR archives.

one never knows
edit 31-08-2006 10:48
While browsing I found the clamav native port https://www.bandsman.co.uk/clamav.htm here.
Seems to be compiled against clamav CVS, and seems to have fixed this issue. While I still wait to see it fixed with clamwin, I'll try to use that as a temporary fix.
Bye
Vanni