[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

help! my exchange server keeps getting hacked

Posted on 2010-08-30
14
Medium Priority
?
1,681 Views
Last Modified: 2012-05-10
i have an exchange server that keeps getting blacklisted. everytime i think it is clean, a few weeks go by and i get blacklisted again. i can see (with wireshark) emails going out on SMTP connections that some virus or someone else is initiating, but i cant seem to get rid of it.  

i know this seems basic, but how do i verify that ONLY my authenticated users (about 10) can send out and NO OTHER USER can send out of my exchange server?
0
Comment
Question by:DotFoil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +3
14 Comments
 
LVL 12

Accepted Solution

by:
FDiskWizard earned 1500 total points
ID: 33562280
If you have an infected server, then you have a real problem. Your server has to be able to send email.
Unless it is a user with the infection.
enable message tracking and SMTP logging so that you can see what is being sent.
It should show you where it originates.
http://www.msexchange.org/tutorials/Exchange-2003-Message-Tracking-Logging.html
http://www.msexchange.org/tutorials/Logging_the_SMTP_Service.html

If you think it is your server, you need to run some type of cleanup.
MalwareBytes is good. If there are only 10 users, run it on all of them...

Oh, and make sure you have SMTP locked down on the server for only the server(s) that should be forwarding to it.
http://technet.microsoft.com/en-us/magazine/2006.01.stopspam.aspx


0
 
LVL 1

Expert Comment

by:ptholen
ID: 33562555
Wich version of exchange you have?

make sure only internal addresses are allowed to send smtp mail (relaying). Please note that outlook users (echange profile) don't use SMTP, they use MAPI. In this case you even do'nt need the internal subnet to allow relay.

For best security disable 'allow all users that successfully authenticate to send mail' (or something like that).If an hacker knows a username and password he still can send spam to and from your server. If only users on the internal network must send e-mails i would disable that.





0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 33563049
The usual problem that I have seen time and time again is that you have probably been the victim of an Authenticated Relay, which essentially means someine has used a brute force password crack on your server and is sending out emails via your server using one of your user accounts with a password.

How many users do you have on your server?  It might be simpler to just change ALL the passwords for ALL the users

Do you have Anti-Spam software on the server?  If not, I would recommend installing Vamsoft ORF which you can trial for 30 days and this will help you identify which account has been abused.

Please advise which Exchange Version you have.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:davorin
ID: 33563084
Do you have blocked port 25 in outgoing direction on your firewall for all internal IPs except your exchange server? In don't it could be that some other PC is infected with malware.
0
 

Author Comment

by:DotFoil
ID: 33563626
Version is Exchange 2003; I am using NOD32 with Exchange monitor, but i KNOW we have gotten viruses on the server. I used wireshark to see the spam, and i could see it just going out and out - uit stopped when i removed the virus, but maybe it was on another workstation as well.
All was fine for weeks, then it cropped up again.
I also had everyone change passwords the first time it happened, but that did not affect the spamming, so i dont think that was the cause.
0
 

Author Comment

by:DotFoil
ID: 33563708
thanks FDiskWizard: for the articles. since i only have a couple users i decided to grant ONLY them access the SMTP virtual server. i saw a beautiful thing in wireshark:
client does not have permission to submit mail to this server.
So this will buy me some time, but we are still under constamt attack. is this a virus inside? is it an external attack? how can i tell? I have scanned and scanned and cant seem to say definitively "ive got it"
0
 

Author Comment

by:DotFoil
ID: 33563796
ok, here is the last question and then ill award points:
wireshark is now telling me that granting exclusive access to my users to send (by adding mary, paul, stephen etc) i am successful denying all the smtp requests that have been bombarding my server. My question is, can i tell from the wireshark capture where these attacks are coming from ?
Every request has different email addresses and IPs associated with it, but has the same MAC address listed:Source: TelogyNe_66:51:eb (00:e0:a6:66:51:eb)
I assumed i would find this MAC address in my network, but it is not one of mine. Does that mean this attack is coming from outside, and if so, can i stop it?
0
 
LVL 1

Expert Comment

by:ptholen
ID: 33564552
Goord to hear you could secure the box.

wireshark only captures the data, he does not 'know' your network.

Yes, I also think the MAC is from inside, maybe a PC with a virus? If the mac is from outside you would get the MAC from your router in your ethernet-frame. To make sure you can do a monitoring on you rrouter just to see if the frames will bypass the router?

To troubleshoot you can examine the ARP tables from your routers / switches (if they are managed) to search for that AMC address.

As you can see here "http://www.coffer.com/mac_find/?string=00:e0:a6:66:51:eb"  the MAC address is from a company called Telogy Networks (as also stated in the source name). They make VOIP products. Do you have any VOIP in your network?

To maker sure: Your users do need straight SMTP access? They do not use Outlook in Exchange mode?
I would not set access to the SMTP service at user level, you always have a chance of brute password hacking from outside. Give those users an static IP address en only allow those IP addresses to relay.

0
 
LVL 12

Expert Comment

by:FDiskWizard
ID: 33568045
If you enable SMTP logging you should be able to see in the SMTP logs where the error originate from...

0
 

Author Comment

by:DotFoil
ID: 33568416
ptholen: actually, we are using exchange for the time being, does that mean i do not need to have smtp turned on? I thought even exchange used smtp for outgoing mail. is there a way to turn it off?

Also, how could a VOIP product be sending spams? I checked all the workstations and this did not match any of our NICs - very odd. Also, while the MAC address stays the same, the external IP of the intrusion keeps changing, but they are all POSTINI wan ips, which we use for spam control (ha!).

I guess if i can find out how to turn off smtp i can solve all of these problems at once. thoughts?
0
 
LVL 8

Expert Comment

by:dosdet2
ID: 33569417
re: Mac addresses.
Remember that MAC addresses are layer 2.  Once a packet is routed, the originating MAC address is changed to the last level 3 device.  If the MAC address truly belongs to Telogy Networks, it is irrelevant unless there is a layer 2 connection to that company.  
 
The MAC address is probably spoofed.  If this traffic is fairly constant, I recommend unplugging each workstation - one at a time - and see if the traffic stops (doing it at the switch is usually convenient).  If it stops, you have your culprit machine.  

If there is no change in the traffic, try blocking that IP at your firewall.  Test for incoming email (use an outside webmail account and email to yourself on the inside) and see if the traffic stops / changes.  Also check the MAC address of your firewall - It might match the address listed on the bad traffic.??

I would also call your POSTINI people as they could have someone using their system to relay these email to you.

There are a few things to check - might give us some more clues.   Let us know what happens.
:-)
0
 
LVL 8

Expert Comment

by:dosdet2
ID: 33569448
P.S. - I don't mean that POSTINI would be doing this intentionally, but everybody is susceptible to attack from time to time.
0
 
LVL 1

Expert Comment

by:ptholen
ID: 33584813
@Dotfoil: You need SMTP on your server because Exchange uses SMTP to talk with the outside. But normal OUTLOOK users ( with an Exchange profile) don't use SMTP, they use MAPI.

You only need SMTP access for users or computers that needs to send mail directly and don't uses Outlook.

Again,. this is the best solution for stopping spam. Only allow SMTP relaying for known (internal) IP addresses. Of course if your IP is spoofed or a trusted IP has an virus the problem still exist but then you have narrowed the list to a few possible IP addresses.

What I recommend is (if possible) to remove RELAY access (on your SMTP connector/server) for all users and computers. test if Outlook users still can send and receive e-mail. You can see, they do.


Don't remove smtp ACCESS rights, SMTP access is needed for all external SMTP Servers who wants to send you mail. You only do need to remove the users and computers smtp RELAY rights.

I assume you don't have an SMTP gateway / smarthost that you trust? Because if you do, the problem can resides on the trusted SMTP gateway.

Patrick



0
 

Author Closing Comment

by:DotFoil
ID: 33709466
Thanks for the help
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

649 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