SlideShare a Scribd company logo
Protecting Browsers from DNS
Rebinding Attacks
Collin Jackson , Adam Barth, Andrew Bortz,
Weidong Shao, Dan Boneh



Felipe Mattosinho
Outline


 Introduction
 How DNS Rebinding Works
 DNS Rebinding Vulnerabilities
 Attacks using DNS Rebinding
 Defenses Against Rebinding
 Related Work
Introduction
Browsers and DNS Caching


 Why Browsers cache the DNS?
 Different browsers have different policies mechanism to
 cache. E.g : Firefox, Safari, Internet Explorer
 TTL hold the valid time of a dns entry
 Browsers „should“ cache until TTL expires
Introduction
Browsers Same Origin Policy

 Browser attempts to stop client-side script from different origin
 The policy applies to network access and browser state such as the DOM
 interface, cookies, cache, history, and the password database
 Same origin means same protocol, domain name and port number
 Examples:




                         Wikipedia, http://en.wikipedia.org/wiki/Same_origin_policy
Introduction
Browsers Same Origin Policy

  Access Within same origin: Plug-ins such as Flash Player
  and Java can access network sockets directly.
  Access between different origins: Flash Player permits its
  movies to read back HTTP responses with a XML policy.
  Prohibited Access:


  Internet Explorer 7:        Firefox 2:              Safari 2:
  FTP 21 , SMTP 25,           FTP 21 , SMTP 25,       Ports are not
  POP3 110, NNTP 119          POP3 110, NNTP 119      blocked
  IMAP 143                    IMAP 143
                              + 51 additional ports
How DNS Rebinding Works
      Bob                             www.SE-ROCKS.com




                                           Win a car


                                                       www.badguy.com
                      ISP




                Malicious
                Javascript   www.badguy.com :
                             IP: 1.2.3.4 TTL 2s
        Alice
How DNS Rebinding Works
      Bob IP: 10.1.1.2




           Javascript
        // Reconnect to
       www.badguy.com
            after 2s




                            www.badguy.com
                              : IP 10.1.1.3
       Alice IP: 10.1.1.3
DNS Rebinding Vulnerabilities
Standard Rebinding Vulnerabilities

 Multiple A Records

    Multiple IP Address resolves to the same host.
    In 1996, the first attack aimed to confuse the security policy of the JVM.
    A Java applet, connects target and attacker web server.


 Time-Varying DNS
    In 2001, the original attack on Java was extended, this time using JavaScript.
    www.badguy.com is bound to a very short TTL.
    After rebinding www.badguy.com to the target IP Address, the XMLHttpRequest object
    connects to www.badguy.com that resolves to the target’s server.
DNS Rebinding Vulnerabilities
Standard Rebinding Vulnerabilities


 Pinning in Current Browsers

  Browser pins host name to IP Address.
  Internet Explorer 7, binds a host to an IP for 30 minutes by default. With Multiple A
  records, the browser can try different IP addresses within 1 sec.
  Internet Explorer 6 also pins for 30 minutes. The pin can be easily released with the
  following html command <img src:http://badguy.com:81/>
  FireFox 1.5 and 2 caches DNS entries between 60 to 120 seconds
  Opera 9 has the same behavior as Internet Explorer 6, however holds a pin for 12
  minutes.
  Safari 2 pins DNS bindings for 1 second.
DNS Rebinding Vulnerabilities
Standard Rebinding Vulnerabilities


 Flash Player 9


   Flash player is installed on 55.8% of web browsers( as of December 2006), according to
   Adobe. The experiments however showed 86.9%.
   Flash opens a port less then 1024 with www.badguy.com. Then flash automatically
   sends <policy-file-request />. The attacker will respond with the following XML:




                   [JBB+07]
Attacks using DNS Rebinding
Attacks

 Firewall Circumvention

    Spidering the Intranet
    Compromising unpatched machines
    Abusing internal open services


 IP Hijacking
    Committing Click Fraud
    Sending Spam
    Defeating IP-based Authentication
    Framing clients
Attacks using DNS Rebinding
Experiment: Recruiting Browsers


    DNS Rebinding was tested running a Flash Player 9 advertisement

    Two machines ran during three successive nights.

    The attacker ran:
    1. A custom authoritative DNS server
    2. A custom Flash player policy server
    3. An Apache Web server hosting the advertisement

    The target ran an Apache Server to log successful attacks
