Discussion:
[Maia-users] Malicious .exe in zip file NOT being blocked by banned attachment
James Robertson
2015-04-29 03:57:37 UTC
Permalink
A user received an email with a zip file containing a malicious .exe.
We block .exe within zip files, however this one got past?

I looked at the file size, it should be scanned as far as I can tell.
I created a bogus .exe zipped it and emailed it to a test user and it
was blocked as expected. I tested using a similiar sized bogus file
and also the exact same file names and those were blocked as well.

It's only these specific files that fail being banned which puzzles me
and I cannot figure out why it allows these files.

I can extract the file fine:

>:/tmp# ls -la Reports.zip
-rw-r--r-- 1 root root 18759 2015-04-28 11:33 Reports.zip
>:/tmp# file Reports.zip
Reports.zip: data
>:/tmp# 7za x Reports.zip

7-Zip (A) 4.58 beta Copyright (c) 1999-2008 Igor Pavlov 2008-05-05
p7zip Version 4.58 (locale=en_AU,Utf16=on,HugeFiles=on,1 CPU)

Processing archive: Reports.zip

Extracting a8924.exe

Everything is Ok

Size: 33792
Compressed: 18759
>:/tmp# ls -la a8924.exe
-rw-r--r-- 1 root root 33792 2015-04-28 03:27 a8924.exe
>:/tmp# file a8924.exe
a8924.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit

No errors are reported in amavis logs when the mail arrives other than:

Apr 29 12:09:39 foobaz amavis[15833]: (15833-01) Passed CLEAN,
[123.45.67.89] [123.45.67.89] <***@mydomain> ->
<***@theirdomain>, Message-ID:
<***@foobar>, Hits: -, 391 ms

the amavis config on the Maia machine:

