skip to main content
10.1145/1455770.1455782acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

Robust defenses for cross-site request forgery

Published:27 October 2008Publication History

ABSTRACT

Cross-Site Request Forgery (CSRF) is a widely exploited web site vulnerability. In this paper, we present a new variation on CSRF attacks, login CSRF, in which the attacker forges a cross-site request to the login form, logging the victim into the honest web site as the attacker. The severity of a login CSRF vulnerability varies by site, but it can be as severe as a cross-site scripting vulnerability. We detail three major CSRF defense techniques and find shortcomings with each technique. Although the HTTP Referer header could provide an effective defense, our experimental observation of 283,945 advertisement impressions indicates that the header is widely blocked at the network layer due to privacy concerns. Our observations do suggest, however, that the header can be used today as a reliable CSRF defense over HTTPS, making it particularly well-suited for defending against login CSRF. For the long term, we propose that browsers implement the Origin header, which provides the security benefits of the Referer header while responding to privacy concerns.

References

  1. David Airey. Google's Gmail security failure leaves my business sabotaged, December 2007. http://www.davidairey.co.uk/google-gmail-security-hijack/.Google ScholarGoogle Scholar
  2. Robert Auger. The cross-site request forgery (CSRF/XSRF) FAQ, 2007. http://www.cgisecurity.com/articles/csrf-faq.shtml.Google ScholarGoogle Scholar
  3. Michael Barbaro and Tom Zeller Jr. A face is exposed for AOL searcher no. 4417749. The New York Times, August 2006. http://www.nytimes.com/2006/08/09/technology/09aol.htm.Google ScholarGoogle Scholar
  4. Adam Barth, Collin Jackson, and John C. Mitchell. Securing frame communication in browsers. In In Proceedings of the 17th USENIX Security Symposium (USENIX Security 2008), July 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Tim Berners-Lee, Roy Fielding, and Henrik Frystyk. Hypertext Transfer Protocol--HTTP/1.0. RFC 1945, May 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Douglas Crockford. JSONRequest, 2006. http://json.org/JSONRequest.html.Google ScholarGoogle Scholar
  7. Neil Daswani, Christoph Kern, and Anita Kesavan. Foundations of Security: What Every Programmer Needs to Know. Apress, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Rogan Dawes. Session Fixation, 2008. http://www.owasp.org/index.php/Session_Fixation_Protection.Google ScholarGoogle Scholar
  9. Rohit Dhamankar et al. Sans top-20 security risks, 2007. http://www.sans.org/top20/2007/.Google ScholarGoogle Scholar
  10. Rachna Dhamija, J. D. Tygar, and Marti Hearst. Why phishing works. In Proceedings of the Conference on Human Factors in Computing Systems (CHI), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. W. Felten, D. Balfanz, D. Dean, and D. S. Wallach. Web Spoofing: An Internet Con Game. In 20th National Information Systems Security Conference, October 1997.Google ScholarGoogle Scholar
  12. Brad Fitzpatrick, David Recordon, Dick Hardt, Johnny Bufu, Josh Hoyt, et al. OpenID authentication 2.0, December 2007. http://openid.net/specs/openid-authentication-2_0.html.Google ScholarGoogle Scholar
  13. Seth Fogie, Jeremiah Grossman, Robert Hansen, Anton Rager, and Petko D. Petkov. XSS Attacks: Cross Site Scripting Exploits and Defense. Syngress, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Mozilla Foundation. Security advisory 2005-58, September 2005. http://www.mozilla.org/security/announce/2005/mfsa2005-58.html.Google ScholarGoogle Scholar
  15. Google. Security for GWT Applications. http://groups.google.com/group/Google-Web-Toolkit/web/security-for-gwt-applications.Google ScholarGoogle Scholar
  16. Robert Hansen and Tom Stracener. Xploiting Google gadgets: Gmalware and beyond, August 2008. Black Hat briefing.Google ScholarGoogle Scholar
  17. Elliotte Rusty Harold. Privacy tip #3: Block Referer headers in Firefox, October 2006. http://cafe.elharo.com/privacy/privacy-tip-3-block-referer-headers-in-firefox/.Google ScholarGoogle Scholar
  18. Mario Heiderich. CSRFx, 2007. http://php-ids.org/category/csrfx/.Google ScholarGoogle Scholar
  19. Ian Hickson et al. Cross-document messaging. http://www.w3.org/html/wg/html5/#crossDocumentMessages.Google ScholarGoogle Scholar
  20. Ian Hickson et al. HTML 5 Working Draft. http://www.whatwg.org/specs/web-apps/current-work/.Google ScholarGoogle Scholar
  21. Dan Holevoet. Changes to inline gadgets, August 2008. http://igoogledeveloper.blogspot.com/2008/08/changes-to-inlined-gadgets.html.Google ScholarGoogle Scholar
  22. Collin Jackson. Defeating frame busting techniques, 2005. http://crypto.stanford.edu/framebust/.Google ScholarGoogle Scholar
  23. Collin Jackson and Adam Barth. ForceHTTPS: Protecting high-security web sites from network attacks. In Proceedings of the 17th International World Wide Web Conference (WWW), April 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Collin Jackson, Adam Barth, Andrew Bortz, Weidong Shao, and Dan Boneh. Protecting browsers from DNS rebinding attacks. In Proceedings of the 14th ACM Conference on Computer and Communications Security (CCS 2007), November 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Collin Jackson, Andrew Bortz, Dan Boneh, and John C. Mitchell. Protecting browser state from web privacy attacks. In Proceedings of the 15th International World Wide Web Conference (WWW), May 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Martin Johns and Justus Winter. RequestRodeo: Client side protection against session riding. In Proceedings of the OWASP Europe 2006 Conference, May 2006.Google ScholarGoogle Scholar
  27. Aaron Johnson. The Referer header, intranets and privacy, February 2007. http://cephas.net/blog/2007/02/06/the-referer-header-intranets-and-privacy/.Google ScholarGoogle Scholar
  28. Paul Johnston and Richard Moore. Multiple browser cookie injection vulnerabilities, September 2004. http://www.westpoint.ltd.uk/advisories/wp-04-0001.txt.Google ScholarGoogle Scholar
  29. Nenad Jovanovic, Engin Kirda, and Christopher Kruegel. Preventing cross site request forgery attacks. In IEEE International Conference on Security and Privacy in Communication Networks (SecureComm), 2006.Google ScholarGoogle ScholarCross RefCross Ref
  30. Chris Karlof, Umesh Shankar, J. D. Tygar, and David Wagner. Dynamic pharming attacks and locked same-origin policies for web browsers. In Proceedings of the 14th ACM Conference on Computer and Communications Security (CCS 2007), November 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Amit Klein. Exploiting the XMLHttpRequest object in IE--Referrer spoofing and a lot morełdots, September 2005. http://www.cgisecurity.com/lib/XmlHTTPRequest.shtml.Google ScholarGoogle Scholar
  32. Peter-Paul Koch. Frame busting. http://www.quirksmode.org/js/framebust.html.Google ScholarGoogle Scholar
  33. David Kristol and Lou Montulli. HTTP State Management Mechanism. RFC 2965, October 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. David Kristol and Lou Montulli. HTTP State Management Mechanism. RFC 2109, February 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. V. T. Lam, Spiros Antonatos, P. Akritidis, and Kostas G. Anagnostakis. Puppetnets: Misusing web browsers as a distributed attack infrastructure. In Proceedings of the 13th ACM Conference on Computer and Communication Security (CCS), October 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. PHP Manual. Session handling functions. http://www.phpbuilder.com/manual/en/ref.session.php.Google ScholarGoogle Scholar
  37. Chris Masone, Kwang-Hyun Baek, and Sean Smith. WSKE: Web server key enabled cookies. In Proceedings of Usable Security 2007 (USEC '07). Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Microsoft. XDomainRequest object. http://msdn2.microsoft.com/en-us/library/cc288060(VS.85).aspx.Google ScholarGoogle Scholar
  39. Netscape. Persistent client state: HTTP cookies. http://wp.netscape.com/newsref/std/cookie_spec.html.Google ScholarGoogle Scholar
  40. Greg Pass, Abdur Chowdhury, and Cayley Torgeson. A picture of search. In InfoScale '06: Proceedings of the 1st International Conference on Scalable Information Systems, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Petko D. Petkov. Google Gmail e-mail hijack technique, September 2007. http://www.gnucitizen.org/blog/google-gmail-e-mail-hijack-technique/.Google ScholarGoogle Scholar
  42. Yngve Pettersen. HTTP state management mechanism v2. IETF Internet Draft, February 2008. http://www.ietf.org/internet-drafts/draft-pettersen-cookie-v2-02.txt.Google ScholarGoogle Scholar
  43. phpBB. http://phpbb.com/.Google ScholarGoogle Scholar
  44. Prototype JavaScript framework. http://www.prototypejs.org/.Google ScholarGoogle Scholar
  45. Ruby on rails. http://www.rubyonrails.org/.Google ScholarGoogle Scholar
  46. Secunia. Microsoft Internet Explorer "XMLHTTP" HTTP request injection, September 2005. http://secunia.com/advisories/16942/.Google ScholarGoogle Scholar
  47. Eric Sheridan. OWASP CSRFGuard Project, 2008. http://www.owasp.org/index.php/CSRF_Guard.Google ScholarGoogle Scholar
  48. Trac. http://trac.edgewall.org/.Google ScholarGoogle Scholar
  49. Anne van Kesteren et al. Access control for cross-site requests. http://www.w3.org/TR/access-control/.Google ScholarGoogle Scholar
  50. Luis von Ahn, Nick Hopper Manuel Blum, and John Langford. CAPTCHA: Using hard AI problems for security. In Eurocrypt 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Weilin Zhong. Session Fixation, 2008. http://www.owasp.org/index.php/Session_Fixation.Google ScholarGoogle Scholar

Index Terms

  1. Robust defenses for cross-site request forgery

      Recommendations

      Reviews

      Zheng Gong

      Cross-site attacks are widely used to exploit Web site vulnerability. Barth, Jackson, and Mitchell present in this paper a detailed description of cross-site request forgery (CSRF), a specific kind of cross-site attack. CSRF allows the attacker to forge a valid request to a Web site by redirecting the user. The authors also discuss the existing defenses against CSRF and suggest "modifying browsers to send an origin header with POST requests that identifies the [source] that initiated the request." The paper is well written and the references are up to date. The paper should be valuable to professionals in the Internet security area. Online Computing Reviews Service

      Access critical reviews of Computing literature here

      Become a reviewer for Computing Reviews.

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Conferences
        CCS '08: Proceedings of the 15th ACM conference on Computer and communications security
        October 2008
        590 pages
        ISBN:9781595938107
        DOI:10.1145/1455770
        • General Chair:
        • Peng Ning,
        • Program Chairs:
        • Paul Syverson,
        • Somesh Jha

        Copyright © 2008 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 27 October 2008

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        CCS '08 Paper Acceptance Rate51of280submissions,18%Overall Acceptance Rate1,261of6,999submissions,18%

        Upcoming Conference

        CCS '24
        ACM SIGSAC Conference on Computer and Communications Security
        October 14 - 18, 2024
        Salt Lake City , UT , USA

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader