[clamav]werkt wel of niet?

Pagina: 1
Acties:

Vraag


  • Paultje3181
  • Registratie: November 2002
  • Laatst online: 00:20
Op mijn debianserver heb ik exim, dovecot, clamav en spamassassin staan. Bij alle inkomende mail wordt netjes een spam-status weggeschreven, dus de juiste acl wordt gelezen:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  # Deny if the message contains malware. Before enabling this check, you
  # must install a virus scanner and set the av_scanner option in the
  # main configuration.
  #
  # exim4-daemon-heavy must be used for this section to work.
  #
   deny
     malware = *
     message = This message was detected as possible malware ($malware_name).


  # Add headers to a message if it is judged to be spam. Before enabling this,
  # you must install SpamAssassin. You also need to set the spamd_address
  # option in the main configuration.
  #
  # exim4-daemon-heavy must be used for this section to work.
  #
  # Please note that this is only suiteable as an example. There are
  # multiple issues with this configuration method. For example, if you go
  # this way, you'll give your spamassassin daemon write access to the
  # entire exim spool which might be a security issue in case of a
  # spamassassin exploit.
  #
  # See the exim docs and the exim wiki for more suitable examples.
  #
#   warn
#     spam = Debian-exim:true
#     add_header = X-Spam_score: $spam_score\n\
#               X-Spam_score_int: $spam_score_int\n\
#               X-Spam_bar: $spam_bar\n\
#               X-Spam_report: $spam_report

# put headers in all messages (no matter if 
# spam or not)
warn spam = nobody:true
     add_header = X-Spam-Score: $spam_score ($spam_bar)
     add_header = X-Spam-Report: $spam_report
# add second subject line with *SPAM* marker 
# when message is over threshold
  warn spam = nobody
      add_header = Subject: ***SPAM ($spam_score)*** $h_Subject:

De spamassassin wordt goed gelezen, dus ik neem aan dat clamav ook meegenomen wordt.

Als ik in mijn mailcliënt in de body de test virus verstuur, weigert hij netjes om te versturen, dus dat gaat ook goed.

Maar waarom krijg ik dan toch zoveel mails binnen met Locky virus?

Als ik een scan doe met clamscan komen ze allemaal naar voren. Dus ze worden wel herkend.

Alle reacties


  • Paultje3181
  • Registratie: November 2002
  • Laatst online: 00:20
Iemand die hier nog enig idee heeft?

  • DJMaze
  • Registratie: Juni 2002
  • Niet online
Lastig te vertellen zonder een voorbeeld. Ik krijg zelf namelijk geen Locky bestanden binnen.

Wat staat er in de headers van de beruchte e-mail?

[ Voor 22% gewijzigd door DJMaze op 23-05-2016 12:13 ]

Maak je niet druk, dat doet de compressor maar


  • Paultje3181
  • Registratie: November 2002
  • Laatst online: 00:20
Hierbij een mail.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Return-path: <robert@jumboselfstorage.co.uk>
Envelope-to: paul@bla.nl
Delivery-date: Mon, 07 Mar 2016 17:01:09 +0100
Received: from subs14-223-255-230-63.three.co.id ([223.255.230.63]:26411)
    by secure.bla.nl with esmtp (Exim 4.84)
    (envelope-from <robert@jumboselfstorage.co.uk>)
    id 1acxaj-0003GZ-Ni
    for paul@bla.nl; Mon, 07 Mar 2016 17:01:09 +0100
From: "Robert Symon" <robert@jumboselfstorage.co.uk>
To: <paul@bla.nl>
Subject: Emailing - IMG_0015.pdf
Date: Mon, 07 Mar 2016 23:00:33 +0700
Message-ID: <002701d173b0$5fe3d4a0$1fab7de0$@jumboselfstorage.co.uk>
MIME-Version: 1.0
Content-Type: multipart/mixed;
    boundary="----=_NextPart_000_0028_01D173B0.5FE88F90"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AdFzsF7c/4UGNbleSp+s7VhG25He7A==
Content-Language: en-gb
X-Original-To: tunstall@jumboselfstorage.co.uk
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Score: 17.3 (+++++++++++++++++)
X-Spam-Report: Spam detection software, running on the system "gm-sms",
 has identified this incoming email as possible spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  [...] 
 
 Content analysis details:   (17.3 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  2.7 RCVD_IN_PSBL           RBL: Received via a relay in PSBL
                             [223.255.230.63 listed in psbl.surriel.com]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [223.255.230.63 listed in zen.spamhaus.org]
  3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
  0.7 RCVD_IN_XBL            RBL: Received via a relay in Spamhaus XBL
  0.0 RCVD_IN_MSPIKE_L5      RBL: Very bad reputation (-5)
                             [223.255.230.63 listed in bl.mailspike.net]
  1.6 RCVD_IN_BRBL_LASTEXT   RBL: No description available.
                             [223.255.230.63 listed in bb.barracudacentral.org]
  0.0 MIME_HTML_MOSTLY       BODY: Multipart message mostly text/html MIME
  0.0 HTML_MESSAGE           BODY: HTML included in message
  0.0 TVD_SPACE_RATIO        No description available.
  0.0 RCVD_IN_MSPIKE_BL      Mailspike blacklisted
  0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                             dynamic-looking rDNS
  3.2 HELO_DYNAMIC_IPADDR    Relay HELO'd using suspicious hostname (IP addr
                             1)
  1.4 DOS_OUTLOOK_TO_MX      Delivered direct to MX with Outlook headers
