Σήμερα πολλές από τις εφαρμογές ηλεκτρονικού ταχυδρομείου, όπως το Sendmail, το Postfix ή ακόμη και το MS Exchange, έχουν επανασχεδιαστεί ώστε να μειώνουν την πιθανότητα να γίνουν ‘αναμεταδότες spam’. Από την εμπειρία μας, οι περισσότερες επιθέσεις αναμετάδοσης SMTP AUTH προκαλούνται από την παραβίαση λογαριασμών χρηστών που προστατεύονται με αδύναμο κωδικό πρόσβασης. Μόλις ανακαλυφθούν και παραβιαστούν οι λογαριασμοί. Spammer πιστοποιούν την ταυτότητά τους χρησιμοποιώντας τα διαπιστευτήρια του χρήστη, τους χορηγείται η δυνατότητα αναμετάδοσης μέσω του διακομιστή, η οποία στη συνέχεια χρησιμοποιείται για την αποστολή spam.
Below are the easy steps to stop these spam emails quickly and identify which account(s) has been compromised.
Step1: Stop on on-hold mail queue.
Large amount of spam emails keep queueing your mail spool. What even worst is all the spam it fill up all your /var. Thus, it is always to hold the mail queue for temporary until you find out the which account has been exploited by spammer and send a large amount of emails.
Step2: Check your mail log.
Go to /var/log/maillog to have a quick look on the line with from:. You might see lots of email domain name there are not belong yo your organization. This is due to the spammer is faking the mail from:.
Step 3: Identify compromised account authenticating SMTP AUTH connection
Next, let us check those email accounts that has been exploited. Run a have cat grep sasl_username and sort it. You should see a long list of the login attempt and session for those exploited account. You can also do a quick calculation by running wc -l command to see total sessions for a particular user.
Step4: Disable the exploited email account.
Once, we have SASL_username string, which is the user account. You are advised to disabled or change the password to complex password.
Step 5: Move the mail queue or delete the spam email
Now, we have to deal with our mail queue. Easier and fastest way is to move your mail queue and do the housekeeping later. Or, you can delete those spam email using Bash script.
Step 6: Release Mail queue
Remember to release mail queue after our housekeeping process and keep on monitoring of the mail traffic.