Attacks using DNS Rebinding
Experiment: Recruiting Browsers


    The attack needed no user click

    The attack results:




       [JBB+07]


                                      [JBB+07]
Attacks using DNS Rebinding
Experiment: Recruiting Browsers


    Relevant numbers about the attack:

    1. 50,951 impressions from 44,924 unique IP address were acquired
    (40.2% IE7,32.3% IE6, 23.5% Firefox, 4% Other).
    2. The rebinding experiment ran on the 44,301(86.9%) impressions
    that reported Flash Player 9.
    3. The experiment was successful on 30,636(60.1%) impressions and
    27,840 unique IP addresses.
    4. The attack was less successfull on Mac Os.
Defenses Against Rebinding
Fixing Firewall Circumvention

 Enterprise
    Blocking outbound traffic on port 53, a DNS server can be configured to not bound
    external names to internal IP Addresses.
    Use of dnswall to enforce policy.

 Consumer

    Consumer firewalls already expose a caching DNS resolver and can be augmented
    with dnswall.

 Software

    E.g. : Windows Firewall can block DNS resolutions to 127.*.*.*, protecting services that
    bind to the loopback interface.
Defenses Against Rebinding
Fixing Plug-ins

 Flash Player
    A policy based only if obtained for the same IP address and same host name.
    Requesting policy before opening sockets to any port.
 Java
    The connect method is used to obtain a proxied socket connection to an external
    machine

 Java LiveConnect

    Removing multi-pin vulnerabilities by using the same cache as the browser.
Defenses Against Rebinding
Fixing Browsers (Default-Deny Sockets)

 Checking Host Header

    Accepting only expected Host headers.



 Finer-grained Origins
   Refine origin by adding information such as the server IP address or a public key.
   IP Addresses: It is robust however some applications may fail such as Gmail.
   Public Keys: Can lead to a problem that two HTTPS pages served from the same
   domain to read each other’s state.
Defenses Against Rebinding
Fixing Browsers (Default-Deny Sockets)




 Smarter Pinning

    Robustness X Security
    Extending the width of pins. E.g. An IP 171.64.78.10 to 171.64.78.
    The developers of the NoScript for Firefox are planning this pinning heuristic
Defenses Against Rebinding
Fixing Browsers(Default-Deny Sockets)

 Policy-based Pinning

    Browsers consult server-supplied policies to determine when it is safe to re-pin.

 Pinning Pitfalls
    Common Pin Database: Sharing the same database
    Cache:Browser’s cache and all plug-in caches must be modified to prevent rebinding
    attacks.
    Document.domain
Defenses Against Rebinding
Fixing Browsers(Default-Allow Sockets)

 Host Name Authorization

    „Honest Machines“ do not advertise host name controlled by attackers.




                                            [JBB+07]
   Policy mechanism steps:
   1. Resolve the host name auth.ip.in-addr.arpa
   2. Does the host name exists?
   3. If IP is policy-enabled resolve the host name www.example.com.auth.ip.in-
   addr.arpa
   4. Determine if the host name is authorized
Related Work

Using Browsers as Bots

  Can be used for distributed denial of service attack

Sender Policy Framework

  Stores policy information in DNS
References

                           [1] Adobe. Adobe Player Penetration.
                           http://www.adobe.com/products/player_census/flashplayer
                           [2] Dan Kaminisky.Black ops 2007, designing reviewing the
                           web. PowerPoint.
                           www.doxpara.com/slides/DMK_BO2K7_Web.ppt
                           [3] Wikipedia
                           http://en.wikipedia.org/wiki/Domain_Name_System
                           [4] Google Safe Browsing for Firefox, 2005
                           http://www.google.com/tools/firefox/safebrowsing
                           [5] J. Ruderman. JavaScript Security:Same origin.
                           http://www.mozilla.org/projects/security/components/same-
                           origin.html
Supervisor: Gert Pfeifer   [6]D. Ross Notes on DNS pinning
                           http://blogs.msdn.com/dross/archive/2007/07/09/notes-on-
                           dns.pinning.aspx, 2007
THANK YOU!

QUESTIONS?!

More Related Content

