This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SMTP being hijacked - trying to block sender

Looks like over the weekend we got hijacked and now I have spammers from Italy using our SMTP relay to send thousands of emails. I have added their domains to the sender blacklist filter and the expression filter, but the emails continue to pour through. Obviously, I'm not using the right tool to stop them. I've got a list of the domains they're using - does anyone know how I can block these guys? Thanks!

edit: Also realized this could be a malware intrusion on one of our workstations - we are currently scanning all machines with Malwarebytes to see if we can find the culprit. Just in case this is not the issue and we indeed have been hijacked, any tips for dealing with this would be highly appreciated. 
____

ASG220
Firmware 7.501
Pattern Version 22662


This thread was automatically locked due to age.
  • As soon as you get your maintenance subscription in place, you should ask your reseller to submit a support request to Astaro.  From your description, this doesn't sound like an Astaro issue, but they should confirm that.

    Are you checking outbound email?

    Don't I remember that you have multiple mail servers?  Is it unusual that someone without administrative priveleges on one of those servers could create new accounts?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Unless someone is specifically targeting you, 99+% of the time, these things are automated using pre-canned tools.

    Unfortunately, you've found out the hard way that Apple Mac stuff being more secure is a myth.  

    If it were me, I'd be getting Apple, Dovecot, and SquirrelMail support involved because they seem to be exploiting some sort of vulnerability.  I'd guess Squirrel may be the culprit, being the front-end.  Seems that each of their updates has quite a few security fixes.  Were you running the latest, 1.4.22?

    Since they seem to be able to send through different accounts on your server/mail server, you'd best plan on doing a rebuild after you find out how they got in.  Who knows what they've injected into the server(s).


    From the server side, I don't see anything unusual going on in the mail server. I'm monitoring all IMAP & POP connections and I only see legitimate, authenticated employees. The email accounts that I'm finding through the Astaro SMTP & mail logs do not exist anywhere on the mail server. Good point about Squirrelmail though. I'm using the NutsMail interface specifically (still uses the Squirrelmail engine) and I'll have to check to see what version I'm on and upgrade if necessary. Pretty sure it's 1.4.0. I might also need to tighten up the webmail config, I'll check that asap. Thanks for the insight.
  • Are you checking outbound email?


    Yes - I've got Apple's Server Admin up and am monitoring all IMAP/POP connections - which is not showing anything unusual - and also have Astaro's live SMTP log up, which is being flooded constantly with requests & errors from whoever is responsible for the exploit. (Predominantly the "cartasi@servizi.it" address)

    Don't I remember that you have multiple mail servers?  Is it unusual that someone without administrative priveleges on one of those servers could create new accounts?


    I actually only have one- a Dovecot server on an Apple Xserve running 10.6.6 Server. There is a 10.6.8 Server update available which has a lot of bug fixes so I am going to install it tonight on all 4 of my production Xserves. (Fingers crossed.) Potentially, these updates combined with updating Squirrelmail may help, but I'm always leery of large OS combined updates, often creates separate problems I didn't anticipate.
  • Sorry I was imprecise about "checking" outbound mail; I meant the 'Scan relayed (outgoing) messages' checkbox at the bottom of the 'Relaying' tab.

    The more I think about this, I wonder if it isn't the Squirrel mail server causing the problems by acting as an open SMTP relay of sorts.  Can you show the header from one of the spams being sent?  You can cause the Astaro to quarantine some by adding servizi.it to the 'Expression filter'.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Oh, yes, I am scanning relayed messages. I have added servizi.it to the Expression Filter as well as a few of the other most frequent addresses I've seen in the live SMTP log. At least the messages don't seem to be going out, but they are still flooding the Astaro every second. 

    Here's a header from a spam mail. FYI, these messages aren't being quarantined by the Astaro - they're going into the SMTP Spool and sitting there for 48hrs unless I manually clear them.

    Return-path: 
    Received: from [77.92.95.63] (port=37402 helo=User)
     by smtp.origprod.com with esmtpa (Exim 4.69)
     (envelope-from )
     id 1QvLru-00086P-2M; Sun, 21 Aug 2011 21:12:11 -0700
    From: "CartaSi"
    Subject: Abbiamo rilevato attivit� irregolari sul tuo conto
    Date: Mon, 22 Aug 2011 07:12:10 +0300
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
     boundary="----=_NextPart_000_00F4_01C2A9A6.39464B3E"
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Mailer: Microsoft Outlook Express 6.00.2600.0000
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
  • Here's a website that describes this exploit - it IS malware, a phishing email scam, to be exact: FraudWatch International > Phishing Alerts
  • That IP address in the header of the spam mail - 77.92.95.63 - has been added to the Blocked hosts/networks section in Relaying (I believe I mentioned this on the first page as well). Hostname of that IP is uk2net. So if I've set up that IP to be blocked, why are all these messages still going to the SMTP Spool?
  • Is that the complete header?  It looks like you're accepting the email - like you have an open SMTP relay.  How about a picture of your 'Relaying' tab?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Yes, it's relaying for LDAP-authenticated users (the "SMTP Relayers" group)
  • Hmmm - What's in the "SMTP Relayers" group?

    Cheers - Bob

    Sorry for any short responses!  Posted from my iPhone.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA