Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I help manage a small network of about 40 computers. We are running an Exchange 2003 mail server.

What is the best way to find which machine is infected by a spambot? I've tried installing anti-virus and anti-malware programs on each computer. After scanning the computers I did find a few that had lots of malicious programs and thought that our problem was solved. However our domain keeps getting blocked by DNS Blacklists and I have to remove them daily for our clients to receive our e-mail.

Note: We are being attacked by Directory Harvest and Backscatter tactics.

edit: Our e-mail server doubles as a DNS server. Could this possibly open up vulnerabilities for spam attacks?

share|improve this question
up vote 6 down vote accepted

First, you need to stop the spam.
a- set your firewall to not allow outbound SMTP/POP except from the email server.
b- set your mail server to not allow outbound relay.

Then, you need to find the problem machine(s).
1- Look at the firewall logs to see which machine(s) are actually trying to do outbound mail and getting blocked. Those machines are infected.
2- Make sure each machine has current A/V, and do a thorough scan on each machine.
3- You may want to implement the Windows Firewall on each machine.
4- If still not found you will need to use a sniffer.

Note: I don't think that DNS and email on the same server is an issue.

share|improve this answer
Honestly this seems like a good solution. However not being too familiar with Exchange 2003 limits my knowledge of how to go about implementing this. I guess we'll just need to hire someone outside the company with more network/server knowledge. – mav May 28 '09 at 18:56
"Relay restrictions" are controlled on the "Access" tab of the "SMTP Virtual Server" Properties page. It is a bunch of layers down through the Exchange System Manager. The complete path (on my server) is Admin Groups/First Admin Group/Servers/<<server name>>/Protocols/SMTP/Default SMTP Virtual Server. – tomjedrz May 28 '09 at 19:13
Thanks! That helps a lot. – mav May 28 '09 at 19:55

The problem could be that that your exchange server is allowing RELAY. Make sure that setting is turned off or set only the IPs which are allowed to relay via that server. Your network design should only allow the exchange server to send traffic out of your network via port 25.

Most spambots use port 25. Once you have setup like that, then if any other machine try to send via port 25 it will show up in the firewall logs.

Good Luck!

share|improve this answer
How do I check my exchange server Relay options so that I can turn it off? – mav May 28 '09 at 15:23
Try this – Saif Khan May 29 '09 at 5:16
Thanks. Very helpful. – mav May 29 '09 at 16:24
  1. You should sniff your network traffic. There are many nice tools available, all the way from plain packet dumps similar to tcpdump all the way to fancy GUI visualization apps. Typically you will need to either: a) plug into a special port on your switch, b) configure another port to see all traffic, or c) do the sniffing from your firewall/router. First just focus on finding SMTP traffic to the outside world from any machine that's not the Exchange sever. Later you should examine all traffic to see if anything else is going on: IRC from someone's machine who doesn't even know what IRC is, for instance.
  2. Write a plain language statement of what traffic should be allowed out of your network, and implement outbound rules at your firewall/router, with logging. You will be surprised how well this works. And it will also mean that you will know when something bad is happening before you hear it from an outside party!
share|improve this answer

If you have a firewall, a simple solution is to block all outbound port 25 traffic except for your Exchange server. Individual machines are likely trying to send spam on their own. Once you've put the block in place, check the firewall logs to see which IP is trying, and failing, to hit port 25 outbound.

share|improve this answer

Where is your data stored? Is the hardware mostly identical? It might be easiest to reimage the lot of them.

share|improve this answer
Our e-mail data is stored locally on each computer. We have other servers however I do not believe that they should affect our mail server. – mav May 28 '09 at 15:11

I have used a program called Showtraf before now which monitors traffic on the network. We had a similar problem before and it showed the ip that was sending out vasts amounts of data on port 25.

Available here -

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.