PPTX
Distributed Immutable Ephemeral - New Paradigms for the Next Era of Security
PDF
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
PDF
Cybersecurity Powerpoint Presentation Slides
PPTX
OWASP SB -Threat modeling 101
PDF
Sql Injection and XSS
PPTX
Cybersecurity Metrics: Reporting to BoD
PDF
SOC 2: Build Trust and Confidence
PDF
C# Game Server
Distributed Immutable Ephemeral - New Paradigms for the Next Era of Security
Weaponizing Recon - Smashing Applications for Security Vulnerabilities & Profits
Cybersecurity Powerpoint Presentation Slides
OWASP SB -Threat modeling 101
Sql Injection and XSS
Cybersecurity Metrics: Reporting to BoD
SOC 2: Build Trust and Confidence
C# Game Server

What's hot (20)

PDF
Sql Injection - Vulnerability and Security
PDF
Comprehensive plans are in place to improve our institutional cyber security
PPTX
Reverse proxies & Inconsistency
PDF
Introduction to Linux Privilege Escalation Methods
PPT
2010 02 09 Ms Tech Days Owasp Asvs Sgi V01
PPTX
Cloud slide
PDF
Cyber Domain Security
PPTX
Sql injection
PPT
Encryption technology
PPTX
Introduction ethical hacking
PDF
Lie to Me: Bypassing Modern Web Application Firewalls
PPT
Cyber Security-Foundation.ppt
PDF
NIST Cyber Security Framework V1.1 - Infogram Poster
PPT
Network Security 1st Lecture
PPTX
Encryption
PPTX
Stuxnet worm
PDF
Advanced Wi-Fi pentesting
DOCX
Unit 2_Blacklisting & Whitelisting User Input in Python.docx
PDF
Secure by Design - Security Design Principles for the Rest of Us
PPTX
Introduction To Vulnerability Assessment & Penetration Testing
Sql Injection - Vulnerability and Security
Comprehensive plans are in place to improve our institutional cyber security
Reverse proxies & Inconsistency
Introduction to Linux Privilege Escalation Methods
2010 02 09 Ms Tech Days Owasp Asvs Sgi V01
Cloud slide
Cyber Domain Security
Sql injection
Encryption technology
Introduction ethical hacking
Lie to Me: Bypassing Modern Web Application Firewalls
Cyber Security-Foundation.ppt
NIST Cyber Security Framework V1.1 - Infogram Poster
Network Security 1st Lecture
Encryption
Stuxnet worm
Advanced Wi-Fi pentesting
Unit 2_Blacklisting & Whitelisting User Input in Python.docx
Secure by Design - Security Design Principles for the Rest of Us
Introduction To Vulnerability Assessment & Penetration Testing
Ad

Similar to DNS Rebinding Attack (20)

DOCX
Protecting Browsers from DNS Rebinding AttacksCollin Jacks.docx
PPT
Dmk Bo2 K7 Web
PPT
Design Reviewing The Web
PPT
Dmk bo2 k7_web
PPT
Zombilizing The Web Browser Via Flash Player 9
PDF
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
PDF
Network and DNS Vulnerabilities
PPT
Dmk bo2 k8_bh_fed
PDF
There's no place like 127.0.0.1 - Achieving "reliable" DNS rebinding in moder...
PDF
Active Https Cookie Stealing
PPS
Aditya - Hacking Client Side Insecurities - ClubHack2008
PDF
Xfocus xcon 2008_aks_oknock
ZIP
DNS Cache Poisoning
PDF
OSINT for Attack and Defense
PDF
Computer network (2)
PDF
Hitbkl 2012
 
PPTX
Infoblox - turning DNS from security target to security tool
PDF
NotaCon 2011 - Networking for Pentesters
PDF
Day 2 Dns Cert 4a Cache Poisoning
PDF
08 tcp-dns
Protecting Browsers from DNS Rebinding AttacksCollin Jacks.docx
Dmk Bo2 K7 Web
Design Reviewing The Web
Dmk bo2 k7_web
Zombilizing The Web Browser Via Flash Player 9
DEF CON 27 - GERALD DOUSSOT AND ROGER MEYER - state of dns rebinding attack ...
Network and DNS Vulnerabilities
Dmk bo2 k8_bh_fed
There's no place like 127.0.0.1 - Achieving "reliable" DNS rebinding in moder...
Active Https Cookie Stealing
Aditya - Hacking Client Side Insecurities - ClubHack2008
Xfocus xcon 2008_aks_oknock
DNS Cache Poisoning
OSINT for Attack and Defense
Computer network (2)
Hitbkl 2012
 