use strict;
$mydomain = 'example.com'; # a convenient default for other settings
$myhostname = 'maia.example.com'; # must be a fully-qualified domain name!
@lookup_sql_dsn = ( ['DBI:mysql:maia:localhost', 'amavis', 'passwd'] );
$max_servers = 4; # number of pre-forked children (2..15 is common)
$daemon_user = 'amavis'; # (no default; customary: vscan or amavis)
$daemon_group = 'amavis'; # (no default; customary: vscan or amavis)
$MYHOME = '/var/lib/amavis'; # a convenient default for other settings
$TEMPBASE = $MYHOME; # working directory
$ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR
$pid_file = "/var/run/amavis/amavisd.pid";
$lock_file = "/var/run/amavis/amavisd.lock";
$QUARANTINEDIR = '/var/lib/amavis/virusmails';
@local_domains_maps = ( [".$mydomain"] );
@mynetworks = qw( 127.0.0.0/8 192.168.1.2 192.168.1.10 );
$policy_bank{'MYNETS'} = { # clients in @mynetworks
bypass_spam_checks_maps => [1], # don't spam-check internal mail
bypass_banned_checks_maps => [1], # don't banned-check internal mail
bypass_header_checks_maps => [1], # don't header-check internal mail
};
$log_level = 0; # verbosity 0..5
$log_recip_templ = undef; # disable by-recipient level-0 log entries
$LOGFILE = "/var/log/amavis.log";
$DO_SYSLOG = 1; # log via syslogd (preferred)
$SYSLOG_LEVEL = 'mail.debug';
$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny)
$enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1
$inet_socket_port = 10024; # listen on this local TCP port(s) (see $protocol)
$sa_tag_level_deflt = -999; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 5.0; # triggers spam evasive actions
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
$sa_mail_body_size_limit = 500*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0; # only tests which do not require internet access?
$sa_auto_whitelist = 0; # turn on AWL in SA 2.63 or older (irrelevant
# for SA 3.0, cf option is 'use_auto_whitelist')
$virus_admin = "mxgadmin\@$mydomain"; # notifications recip.
$banned_admin = "mxgadmin\@$mydomain";
$mailfrom_notify_admin = "mxg\@$mydomain"; # notifications sender
$mailfrom_notify_recip = "mxg\@$mydomain"; # notifications sender
$mailfrom_notify_spamadmin = "mxg\@$mydomain"; # notifications sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
$warnvirussender = 0;
$warnspamsender = 0;
$warnbannedsender = 1;
$warnvirusrecip = 0;
$warnbannedrecip = 1;
@addr_extension_virus_maps = ('virus');
@addr_extension_spam_maps = ('spam');
@addr_extension_banned_maps = ('banned');
@addr_extension_bad_header_maps = ('badh');
$recipient_delimiter = undef;
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
$file = '/usr/bin/file'; # file(1) utility; use recent versions
$gzip = 'gzip';
$bzip2 = 'bzip2';
$lzop = 'lzop';
$rpm2cpio = ['rpm2cpio.pl','rpm2cpio'];
$cabextract = 'cabextract';
$uncompress = ['uncompress', 'gzip -d', 'zcat'];
$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat'];
$arc = ['nomarch', 'arc'];
$unarj = ['arj', 'unarj'];
$unrar = ['rar', 'unrar'];
$zoo = 'zoo';
$lha = 'lha';
$cpio = ['gcpio','cpio'];
$ar = 'ar';
$dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 1500;
$MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not enforced)
$sa_spam_subject_tag = 'SPAM> ';
$defang_virus = 1; # MIME-wrap passed infected mail
$defang_banned = 1; # MIME-wrap passed mail containing banned name
$notify_method = 'smtp:[127.0.0.1]:10025';
$forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter!
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_DISCARD;
$final_spam_destiny = D_DISCARD;
$final_bad_header_destiny = D_DISCARD;
$X_HEADER_TAG = 'X-Virus-Scanned';
$X_HEADER_LINE = "Maia Mailguard 1.0.2";
@viruses_that_fake_sender_maps = (new_RE(
[qr'\bEICAR\b'i => 0], # av test pattern name
[qr'^(WM97|OF97|Joke\.)'i => 0], # adjust names to match your AV scanner
[qr/.*/ => 1], # true for everything else
));
@keep_decoded_original_maps = (new_RE(
qr'^MAIL$', # retain full original message for virus checking (can be slow)
qr'^MAIL-UNDECIPHERABLE$', # recheck full mail if it contains undecipherables
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
));
@non_malware_viruses_maps = (new_RE(
qr'^(HTML\.Phishing|Phishing)\.',
qr'^MSRBL-(Images|SPAM)\.',
qr'^Sanesecurity\.(Junk|Lott|Phishing|PhishingTestSig|Casino|Bou|Cred|Job|Stk|Loan|Porn|Hdr|Dipl|Spear|Img|Img0|Spam|Spam4|SpamL|SpamImg|Scam|Scam4|ScamL)\.',
));
$banned_filename_re = new_RE(
# block certain double extensions anywhere in the base name
qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i,
qr'^application/x-msdownload$'i, # block these MIME types
qr'^application/x-msdos-program$'i,
qr'^application/hta$'i,
qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046 MIME types
qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|exe|fxp|hlp|hta|inf|ins|isp|
js|jse|lnk|mda|mdb|mde|mdw|mdt|mdz|msc|msi|msp|mst|ops|pcd|pif|prg|
reg|scr|sct|shb|shs|vb|vbe|vbs|wsc|wsf|wsh)$'ix, # banned ext - long
qr'^\.(exe-ms)$', # banned file(1) types
qr'^\.(exe|lha|cab|dll)$', # banned file(1) types
);
@score_sender_maps = ({}); # should be empty if using Maia Mailguard
@av_scanners = (
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
# NOTE: run clamd under the same user as amavisd, or run it under its own
# uid such as clamav, add user clamav to the amavis group, and then add
# AllowSupplementaryGroups to clamd.conf;
# NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
# this entry; when running chrooted one may prefer socket "$MYHOME/clamd".
);
@av_scanners_backup = (
['ClamAV-clamscan', 'clamscan',
"--stdout --disable-summary -r --tempdir=$TEMPBASE {}", [0], [1],
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
);
1; # insure a defined return

Thanks

James
Jason Street
2015-04-29 08:19:26 UTC
Permalink
On 2015-04-29 03:57, James Robertson wrote:
> A user received an email with a zip file containing a malicious .exe.


Not much help in troubleshooting but the exact same file got passed my
MAIA install too.

https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/

I do note that ClamAV does not detect it as malicious
James Robertson
2015-05-14 05:49:03 UTC
Permalink
On 29 April 2015 at 18:19, Jason Street <***@openmailbox.org> wrote:

> On 2015-04-29 03:57, James Robertson wrote:
>
>> A user received an email with a zip file containing a malicious .exe.
>>
>
>
> Not much help in troubleshooting but the exact same file got passed my
> MAIA install too.
>
>
> https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/
>
> I do note that ClamAV does not detect it as malicious
>

Zip files aren't blocked with a ban on zip files!!

I added the following configuration to amavis to ban any zip file
(truncated for ease of reading in this thread)

$banned_filename_re = new_RE(
qr'^\.(zip)$',
);

I tested using a bogus zip file and it banned it as expected. But if I use
the malicious .zip it bypasses amavis???

Client is getting annoyed as we told them we had banned all .zip's as they
have still been getting hammered by variants of this email.

This is a excerpt just now for a test I did with the banned zip rule in
place. The Reports.zip file was allowed.

***@suumxg:~# grep 08888-05 /var/log/mail.log | grep -i reports.zip
May 14 15:33:36 suumxg amavis[8888]: (08888-05) p003 1/2 Content-Type:
application/octet-stream, size: 18759 B, name: Reports.zip
May 14 15:33:36 suumxg amavis[8888]: (08888-05) check_for_banned (p003)
N=Reports.zip
May 14 15:33:36 suumxg amavis[8888]: (08888-05) lookup (banned_filename) =>
undef, "Reports.zip" does not match
May 14 15:33:36 suumxg amavis[8888]: (08888-05) lookup (banned_namepath_re)
=> undef,
"P=p004\tL=1\tM=multipart/mixed\nP=p003\tL=1/2\tM=application/octet-stream\tT=dat\tN=Reports.zip"
does not match
May 14 15:33:36 suumxg amavis[8888]: (08888-05) p.path:
"P=p004,L=1,M=multipart/mixed |
P=p003,L=1/2,M=application/octet-stream,T=dat,N=Reports.zip"

Any ideas on how to fix this?

James
James Robertson
2015-05-14 06:09:27 UTC
Permalink
On 14 May 2015 at 15:49, James Robertson <***@mesrobertson.com> wrote:

> On 29 April 2015 at 18:19, Jason Street <***@openmailbox.org> wrote:
>
>> On 2015-04-29 03:57, James Robertson wrote:
>>
>>> A user received an email with a zip file containing a malicious .exe.
>>>
>>
>>
>> Not much help in troubleshooting but the exact same file got passed my
>> MAIA install too.
>>
>>
>> https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/
>>
>> I do note that ClamAV does not detect it as malicious
>>
>
> Zip files aren't blocked with a ban on zip files!!
>
> I added the following configuration to amavis to ban any zip file
> (truncated for ease of reading in this thread)
>
> $banned_filename_re = new_RE(
> qr'^\.(zip)$',
> );
>
> I tested using a bogus zip file and it banned it as expected. But if I
> use the malicious .zip it bypasses amavis???
>
> Client is getting annoyed as we told them we had banned all .zip's as they
> have still been getting hammered by variants of this email.
>
> This is a excerpt just now for a test I did with the banned zip rule in
> place. The Reports.zip file was allowed.
>
> ***@suumxg:~# grep 08888-05 /var/log/mail.log | grep -i reports.zip
> May 14 15:33:36 suumxg amavis[8888]: (08888-05) p003 1/2 Content-Type:
> application/octet-stream, size: 18759 B, name: Reports.zip
> May 14 15:33:36 suumxg amavis[8888]: (08888-05) check_for_banned (p003)
> N=Reports.zip
> May 14 15:33:36 suumxg amavis[8888]: (08888-05) lookup (banned_filename)
> => undef, "Reports.zip" does not match
> May 14 15:33:36 suumxg amavis[8888]: (08888-05) lookup
> (banned_namepath_re) => undef,
> "P=p004\tL=1\tM=multipart/mixed\nP=p003\tL=1/2\tM=application/octet-stream\tT=dat\tN=Reports.zip"
> does not match
> May 14 15:33:36 suumxg amavis[8888]: (08888-05) p.path:
> "P=p004,L=1,M=multipart/mixed |
> P=p003,L=1/2,M=application/octet-stream,T=dat,N=Reports.zip"
>
> Any ideas on how to fix this?
>
> James
>
>
>
>
On my system this is what file shows for the bogus and malicious
(Reports.zip) zip files. It looks like it cannot identify Reports.zip as a
zip archive.

>:/tmp# file /tmp/bogus.zip
/tmp/bogus.zip: Zip archive data, at least v2.0 to extract
>:/tmp# file /tmp/Reports.zip
/tmp/Reports.zip: data
Janky Jay, III
2015-05-14 20:56:01 UTC
Permalink
Hi James,

On 05/14/2015 12:09 AM, James Robertson wrote:
> On 14 May 2015 at 15:49, James Robertson <***@mesrobertson.com
> <mailto:***@mesrobertson.com>> wrote:
>
> On 29 April 2015 at 18:19, Jason Street <***@openmailbox.org
> <mailto:***@openmailbox.org>> wrote:
>
> On 2015-04-29 03:57, James Robertson wrote:
>
> A user received an email with a zip file containing a malicious
> .exe.
>
>
>
> Not much help in troubleshooting but the exact same file got passed
> my MAIA install too.
>
> https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/
>
> I do note that ClamAV does not detect it as malicious
>
>
> Zip files aren't blocked with a ban on zip files!!
>
> I added the following configuration to amavis to ban any zip file
> (truncated for ease of reading in this thread)
>
> $banned_filename_re = new_RE( qr'^\.(zip)$', );
>

Looking at the regex for this, it appears that this is only going to
match a file named ".zip" (or ".(zip)" and not "Reports.zip" (or
anything else that has a character before the ".zip" extension). I
would recommend adding a "|zip|" entry into the list of file
extensions that are already banned (IE: "banned ext - basic" or
"banned ext - long")? That, or change your regex a bit to match
"*.zip" instead:

qr'^.*\.zip$' (Will match any filename that ends in ".zip")

Regards,
Janky Jay, III
James Robertson
2015-05-28 03:25:53 UTC
Permalink
On 15 May 2015 at 06:56, Janky Jay, III <***@unfs.us> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi James,
>
> On 05/14/2015 12:09 AM, James Robertson wrote:
> > On 14 May 2015 at 15:49, James Robertson <***@mesrobertson.com
> > <mailto:***@mesrobertson.com>> wrote:
> >
> > On 29 April 2015 at 18:19, Jason Street <***@openmailbox.org
> > <mailto:***@openmailbox.org>> wrote:
> >
> > On 2015-04-29 03:57, James Robertson wrote:
> >
> > A user received an email with a zip file containing a malicious
> > .exe.
> >
> >
> >
> > Not much help in troubleshooting but the exact same file got passed
> > my MAIA install too.
> >
> >
> https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/
> >
> > I do note that ClamAV does not detect it as malicious
> >
> >
> > Zip files aren't blocked with a ban on zip files!!
> >
> > I added the following configuration to amavis to ban any zip file
> > (truncated for ease of reading in this thread)
> >
> > $banned_filename_re = new_RE( qr'^\.(zip)$', );
> >
>
> Looking at the regex for this, it appears that this is only going
> to
> match a file named ".zip" (or ".(zip)" and not "Reports.zip" (or
> anything else that has a character before the ".zip" extension). I
> would recommend adding a "|zip|" entry into the list of file
> extensions that are already banned (IE: "banned ext - basic" or
> "banned ext - long")? That, or change your regex a bit to match
> "*.zip" instead:
>
> qr'^.*\.zip$' (Will match any filename that ends in ".zip")
>
> Regards,
> Janky Jay, III
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iEYEARECAAYFAlVVC+EACgkQGK3MsUbJZn6v9wCfTunsm27OMDeeuEd04wA6a4JC
> kUQAnjXJm9xu+dYtmIZG3qADp0ZAnYU1
> =GRvo
> -----END PGP SIGNATURE-----
> _______________________________________________
> Maia-users mailing list
> Maia-***@renaissoft.com
> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
>


I have resolved this by updating the "file" binary by installing from
source from ftp://ftp.astron.com/pub/file/.

These malicious zip files are now correctly identified and blocked.

Thanks
Lawrence R. Mulder
2015-05-28 03:28:18 UTC
Permalink
Which distribution is that on and what version of file did you go from and to with the "upgrade" or replacement?

Thanks,
-Larry


________________________________________________
Lawrence R. Mulder / RHCE, VTSP, SEC+
Vice President, InformAbility, Inc.
***@informability.com
http://www.informability.com/about
http://www.facebook.com/InformAbility
Ph: 630-532-5941
Fx: 630-532-5955
________________________________________________
From: James Robertson
Sent: Wednesday, May 27, 2015 10:26 PM
To: maia-***@renaissoft.com
Subject: Re: [Maia-users] Malicious .exe in zip file NOT being blocked by banned attachment



On 15 May 2015 at 06:56, Janky Jay, III <***@unfs.us<mailto:***@unfs.us>> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi James,

On 05/14/2015 12:09 AM, James Robertson wrote:
> On 14 May 2015 at 15:49, James Robertson <***@mesrobertson.com<mailto:***@mesrobertson.com>
> <mailto:***@mesrobertson.com<mailto:***@mesrobertson.com>>> wrote:
>
> On 29 April 2015 at 18:19, Jason Street <***@openmailbox.org<mailto:***@openmailbox.org>
> <mailto:***@openmailbox.org<mailto:***@openmailbox.org>>> wrote:
>
> On 2015-04-29 03:57, James Robertson wrote:
>
> A user received an email with a zip file containing a malicious
> .exe.
>
>
>
> Not much help in troubleshooting but the exact same file got passed
> my MAIA install too.
>
> https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/
>
> I do note that ClamAV does not detect it as malicious
>
>
> Zip files aren't blocked with a ban on zip files!!
>
> I added the following configuration to amavis to ban any zip file
> (truncated for ease of reading in this thread)
>
> $banned_filename_re = new_RE( qr'^\.(zip)$', );
>

Looking at the regex for this, it appears that this is only going to
match a file named ".zip" (or ".(zip)" and not "Reports.zip" (or
anything else that has a character before the ".zip" extension). I
would recommend adding a "|zip|" entry into the list of file
extensions that are already banned (IE: "banned ext - basic" or
"banned ext - long")? That, or change your regex a bit to match
"*.zip" instead:

qr'^.*\.zip$' (Will match any filename that ends in ".zip")

Regards,
Janky Jay, III

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlVVC+EACgkQGK3MsUbJZn6v9wCfTunsm27OMDeeuEd04wA6a4JC
kUQAnjXJm9xu+dYtmIZG3qADp0ZAnYU1
=GRvo
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-***@renaissoft.com<mailto:Maia-***@renaissoft.com>
http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users


I have resolved this by updating the "file" binary by installing from source from ftp://ftp.astron.com/pub/file/.

These malicious zip files are now correctly identified and blocked.

Thanks
Lawrence R. Mulder
2015-06-11 18:32:35 UTC
Permalink
I don't know about anyone else, but I was having trouble with file version 5.22 erring out on various file attachments types on maia 1.0.2c. Messages would just sit in the postfix queue saying file command had failed on a mime part. However, file version 5.23 is available here:

ftp://ftp.astron.com/pub/file/

as of yesterday and based on my initial testing, it seems to have fixed this issue. I highly recommend anyone that was running file 5.22 upgrade to 5.23 as soon as possible.

Thanks,
-Larry


From: Maia-users [mailto:maia-users-***@renaissoft.com] On Behalf Of Lawrence R. Mulder
Sent: Wednesday, May 27, 2015 10:28 PM
To: James Robertson; maia-***@renaissoft.com
Subject: Re: [Maia-users] Malicious .exe in zip file NOT being blocked by banned attachment

Which distribution is that on and what version of file did you go from and to with the "upgrade" or replacement?

Thanks,
-Larry


From: James Robertson
Sent: Wednesday, May 27, 2015 10:26 PM
To: maia-***@renaissoft.com<mailto:maia-***@renaissoft.com>
Subject: Re: [Maia-users] Malicious .exe in zip file NOT being blocked by banned attachment



On 15 May 2015 at 06:56, Janky Jay, III <***@unfs.us<mailto:***@unfs.us>> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi James,

On 05/14/2015 12:09 AM, James Robertson wrote:
> On 14 May 2015 at 15:49, James Robertson <***@mesrobertson.com<mailto:***@mesrobertson.com>
> <mailto:***@mesrobertson.com<mailto:***@mesrobertson.com>>> wrote:
>
> On 29 April 2015 at 18:19, Jason Street <***@openmailbox.org<mailto:***@openmailbox.org>
> <mailto:***@openmailbox.org<mailto:***@openmailbox.org>>> wrote:
>
> On 2015-04-29 03:57, James Robertson wrote:
>
> A user received an email with a zip file containing a malicious
> .exe.
>
>
>
> Not much help in troubleshooting but the exact same file got passed
> my MAIA install too.
>
> https://www.virustotal.com/en/file/df67f6033ea1c66792a4116856da4decffcf7bb75dee6e2e7ebcd953cd72d180/analysis/1430295491/
>
> I do note that ClamAV does not detect it as malicious
>
>
> Zip files aren't blocked with a ban on zip files!!
>
> I added the following configuration to amavis to ban any zip file
> (truncated for ease of reading in this thread)
>
> $banned_filename_re = new_RE( qr'^\.(zip)$', );
>

Looking at the regex for this, it appears that this is only going to
match a file named ".zip" (or ".(zip)" and not "Reports.zip" (or
anything else that has a character before the ".zip" extension). I
would recommend adding a "|zip|" entry into the list of file
extensions that are already banned (IE: "banned ext - basic" or
"banned ext - long")? That, or change your regex a bit to match
"*.zip" instead:

qr'^.*\.zip$' (Will match any filename that ends in ".zip")

Regards,
Janky Jay, III

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlVVC+EACgkQGK3MsUbJZn6v9wCfTunsm27OMDeeuEd04wA6a4JC
kUQAnjXJm9xu+dYtmIZG3qADp0ZAnYU1
=GRvo
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-***@renaissoft.com<mailto:Maia-***@renaissoft.com>
http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users

I have resolved this by updating the "file" binary by installing from source from ftp://ftp.astron.com/pub/file/.
These malicious zip files are now correctly identified and blocked.
Thanks
Loading...