Home > Security Tips > Web Security Advisor > DNS rebinding defenses still necessary, thanks to Web 2.0
Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEB SECURITY ADVISOR

DNS rebinding defenses still necessary, thanks to Web 2.0


Ken Harthun, Contributor
07.10.2008
Rating: -4.57- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


DNS rebinding attacks, also known as anti-DNS pinning attacks, have been around for at least a decade, but they were virtually forgotten until recently. The attacks are an exploit in which a hacker uses JavaScript on a malicious Web page to gain control of the victim's router.

Normally attack methods evolve in cat-and-mouse fashion...With DNS rebinding, however, the balance has shifted in favor of the attack method.
Ken Harthun
Contributor
A user, for example, could be tricked into visiting an attacker's website. If a default router password is detected, the hacker's JavaScript code could cause the user's browser to change details on the router administration page. Those alterations then might allow the attacker to control the device remotely, and as a result, control the owner's Internet communications. Attackers could also use DNS rebinding attacks to access a network's sensitive data or send spam through the connection.

The advent of Web 2.0 technology and its use of browser plug-ins to provide ever increasing functionality on the Web, has introduced vulnerabilities that once again make DNS rebinding a viable attack. Normally attack methods evolve in cat-and-mouse fashion; as the sophistication of attacks increase, application code is hardened in response. With DNS rebinding, however, the balance has shifted in favor of the attack method.

The emergence of multi-pin vulnerabilities
The original security precaution for this type of attack is DNS pinning, a browser security mechanism that caches a hostname to its associated IP address until the browser window closes, ultimately tying a single IP address to a single domain. The function worked well enough before the advanced Internet technology of Web 2.0, but it's no longer a viable solution. This is because today, XML, JavaScript, Java plug-ins and Flash applications, all of which run inside the browser, are capable of doing their own DNS lookups and making their own socket-level network connections. Each socket has its own origin -- the browser may have an origin on the local network, and the script may have an origin on another network.

Modern browsers implement what's called the same-origin policy, a security feature that attempts to isolate distinct "origins," protecting sites from each other. But the same-origin policy can be subverted by confusing the browser into grouping network resources controlled by distinct entities. The plug-ins and the browser maintain their own DNS pin databases, and this is what the attacker exploits, thus creating a new class of vulnerabilities known as multi-pin vulnerabilities. Essentially, the local network is made to appear to be the same as the attacker's network to the browser; in effect, the attacker has created an open proxy and has access to the local LAN.

Here's how someone can take advantage of these vulnerabilities, according to a Stanford University report on DNS rebinding attacks:

An attacker exploits the interaction between the browser and a Java or Flash plug-in. The hacker then pins the browser to one IP address while pinning Java or Flash to another IP address, usually on the internal network. The result allows an attacker to read and write data directly on sockets to a host and port of the attacker's choice, all under the security context of the compromised machine's user account.

An attacker can mount a number of different attacks using the DNS rebinding vulnerabilities. Some of these will require direct socket access, such as that afforded by Flash Player and Java; others require only the ability to read HTTP responses from the target. Depending upon the attacker's goal, the Princeton report breaks the attacks into two broad categories:

1. Firewall circumvention -- Machines behind the firewall, such as a corporate intranet server, are not normally accessible to the Internet. DNS rebinding allows an attacker to bypass the firewall and gain access to these machines. Using direct socket access, the attacker can also interact with other services that are only available on the internal network, over and above HTTP. For example, if FTP is available internally, the attacker can gain access to this service and upload sensitive information to his own servers. Using this attack, criminals could target a financial institution, such as a credit card company, get account information, upload it, and sell it to the highest bidder for use by identity thieves.

2. IP hijacking -- In this case, the attacker will be able to access publicly available servers from the client's IP address, thus taking advantage of the target's trust in the client's IP address. For example, an IT consultant's client's firewall can be configured to accept remote management connections only from the IP range of the consultant's network (a security feature that my own firm uses). If an attacker hijacks an IP address in that range, he would have remote access to any of the consultant's clients' firewalls and routers. Having previously succeeded with a firewall circumvention attack against the consultant, the attacker may have discovered the login details to the bank's remote management interfaces -- a major disaster in the making. The attacker could then add his IP address to the access control lists and direct traffic to his servers and websites.