Subject: ***SPAM (17.3)*** Emailing - IMG_0015.pdf

This is a multipart message in MIME format.

------=_NextPart_000_0028_01D173B0.5FE88F90
Content-Type: multipart/alternative;
    boundary="----=_NextPart_001_0029_01D173B0.5FE88F90"


------=_NextPart_001_0029_01D173B0.5FE88F90
Content-Type: text/plain;
    charset="us-ascii"
Content-Transfer-Encoding: 7bit

------=_NextPart_001_0029_01D173B0.5FE88F90
Content-Type: text/html;
    charset="us-ascii"
Content-Transfer-Encoding: quoted-print
...
</body></html>
------=_NextPart_001_0029_01D173B0.5FE88F90--

------=_NextPart_000_0028_01D173B0.5FE88F90
Content-Type: application/zip;
    name="IMG_0015.pdf.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
    filename="IMG_0015.pdf.zip"


Deze mail is gescand volgens de headers, maar niet naar voren gekomen. En via een clamscan wel.

Dus waarom niet de eerste keer?

  • DJMaze
  • Registratie: Juni 2002
  • Niet online
Lijkt alsof clamsmtp mislukt

Staan de AMaViS en clamsmtp configuraties goed?
Controleer ook de mail.log voor errors.
Op poort 10024 draait AMaViSd, is er toegang?
code:
1
netstat -nap | grep 10024

[ Voor 8% gewijzigd door DJMaze op 24-05-2016 13:34 ]

Maak je niet druk, dat doet de compressor maar


  • Paultje3181
  • Registratie: November 2002
  • Laatst online: 00:20
Amavis en clamsmtp zijn niet geïnstalleerd. Deze zijn toch ook niet nodig icm exim? Ik kom steeds tegen dat je alleen de exim configs aan hoeft te passen en niks over amavis. Wel icm postfix overigens.

  • DJMaze
  • Registratie: Juni 2002
  • Niet online
Ah ja, mijn fout!

Ik heb even mijn exim.cnf er bij gepakt uit een cPanel server:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
av_scanner = clamd:/var/clamd

tls_certificate = ${if exists {/etc/mail_sni_map} {${extract{crtfile}{${lookup {$tls_sni} lsearch {/etc/mail_sni_map} {$value}}}{$value}{/etc/exim.crt}}} {/etc/exim.crt}}

tls_privatekey = ${if exists {/etc/mail_sni_map} {${extract{keyfile}{${lookup {$tls_sni} lsearch {/etc/mail_sni_map} {$value}}}{$value}{/etc/exim.key}}} {/etc/exim.key}}

tls_verify_certificates = ${if exists {/etc/mail_sni_map} {${extract{cabundle}{${lookup {$tls_sni} lsearch {/etc/mail_sni_map} {$value}}}{$value}{}}} {}}

acl_smtp_data:
    deny message = This message contains a virus or other harmful content ($malware_name)
         malware = */defer_ok
         demime = *

    warn log_message = Message has been scanned: no virus or other harmful content was found

Check dan later je logs of hij überhaupt iets doet. Kan zijn dat exim niet de juiste rechten heeft om clamd aan te roepen.

Maak je niet druk, dat doet de compressor maar


  • Paultje3181
  • Registratie: November 2002
  • Laatst online: 00:20
demime is deprecated en hoeft niet meer.
Ik heb malware = * staan ipv */defer_ok

Zojuist clamav debug aangezet en uitgaand en inkomend Eicar werkt. Ik krijg alleen geen bounce message teruggestuurd. Ook zie ik de message in mainlog staan. Eicar wordt dus gebounced. Alleen komen er wel veel mails binnen met vage zip files... ik maak ze uiteraard niet open, maar met clamscan komen ze wel binnen als virus. Met name als Locky dus.

Is er een manier om alle mails een header te geven met het resultaat van de scan? Net als dat spamassassin dat doet?

Alles wat ik op Google vind is uit 2005-2006 of is een rechten probleem zo ongeveer.
Pagina: 1