I suppose that's time to let you in on a secret (if you can call a publicly available KB Article a secret :) ). Tarpitting is the act of slowing an attacker down so they can't accomplish their task in a short period of time. Usually if an attacker can't do something quickly, unless you're a target, they are going to give up.
So, let's all do an update to help prevent the enumeration of Exchange Server 2003 e-mail addresses.
So to help you prevent look-up on your email addresses, let's get started:
- Call PSS (it's a free call for an update) and request they send you the updated from article ID: 842851
- Open Server Management, Advanced Management, First Storage Group, Global Settings, Global Settings.
- Right-click on the Mail Delivery node and select Properties.
- on the Recipient Filtering tab click Filter Recipients who are not in the Directory.
That enables the filter, now we need to set the timeout inorder to delay the false requests. To do this, we'll have to set this registry key:
Key:HKLM\SYSTEM\CurrentControlSet\Services\SMTPSVC\Parameters
Value Name: TarpitTime
Type:DWORD
For the value, set the number (in seconds) the SMTP server will delay response to the request to send email to a non-existing user. I have mine set to 10 seconds, which is what I would recommend.
We're almost done, the filter is all ready, now we just need to enable it.
- Back in Server Management, open Advanced Management, First Storage Group, Servers, {ServerName}, Protocols, SMTP.
- Right-click on Default SMTP Virtual Server and choose Properties.
- On the General Tab click on the Advanced button.
- Make sure (All Unassigned) is selected and click Edit.
- Click Apply Recipient Filter, and Ok your way out.
- The last step, is open a command prompt (start->run->type "cmd")
- In the command prompt, reset IIS using the "iisreset" command
That's it! Now your server will delay 10 seconds, each time it tries to send email to an address that doesn't exist in your AD.
What's wrong, don't believe me?
Try these steps to prove it's working:
- Telnet to port 25 (run the command "telnet {servername} 25"
- In the window that comes up, type "helo".
- After the response, type "mail from: foo@bar.com".
- After that response, type "mail to: foobar@{yourdomain}.com". Notice that it takes about 10 seconds to respond with "Invalid Address"... That is if you don't have anyone named foobar at your company. :o)
Pretty cool eh!? It will take quite a bit longer now to enumerate the addresses on your server using a dictionary attack.
2 comments:
Sean,
In version of 1.0 of KB842851, download of 885881 hotfix was available for download and date of Smtpsvc.dll was 16-Sep-2004. Now in version 5.0 Microsoft has pulled the download and is available through PSS and the date of Smtpsvc.dll is 22-May-2004.
Is it different from previous version and does it mean that those of us who have already applied it must reapply it.
Thanks in advance for your comments,
IK
Hrm, I'm not sure, I could chase it down, but the easiest way is to try the steps above, and see if the 10 second timeout happens, if it doesn't, you'll need to get the latest version from PSS.
Post a Comment