One nasty form of spamming that’s being used more and more is the Reverse NDR attack. This is where a spammer is able to use your e-mail server as a relay even though you’ve got all the relays closed. How it works is: The spammer sends a message to a bogus user at your domain. They spoof the From: line with the address of the actual recipient. Your server sees the bogus address, and sends an NDR back to the sender. But, in this case, the sender is the actual recipient, and they end up getting an NDR, from you, with the spammer’s message attached.
Through this forum thread I found an entry in GFI’s knowledge base that tells how to disable this kind of attack in Windows. You need to have Exchange 2003, and there’s a way to have the server only accept messages addressed to an existing user in the Active Directory. Any mail sent to a bogus address gets a 550 error and doesn’t generate an NDR. I’ll reprint the directions here:
Accepting emails only for valid email addresses in your domain can only be done if you are using Exchange 2003. Previous versions of Exchange server did not have this functionality.
Please follow this procedure to enable Exchange server 2003 to allow emails only for valid recipients:
A. Enable filtering for recipients which are not found in Active Directory.
- Open Exchange System Manager -> Global Settings -> right-click on Message Delivery and choose Properties.
- Change to the “Recipient Filtering” tab
- Enable the option “Filter recipients who are not in the Directory”
- Click OK to close the window and save your changes.
B. Enable the recipient filter on the SMTP Virtual Server. This will only need to be enabled on the SMTP virtual server that is receiving emails from the internet.
- Open Exchange System Manager -> Administrative Groups -> Administrative Group Name -> Servers -> Protocols -> SMTP.
- Right-click on the SMTP Virtual Server and select Properties
- On the “General” tab click the “Advanced…” button
- Choose the IP binding that that is listening on the Internet. Click the “Edit…” button.
- Enable the option “Apply Recipient Filter”
- Click OK through all the windows to save your changes.
When someone tries to send an email to a user that does not exist in your Active Directory domain, they will receive the error:
550 5.5.1 User unknown
The email is not received by Exchange server, since the error is given during the SMTP transmission.
- Enabling Exchange server to refuse connections for emails that are destined to not existing email addresses can allow spammers to build a list of valid email addresses in your domain.
- Recently spammers have been trying to send emails to invalid email address. These will result in an NDR, however since the FROM email address of the original email would be the spammers target, the NDR would be sent to the spammers target. Enabling the above setting will help decrease these emails.
This will save your Exchange Server from being used as a relay, at least until they come up with another new technique that needs to be worked around.
Filed under The Computer Vet Weblog