skip to main content
10.1145/1255329.1255346acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Using web application construction frameworks to protect against code injection attacks

Published:14 June 2007Publication History

ABSTRACT

In recent years, the security landscape has changed, with Web applications vulnerabilities becoming more prominent that vulnerabilities stemming from the lack of type safety, such as buffer overruns. Many reports point to code injection attacks such as cross-site scripting and RSS injection as being the most common attacks against Web applications to date. With Web 2.0 existing security problems are further exacerbated by the advent of Ajax technology that allows one to create and compose HTML content from different sources within the browser at runtime, as exemplified by customizable mashup pages like My Yahoo! or Live.com

This paper proposes a simple to support, yet a powerful scheme for eliminating a wide range of script injection vulnerabilities in applications built on top of popular Ajax development frameworks such as the Dojo Toolkit, prototype.js, and AJAX.NET. Unlike other client-side runtime enforcement proposals, the approach we are advocating requires only minor browser modifications. This is because our proposal can be viewed as a natural finer-grained extension of the same-origin policy for JavaScript already supported by the majority of mainstream browsers, in which we treat individual user interface widgets as belonging to separate domains

Fortunately, in many cases no changes to the development process need to take place: for applications that are built on top of frameworks described above, a slight framework modification will result in appropriate changes in the generated HTML, completely obviating the need for manual code annotation. In this paper we demonstrate how these changes can prevent cross-site scripting and RSS injection attacks using the Dojo Toolkit, a popular Ajax library, as an example.