DNS rebinding defenses
At least three defenses are currently effective against these attacks. (As research on this attack continues, additional defenses are likely to develop.) The first is to block the resolution of external names into internal addresses. OpenDNS, a San Francisco-based company that provides a free DNS service designed to help companies avoid malicious websites, which provides a simple strategy. According to CEO David Ulevitch, an enterprise can get protection by using OpenDNS servers in its network configuration and setting its DNS servers to 208.67.222.222 and 208.67.220.220. This OpenDNS filter aims to protect and block users from malicious DNS responses, ones that resolve to a host inside of your network.

For more from the author

Read Ken's Security Corner Blog on ITKnowledgeExchange, and learn more basic tips that can help prevent DNS rebinding attacks.
A corporate network would normally use internal DNS server addresses, but it's a simple matter to point the DNS forwarders to OpenDNS, or configure the gateway to block addresses that resolve to local network computers. To that end, OpenDNS and other providers offer Dnswall, a daemon that filters out private IP addresses in DNS responses. It's designed to be used in conjunction with an existing recursive DNS resolver in order to protect networks against DNS rebinding attacks. Dnswall prevents external names from resolving to internal addresses.

The second method is to block execution of all browser scripts unless they are approved. In Internet Explorer, this is done by disabling active scripting. Firefox users have a much more elegant solution in the form of a browser extension: NoScript. The extension only allows execution of scripted content and plug-ins by user permitted websites.

Finally, of course, change the default password on routers, switches and any other configurable device on the network. Where possible, run in a user account with the minimum privileges that allows you to get your work done. DNS rebinding could be a serious threat to your network security, but one that is easily prevented by implementing some simple security measures.

About the author:
Ken Harthun is a systems engineer at Connective Computing Inc., specializing in network and desktop security for small and medium businesses. He has been working with computers since 1973 and advocating sensible security practices since 1989 when one of his employees infected a company computer with the Stoned virus. He quickly isolated the infected diskette and implemented strict security policies to prevent future infections. Ken is currently working on his first consumer-oriented book on computer security.


Rate this Tip
To rate tips, you must be a member of SearchSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




BROWSE BY TAG
Web Security Advisor,   Emerging Information Security Threats,   Network Security: Tools, Products, Software,   Network Firewalls, Routers and Switches,   Enterprise Network Security,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Web Security Advisor
New defenses for automated SQL injection attacks
PCI compliance and Web applications: Code review or firewalls?
Worst practices: Bad security incidents to avoid
Web scanning and reporting best practices
Social networking Web site threats manageable with good enterprise policy
Enterprise security in 2008: Building trust into the application development process
PCI DSS Section 6: A plan for tackling application security
Making the case for Web application vulnerability scanners
Preparing for uniform resource identifier (URI) exploits
How to avoid dangling pointers: Tiny programming errors leave serious security vulnerabilities

Emerging Information Security Threats
Hackers to sharpen malware, malicious software in 2010
Modern malware, stealthy botnets, adapt quickly, expert says
New ransomware Trojan pushes victims to buy software
Bruce Schneier on outsourcing, awareness training
US-CERT warns of BlackBerry snooping software
Marcus Ranum on cyberwarfare, infosec careers
Researchers find thousands of flawed embedded devices
Enterprise botnets contain thousands of malware variants
Nuke and pave to eradicate botnets
Rand study urges caution on cyberwarfare attacks

Network Firewalls, Routers and Switches
How to prepare for a secure network hardware upgrade
Best Network Firewall Products
What is the difference between static and dynamic network validation?
Screencast: Smoothwall offers firewall defense in lean times
New Cisco IOS bugs pose tempting targets, says Black Hat researcher
How to implement virtual firewalls in a complex network infrastructure
How to manage network bandwidth with distributed ISP bandwidth
Firewall rule management best practices
Should enterprises be running multiple firewalls?
What are the disadvantages of proxy-based firewalls?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
DNS rebinding attack  (SearchSecurity.com)
drive-by pharming  (SearchSecurity.com)
JavaScript hijacking  (SearchSecurity.com)
man in the browser  (SearchSecurity.com)
phlashing  (SearchSecurity.com)
polymorphic malware  (SearchSecurity.com)
pulsing zombie  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Research Solutions for Network Security, Access Control and Security Threats
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts