On TV.com: 2009's Most PIRATED TV Show
BNET Business Network:
BNET
TechRepublic
ZDNet

April 13th, 2007

Zero-day RPC flaw in Microsoft DNS exploited in the wild

Posted by George Ou @ 3:06 am

Categories: Infrastructure, Malware alert, Microsoft, Networking, News, Security, Servers

Tags:

According to David Maynor of Erratasec, a zero-day exploit against Microsoft DNS server is being seen in the wild. This affects the most up-to-date Windows Server 2000, 2003, and 2003 R2 for all service packs. This is somewhat unusual for Microsoft's DNS service because it's been rock solid for many years without any DNS server flaws. Fortunately, the attacks seem to be limited because this vulnerability isn't normally exposed to the Internet on a properly configured firewall. I'll show you how to protect your Microsoft DNS servers below.

The vulnerability is in the RPC interface of Windows DNS, and port 53 is not vulnerable. A properly configured firewall should permit only inbound UDP 53 to the DNS server, and TCP 53 needs to be open only for excessively large DNS records or DNS zone transfers. The RPC interface for Windows DNS resides on a dynamic port between ports 1024 to 5000. Microsoft is suggesting that you block these ports, but it doesn't really tell you how or where to do that, so I'll explain below.

The external firewall should block all ports by default and only permit UDP 53 going to your authoritative DNS server facing the Internet. TCP 53 should not normally be opened unless you have very large DNS records. Targeted openings to TCP 53 can be made for designated servers that need to get zone transfers. This unfortunately doesn't protect you from the internal LAN. For that, you will need to use a host-based firewall, such as the one built into Windows Server 2003.

Once you enable the host-based firewall on Windows Server 2003, you'll need to permit UDP and TCP port 53 on the DNS server. Then only allow incoming ports 1024-5000 from designated management stations that need to manage DNS remotely. You'll also need to open TCP 3389 to your management stations if you want to Remote Desktop into the DNS server. This would be the best interim solution to prevent your DNS server from being hacked and taken over. Even when the patch does become available, you should keep these hardened firewall settings as best practice. Note that if you're using your Active Directory Domain Controller for DNS, you'll need to follow these instructions to open more ports for the Domain Controller to function.

Microsoft also gives the option of using a registry modification, but that simply disables remote management completely. You can't specifically open up that capability to certain management stations. I wouldn't recommend the registry fix, because you don't have fine-grained control over it: Remote DNS management is either on or off. But if you're running Windows 2000 for DNS, your only choice is to implement that registry key, unless you want to install a third-party firewall (there is no host-based firewall in Windows 2000). If you don't want to use the firewalling method and you want to use the registry key, I have a REG file here for you to download. This does mean you won't be able to remotely manage DNS, but you can still do that locally on the console or you can do it via Remote Desktop.  Note that if you want to undo the registry change, you'll have to use regedit and delete the key called RpcProtocol located under HKEY_LOCAL_MACHINE, SYSTEM, CurrentControlSet, Services, DNS, and then Parameters.

George Ou is Technical Director of ZDNet. See his full profile and disclosure of his industry affiliations.

Related Discussions on TechRepublic

Did you know you can take part in these discussions with your ZDNet membership?

  • Talkback
  • Most Recent of 55 Talkback(s)
George: Here's another perfect example, this time in the same sentence
.
Here's another perfect example, this time in the same sentence:

"Firefox 2 crash exploit and IE7 address spoofing flaw surfaces" (1)

In this case, the "Firefox ... (Read the rest)
Posted by: TechExec2 Posted on: 04/25/07 You are currently: a Guest | | Terms of Use
Missing some good details..  Brandon Dixon | 04/13/07
I guess I figured it was more important to show people how to fix it  georgeou | 04/13/07
Bottom Line  rkuhn040172@... | 04/13/07
You shouldn't need a firewall to run a system securely  Resuna | 04/13/07
You're probably right, but...  John L. Ries | 04/13/07
Here we go again with the overreacting.  ye | 04/13/07
Speak for yourself buster!  bportlock | 04/13/07
This is *SUNS* way, not my way.  ye | 04/13/07
You mis-understand me...  bportlock | 04/13/07
It was done to show no OS is a panacea wrt security.  ye | 04/13/07
Read my post again....  bportlock | 04/13/07
Please re-read my post and point out where I said "You"  ye | 04/14/07
useful...  dmaynor | 04/13/07
Thanks for being so helpful! laugh  TechExec2 | 04/13/07
No, you're not reading that right  georgeou | 04/13/07
No. Microsoft's recommended countermeasures are a heavy burden  TechExec2 | 04/15/07
Zero-day RPC EXPLOIT in Microsoft DNS  TechExec2 | 04/13/07
Wow dude...  BFD | 04/13/07
So, you disagree? Windows is not the most unsafe OS?  TechExec2 | 04/13/07
interesting dilema  Badgered | 04/13/07
Yes and no laugh  TechExec2 | 04/13/07
Bad assumptions  georgeou | 04/13/07
I omitted discussion of...  TechExec2 | 04/13/07
No, I think you're driven by Microsoft hate  georgeou | 04/13/07
George: I'll admit my dislike for Microsoft is a motivation  TechExec2 | 04/14/07
George: Here's a perfect example  TechExec2 | 04/15/07
George: Here's another perfect example, this time in the same sentence  TechExec2 | 04/25/07
I agree.  DemonX | 04/13/07
WOW . . . troll  brian ansorge | 04/13/07
Really?  rkuhn040172@... | 04/13/07
I said "safe"  TechExec2 | 04/13/07
I have a bridge to sell you  tf2RI52WC873 | 04/13/07
Go Climb Back Into Your Socialist Hole  rkuhn040172@... | 04/14/07
Tech, it's getting harder to take you seriously  georgeou | 04/13/07
The same can be said about you Ou  dragosani | 04/13/07
The truth hurts, huh? NT  TechExec2 | 04/13/07
Lack of host-based firewall on Windows 2000  DevinAt3Sharp | 04/13/07
You're right, that's an option too  georgeou | 04/13/07
IPSec is basis of Firewalls, no?  brad@... | 04/13/07
That's the least privilege rule  georgeou | 04/13/07
Testing regkey work around  daevans315 | 04/13/07
O/T  bportlock | 04/13/07
Re: O/T  justanitguy | 04/13/07
Don't feed the trolls.  georgeou | 04/13/07
Couldn't help it  nucrash | 04/13/07
Troll?  bportlock | 04/13/07
Troll being not on subject  nucrash | 04/16/07
Linux has a registry?  nucrash | 04/13/07
Even if it does barf (which most of the time it doesn't)  Linux User 147560 | 04/16/07
Re: Re: O/T  bportlock | 04/13/07
Very interesting report, I'll check it out  georgeou | 04/13/07
I enjoy the Apple Commercials  wjkahlssmd@... | 04/14/07
I write Macrofaults  PhilippeV | 04/15/07
Fodder for the Fanboys  Marty R. Milette | 04/18/07
Talking around the problem doesn't change the simple fact...  TechExec2 | 04/19/07

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

Click Here
advertisement

Recent Entries

Top Rated

    advertisement

    Archives

    ZDNet Blogs

    White Papers, Webcasts, and Downloads

    SmartPlanet

    Click Here