Hack/attack on smtp port 25

We are a small company who try to host our own email - unfortunately we have very little experience in this area..... We have a basic email server package that handles our mail, on a Windows 2000 server.

It was working fine, but then suddenly we started getting loads of SPAM mail coming through. Using the DOS "netstat -an" command I could view that we were getting a large number of connections on port 25 - from a large number of different ip addresses. Port 25 obviously needs to be open for us to receive legitimate email, so we can't block it.
We have however blocked all other ports we do not use. This is done through the windows 2000 options.

2 things seem suspicious though:
The first is that the number of connections each minute is very high, so it is obviously not random spam email. I assume spammers have programs that connect via port 25 from various different ip addresses.

The 2nd suspicious thing I noticed is that we then have connections from unknown ip addresses, from port 25 to various unused ports on our server. I assume this is a way that people hack onto a server if the ports are blocked?

Is there anyway to identify whether connections to port 25 are genuine email connections (I suspect not....) and is there any way to restrict access to other ports once they have connected to port 25?

Thanks
Chris
chrishorakAsked:
Who is Participating?
 
DarthModConnect With a Mentor Commented:
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0
 
PennGwynCommented:
> The 2nd suspicious thing I noticed is that we then have connections from unknown ip addresses, from port 25 to various
> unused ports on our server. I assume this is a way that people hack onto a server if the ports are blocked?

These may very likely indicate that your server, in addition to receiving lots of spam for *you*, is also an "open relay" and is being used to forward spam to the rest of the world.

You haven't specified what email server software you run, but search online for instructions on how to configure it to restrict relaying -- hopefully before you get blacklisted as a friend of spammers.

0
 
chrishorakAuthor Commented:
Email relaying is turned off in our email server software (True North Internet Anywhere Email Server - ver. 3), but I assume that the hackers have got through a back door.... Unfortunately we have an old version and don't have the money to do an upgrade at the moment. They don't support old versions.

I can see various ip addresses that appear to be relaying the mail but these originate from all over the world. I have blocked some of them by using "route add" to redirect them to an invalid ip address, which works, but unfortunately they keep coming in with new ip addresses!

Is there any way to stop smtp relaying from within Windows 2000 Server, without relying on the setting of the email software?
0
 
chrishorakAuthor Commented:
True North provide a 30 day eval copy of their new server which we have installed. This appears to have solved the problem as it automatically adds ip addresses to a list of denial of service attacks. I think I have convinced management to buy the new version!
0
 
Tim HolmanCommented:
> Is there anyway to identify whether connections to port 25 are genuine email connections

95% Yes - this is called grey-listing.  In essence, the first SMTP session is ignored (this takes care of 99% of spammers, as they just send send send and don't care about server acknowledgements), but subsequent sessions from the same IP address are accepted, as they are most likely to be mail retransmits from legitimate servers.

http://projects.puremagic.com/greylisting/

Of course, there will always be unwanted mails that manage to get through, somehow.

Another thing to consider is viral infection.  There are plenty of worms that will try and propagate on port 25, so make sure you're locked down and fully patched.  MSBA works well for this:

http://projects.puremagic.com/greylisting/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.