References

  1. Robert Auger. Feed injection in Web 2.0. www.spidynamics.com/assets/documents/HackingFeeds.pdf, 2006.Google ScholarGoogle Scholar
  2. Thomas Ball, Ella Bounimova, Byron Cook, Vladimir Levin, Jakob Lichtenberg, Con McGarvey, Bohus Ondrusek, Sriram K. Rajamani, and Abdullah Ustuner. Thorough static analysis of device drivers. In Proceedings of the European Systems Conference, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. CGI Security. The cross-site scripting FAQ. http://www.cgisecurity.net/articles/xss-faq.shtml.Google ScholarGoogle Scholar
  4. Eric Chien. Malicious Yahooligans. http://www.symantec.com/avcenter/reference/malicious.yahooligans.pdf, August 2006.Google ScholarGoogle Scholar
  5. Dojo Foundation. Dojo, the JavaScript toolkit. http://dojotoolkit.org, 2007.Google ScholarGoogle Scholar
  6. Úlfar Erlingsson, Benjamin Livshits, and Yinglian Xie. End-to-end Web application security. In Proceedings of the Workshop on Hot Topics in Operating Systems, May 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Úlfar Erlingsson and Fred B. Schneider. IRM enforcement of Java stack inspection. In IEEE Symposium on Security and Privacy, pages 246--255, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Steven Garrity. Private RSS feeds: Support for security in aggregators. http://labs.silverorange.com/archives/2003/july/privaterss, July 2003.Google ScholarGoogle Scholar
  9. Google Web toolkit. http://code.google.com/webtoolkit.Google ScholarGoogle Scholar
  10. Jeremiah Grossman. Cross-site scripting worms and viruses: the impending threat and the best defense. http://www.whitehatsec.com/downloads/WHXSSThreats.pdf, April 2006.Google ScholarGoogle Scholar
  11. Vivek Haldar, Deepak Chandra, and Michael Franz. Dynamic taint propagation for Java. In Proceedings of the 21st Annual Computer Security Applications Conference, pages 303--311, December 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Seth Hallem, Ben Chelf, Yichen Xie, and Dawson Engler. A system and language for building system-specific, static analyses. In Proceedings of the Conference on Programming Language Design and Implementation, pages 69--82, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jon Howell, Collin Jackson, Helen J. Wang, and Xiaofeng Fan. MashupOS: Operating system abstractions for client mashups. In Proceedings of the Workshop on Hot Topics in Operating Systems, May 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Yao-Wen Huang, Fang Yu, Christian Hang, Chung-Hung Tsai, Der-Tsai Lee, and Sy-Yen Kuo. Securing Web application code by static analysis and runtime protection. In Proceedings of the Conference on World Wide Web, pages 40--52, May 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Collin Jackson and Helen J. Wang. Subspace: Secure cross-domain communication for Web mashups. In Proceedings of the World Wide Web Conference, May 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Trevor Jim, Nikhil Swamy, and Michael Hicks. BEEP: Browser-enforced embedded policies. Technical report, Department of Computer Science, University of Maryland, 2006.Google ScholarGoogle Scholar
  17. Trevor Jim, Nikhil Swamy, and Michael Hicks. Defeating script injection attacks with browser-enforced embedded policies. In Proceedings of the International World Wide Web Conference, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Nenad Jovanovic, Christopher Kruegel, and Engin Kirda. Pixy: a static analysis tool for detecting Web application vul-nerabilities (short paper). In Proceedings of the Symposium on Security and Privacy, May 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. David Kierznowski. Cross context scripting with sage. http://michaeldaw.org/md-hacks/rss-injection-in-sage-part-2, September 2006.Google ScholarGoogle Scholar
  20. Engin Kirda, Christopher Kruegel, Giovanni Vigna, and Nenad Jovanovic. Noxes: a client-side solution for mitigating cross-site scripting attacks. In Proceedings of the Symposium on Applied Computing, April 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Laszlo Systems, Inc. OpenLaszlo: the premier open-source platform for rich Internet applications. http://www.openlaszlo.org, 2007.Google ScholarGoogle Scholar
  22. Benjamin Livshits and Monica S. Lam. Finding security errors in Java programs with static analysis. In Proceedings of the Usenix Security Symposium, pages 271--286, August 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Michael Martin, Benjamin Livshits, and Monica S. Lam. Finding application errors and security vulnerabilities using PQL: a program query language. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications, October 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Michael Martin, Benjamin Livshits, and Monica S. Lam. SecuriFly: Runtime vulnerability protection for Web applications. Technical report, Stanford University, October 2006.Google ScholarGoogle Scholar
  25. Jeremy Moeder. Yahoo RSS XSS vulnerability. http:// www.securityfocus.com/archive/1/413594, October 2005.Google ScholarGoogle Scholar
  26. Laurence Moroney. Foundations of Atlas: Rapid Ajax Development with ASP.NET 2.0. Apress, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Anh Nguyen-Tuong, Salvatore Guarnieri, Doug Greene, Jeff Shirley, and David Evans. Automatically hardening Web applications using precise tainting. In Proceedings of the IFIP International Information Security Conference, June 2005.Google ScholarGoogle ScholarCross RefCross Ref
  28. Tadeusz Pietraszek and Chris Vanden Berghe. Defending against injection attacks through context-sensitive string evaluation. In Proceedings of the Recent Advances in Intrusion Detection, September 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. Reis, J. Dunagan, H. Wang, O. Dubrovsky, and S. Esmeir. BrowserShield: Vulnerability-driven filtering of dynamic HTML. In Proceedings of Operating Systems Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. RSnake. XSS cheat sheet for filter evasion. http://ha.ckers.org/xss.html.Google ScholarGoogle Scholar
  31. Samy. The Samy worm. http://namb.la/popular, October 2005.Google ScholarGoogle Scholar
  32. willCode4Beer. Introducing the Dojo tree widget. http://willcode4beer.com/ware.jsp?set=dojoTreeWidget, January 2007.Google ScholarGoogle Scholar
  33. Yichen Xie and Alex Aiken. Static detection of security vulnerabilities in scripting languages. In Proceedings of the Usenix Security Symposium, pages 271--286, August 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Dachuan Yu, Ajay Chander, Nayeem Islam, and Igor Serikov. JavaScript instrumentation for browser security. In Proceedings of the Conference on the Principle of Programming Languages, January 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Using web application construction frameworks to protect against code injection attacks

            Recommendations

            Comments

            Login options

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

            Sign in
            • Published in

              cover image ACM Conferences
              PLAS '07: Proceedings of the 2007 workshop on Programming languages and analysis for security
              June 2007
              122 pages
              ISBN:9781595937117
              DOI:10.1145/1255329
              • General Chair:
              • Michael Hicks

              Copyright © 2007 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: 14 June 2007

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

              Acceptance Rates

              Overall Acceptance Rate43of77submissions,56%

              Upcoming Conference

              PLDI '24

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader