Solved

Hack/attack on smtp port 25

Posted on 2004-09-22
6
2,922 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:chrishorak
6 Comments
 
LVL 11

Expert Comment

by:PennGwyn
ID: 12127662
> 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
 

Author Comment

by:chrishorak
ID: 12131675
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
 

Author Comment

by:chrishorak
ID: 12133363
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
 
LVL 23

Expert Comment

by:Tim Holman
ID: 12150112
> 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
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 16155986
PAQed with points (250) refunded

DarthMod
Community Support Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Checkpoint books 3 86
Firewall vs WYSIWYG editor 5 81
Multiple IP Address Block through a switch 7 117
VPN running on Windows 2008 Server 11 83
Wikipedia defines 'Script Kiddies' in this informal way: "In hacker culture, a script kiddie, occasionally script bunny, skiddie, script kitty, script-running juvenile (SRJ), or similar, is a derogatory term used to describe those who use scripts or…
If you are like regular user of computer nowadays, a good bet that your home computer is on right now, all exposed to world of Internet to be exploited by somebody you do not know and you never will. Internet security issues has been getting worse d…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question