Directory Harvest Attacks Can Turn You Into an NDR Spammer
If you don?t know what Exchange Recipient Filtering is, then your company may be sending out spam. Many of our customers and friends run Exchange servers, so we like to periodically discuss Exchange best practices. Fortunately, adding recipient filtering is a very simple and straight forward change to make.
First, a little background. Directory Harvest Attacks (DHAs) are an extremely common way for spammers to infiltrate your corporate users’ inboxes. The idea is simple?the spammer connects to your mail server and just starts guessing email addresses (e.g. john@, sally@, sales@, etc). They might literally try thousands of combinations…and why not? They are not paying for it and have all the time in the world. This is of course very bad news for you. Two problems arise: 1) The spammer(s) will eventually have your entire corporate email directory, and 2) All of these lookups can bring your mail server to a grinding halt.
Microsoft decided to address this threat in an unfortunate way. By default, Exchange will asynchronously bounce bad recipients. That means instead of telling the sending mail server right away that a recipient does not exist, Exchange says all recipients are valid. According to the idea, spammers are just wasting their time with directory harvest attacks. The server appears to accept ALL recipients for your domain, so the spammer cannot tell the good addresses from the bad. The theory was that since this would provide little value to spammers, they simply would not do it. It turns out a differently in practice.
The problem with this approach is that Exchange must at some point notify the sender that the recipient was not found. So, Exchange generates a NEW email message (called an NDR or Non-delivery Report) and sends it to the sender of the email message. But, wait. What if the spammer did not use his REAL email address? In fact, what if he LIED and said the message was coming from firstname.lastname@example.org? Your server just spammed the real victim. Not only have you inadvertently contributed to the spam epidemic, you have also put the reputation of your company, domain name, and IP address reputation at risk.
Configuring Recipient Filtering
We highly recommend that anyone running a corporate email server invest in top-of-the-line Anti-spam technology. It will pay off a thousand fold in the long run. Most good anti-spam solutions do a reasonable job of limiting the impacts of Directory Harvest attacks. But almost all still will allow a sender to try quite a few bad recipients before shutting them down.
That means that EVERYONE running an Exchange server should consider the following configuration change to limit the impacts of this problem. If you are running Exchange 2003, then you need to add a recipient filter rule:
To configure recipient filtering, follow these steps:
1. Start the Exchange System Manager tool.
2. Expand Global Settings, right-click Message Delivery, and then click Properties.
3. Click the Recipient Filtering tab, click to select the Filter recipients who are not in the Directory check box, and then click OK.
4. When you receive the following message, click OK:
Connection, Recipient, and Sender Filtering must manually be enabled on specific SMTP virtual server IP address assignments as they are not enabled by default. For more information on how to enable any of the above filtering types, read their associated help sections.
5. Expand Servers, expand your computer, expand Protocols, expand SMTP, right-click Default SMTP Virtual Server, and then click Properties.
6. On the General tab, click Advanced.
7. Click Edit, click to select the Apply Recipient Filter check box, and then click OK three times.
Note If you are running Exchange in a front-end/back-end environment, recipient filtering must be enabled on the SMTP bridgehead server or servers.
If you are on an older version of Exchange, then you are out of luck (sorry). You might want to consider migrating to a business class hosted email solution and let all of this become someone else’s problem. Alternatively, you can use a gateway email solution, which rejects bad recipients synchronously via its own internal directory, or via LDAP against your Active Directory.
MxToolBox customers who need help with this issue should contact our support team. We are happy to walk you through the options.
Save This Page