Infoblox - turning DNS from security target to security tool
NotaCon 2011 - Networking for Pentesters
Day 2 Dns Cert 4a Cache Poisoning
08 tcp-dns
Ad

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
Teaching material agriculture food technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
Spectroscopy.pptx food analysis technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MIND Revenue Release Quarter 2 2025 Press Release
Teaching material agriculture food technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Unlocking AI with Model Context Protocol (MCP)
Review of recent advances in non-invasive hemoglobin estimation
Chapter 3 Spatial Domain Image Processing.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

DNS Rebinding Attack

  • 1. Protecting Browsers from DNS Rebinding Attacks Collin Jackson , Adam Barth, Andrew Bortz, Weidong Shao, Dan Boneh Felipe Mattosinho
  • 2. Outline Introduction How DNS Rebinding Works DNS Rebinding Vulnerabilities Attacks using DNS Rebinding Defenses Against Rebinding Related Work
  • 3. Introduction Browsers and DNS Caching Why Browsers cache the DNS? Different browsers have different policies mechanism to cache. E.g : Firefox, Safari, Internet Explorer TTL hold the valid time of a dns entry Browsers „should“ cache until TTL expires
  • 4. Introduction Browsers Same Origin Policy Browser attempts to stop client-side script from different origin The policy applies to network access and browser state such as the DOM interface, cookies, cache, history, and the password database Same origin means same protocol, domain name and port number Examples: Wikipedia, http://en.wikipedia.org/wiki/Same_origin_policy
  • 5. Introduction Browsers Same Origin Policy Access Within same origin: Plug-ins such as Flash Player and Java can access network sockets directly. Access between different origins: Flash Player permits its movies to read back HTTP responses with a XML policy. Prohibited Access: Internet Explorer 7: Firefox 2: Safari 2: FTP 21 , SMTP 25, FTP 21 , SMTP 25, Ports are not POP3 110, NNTP 119 POP3 110, NNTP 119 blocked IMAP 143 IMAP 143 + 51 additional ports
  • 6. How DNS Rebinding Works Bob www.SE-ROCKS.com Win a car www.badguy.com ISP Malicious Javascript www.badguy.com : IP: 1.2.3.4 TTL 2s Alice
  • 7. How DNS Rebinding Works Bob IP: 10.1.1.2 Javascript // Reconnect to www.badguy.com after 2s www.badguy.com : IP 10.1.1.3 Alice IP: 10.1.1.3
  • 8. DNS Rebinding Vulnerabilities Standard Rebinding Vulnerabilities Multiple A Records Multiple IP Address resolves to the same host. In 1996, the first attack aimed to confuse the security policy of the JVM. A Java applet, connects target and attacker web server. Time-Varying DNS In 2001, the original attack on Java was extended, this time using JavaScript. www.badguy.com is bound to a very short TTL. After rebinding www.badguy.com to the target IP Address, the XMLHttpRequest object connects to www.badguy.com that resolves to the target’s server.
  • 9. DNS Rebinding Vulnerabilities Standard Rebinding Vulnerabilities Pinning in Current Browsers Browser pins host name to IP Address. Internet Explorer 7, binds a host to an IP for 30 minutes by default. With Multiple A records, the browser can try different IP addresses within 1 sec. Internet Explorer 6 also pins for 30 minutes. The pin can be easily released with the following html command <img src:http://badguy.com:81/> FireFox 1.5 and 2 caches DNS entries between 60 to 120 seconds Opera 9 has the same behavior as Internet Explorer 6, however holds a pin for 12 minutes. Safari 2 pins DNS bindings for 1 second.
  • 10. DNS Rebinding Vulnerabilities Standard Rebinding Vulnerabilities Flash Player 9 Flash player is installed on 55.8% of web browsers( as of December 2006), according to Adobe. The experiments however showed 86.9%. Flash opens a port less then 1024 with www.badguy.com. Then flash automatically sends <policy-file-request />. The attacker will respond with the following XML: [JBB+07]
  • 11. Attacks using DNS Rebinding Attacks Firewall Circumvention Spidering the Intranet Compromising unpatched machines Abusing internal open services IP Hijacking Committing Click Fraud Sending Spam Defeating IP-based Authentication Framing clients
  • 12. Attacks using DNS Rebinding Experiment: Recruiting Browsers DNS Rebinding was tested running a Flash Player 9 advertisement Two machines ran during three successive nights. The attacker ran: 1. A custom authoritative DNS server 2. A custom Flash player policy server 3. An Apache Web server hosting the advertisement The target ran an Apache Server to log successful attacks
  • 13. Attacks using DNS Rebinding Experiment: Recruiting Browsers The attack needed no user click The attack results: [JBB+07] [JBB+07]
  • 14. Attacks using DNS Rebinding Experiment: Recruiting Browsers Relevant numbers about the attack: 1. 50,951 impressions from 44,924 unique IP address were acquired (40.2% IE7,32.3% IE6, 23.5% Firefox, 4% Other). 2. The rebinding experiment ran on the 44,301(86.9%) impressions that reported Flash Player 9. 3. The experiment was successful on 30,636(60.1%) impressions and 27,840 unique IP addresses. 4. The attack was less successfull on Mac Os.
  • 15. Defenses Against Rebinding Fixing Firewall Circumvention Enterprise Blocking outbound traffic on port 53, a DNS server can be configured to not bound external names to internal IP Addresses. Use of dnswall to enforce policy. Consumer Consumer firewalls already expose a caching DNS resolver and can be augmented with dnswall. Software E.g. : Windows Firewall can block DNS resolutions to 127.*.*.*, protecting services that bind to the loopback interface.
  • 16. Defenses Against Rebinding Fixing Plug-ins Flash Player A policy based only if obtained for the same IP address and same host name. Requesting policy before opening sockets to any port. Java The connect method is used to obtain a proxied socket connection to an external machine Java LiveConnect Removing multi-pin vulnerabilities by using the same cache as the browser.
  • 17. Defenses Against Rebinding Fixing Browsers (Default-Deny Sockets) Checking Host Header Accepting only expected Host headers. Finer-grained Origins Refine origin by adding information such as the server IP address or a public key. IP Addresses: It is robust however some applications may fail such as Gmail. Public Keys: Can lead to a problem that two HTTPS pages served from the same domain to read each other’s state.
  • 18. Defenses Against Rebinding Fixing Browsers (Default-Deny Sockets) Smarter Pinning Robustness X Security Extending the width of pins. E.g. An IP 171.64.78.10 to 171.64.78. The developers of the NoScript for Firefox are planning this pinning heuristic
  • 19. Defenses Against Rebinding Fixing Browsers(Default-Deny Sockets) Policy-based Pinning Browsers consult server-supplied policies to determine when it is safe to re-pin. Pinning Pitfalls Common Pin Database: Sharing the same database Cache:Browser’s cache and all plug-in caches must be modified to prevent rebinding attacks. Document.domain
  • 20. Defenses Against Rebinding Fixing Browsers(Default-Allow Sockets) Host Name Authorization „Honest Machines“ do not advertise host name controlled by attackers. [JBB+07] Policy mechanism steps: 1. Resolve the host name auth.ip.in-addr.arpa 2. Does the host name exists? 3. If IP is policy-enabled resolve the host name www.example.com.auth.ip.in- addr.arpa 4. Determine if the host name is authorized
  • 21. Related Work Using Browsers as Bots Can be used for distributed denial of service attack Sender Policy Framework Stores policy information in DNS
  • 22. References [1] Adobe. Adobe Player Penetration. http://www.adobe.com/products/player_census/flashplayer [2] Dan Kaminisky.Black ops 2007, designing reviewing the web. PowerPoint. www.doxpara.com/slides/DMK_BO2K7_Web.ppt [3] Wikipedia http://en.wikipedia.org/wiki/Domain_Name_System [4] Google Safe Browsing for Firefox, 2005 http://www.google.com/tools/firefox/safebrowsing [5] J. Ruderman. JavaScript Security:Same origin. http://www.mozilla.org/projects/security/components/same- origin.html Supervisor: Gert Pfeifer [6]D. Ross Notes on DNS pinning http://blogs.msdn.com/dross/archive/2007/07/09/notes-on- dns.pinning.aspx, 2007