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

Symbolic security analysis of ruby-on-rails web applications

Published:04 October 2010Publication History

ABSTRACT

Many of today's web applications are built on frameworks that include sophisticated defenses against malicious adversaries. However, mistakes in the way developers deploy those defenses could leave applications open to attack. To address this issue, we introduce Rubyx, a symbolic executor that we use to analyze Ruby-on-Rails web applications for security vulnerabilities. Rubyx specifications can easily be adapted to variety of properties, since they are built from general assertions, assumptions, and object invariants. We show how to write Ruby specifications to detect susceptibility to cross-site scripting and cross-site request forgery, insufficient authentication, leaks of secret information, insufficient access control, as well as application-specific security properties. We used Rubyx to check seven web applications from various sources against out specifications. We found many vulnerabilities, and each application was subject to at least one critical attack. Encouragingly, we also found that it was relatively easy to fix most vulnerabilities, and that Rubyx showed the absence of attacks after our fixes. Our results suggest that Rubyx is a promising new way to discover security vulnerabilities in Ruby-on-Rails web applications.

References

  1. }}Jong-hoon An, Avik Chaudhuri, and Jeffrey S. Foster. Static typing for Ruby on Rails. In ASE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}S. Artzi, A. Kiezun, J. Dolby, F. Tip, D. Dig, A. Paradkar, and M.D. Ernst. Finding bugs in web applications using dynamic test generation and explicit state model checking. IEEE Transactions on Software Engineering, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}I.G. Baltopoulos and A.D. Gordon. Secure compilation of a multi-tier web language. In TLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}A. Barth, C. Jackson, and J.C. Mitchell. Robust defenses for cross-site request forgery. In CCS. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}Jesper Bengtson, Karthikeyan Bhargavan, C édric Fournet, Andrew D. Gordon, and Sergio Maffeis. Refinement types for secure implementations. In CSF, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}Gavin M. Bierman, Andrew D. Gordon, Cuatualin Hrictcu, and David Langworthy. Semantic subtyping with an SMT solver. In ICFP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}Prithvi Bisht, P. Madhusudan, and V. N. Venkatakrishnan. Candid: Dynamic candidate evaluations for automatic prevention of SQL injection attacks. ACM Trans. Inf. Syst. Secur., 13(2), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}Adam Chlipala. Ur: Statically-typed metaprogramming with type-level record computation. In PLDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}S. Chong, K. Vikram, A.C. Myers, et al. SIF: Enforcing confidentiality and integrity in web applications. In USENIX Security, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}Brian J. Corcoran, Nikhil Swamy, and Michael Hicks. Cross-tier, label-based security enforcement for web applications. In SIGMOD, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}M. Dalton, C. Kozyrakis, and N. Zeldovich. Nemesis: Preventing Authentication & Access Control Vulnerabilities in Web Applications. In USENIX Security, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}Dorothy E. Denning. A Lattice Model of Secure Information Flow. Communications of the ACM, 19(5), 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}U. Erlingsson, B. Livshits, and Y. Xie. End-to-end web application security. In HOTOS, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}C édric Fournet, Andrew D. Gordon, and Sergio Maffeis. A type discipline for authorization in distributed systems. In phCSF, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}P. Godefroid, N. Klarlund, and K. Sen. DART: Directed automated random testing. In PLDI, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}Arjun Guha, Shriram Krishnamurthi, and Trevor Jim. Using static analysis for Ajax intrusion detection. In WWW, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}M. Johns. SessionSafe: Implementing XSS immune session handling. ESORICS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}N. Jovanovic, C. Kruegel, and E. Kirda. Pixy: A static analysis tool for detecting web application vulnerabilities. In S &P, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}James C. King. Symbolic execution and program testing. Commun. ACM, 19(7), 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}S. Maffeis, J.C. Mitchell, and A. Taly. Object capabilities and isolation of untrusted web applications. In S &P, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}J. Magazinius, A. Askarov, and A. Sabelfeld. A Lattice-based Approach to Mashup Security. In ASIACCS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}Z. Mao, N. Li, and I. Molloy. Defeating Cross-Site Request Forgery Attacks with Browser-Enforced Authenticity Protection. Financial Cryptography and Data Security, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}M. Martin, B. Livshits, and M.S. Lam. Finding application errors and security flaws using PQL: a program query language. In OOPSLA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}J. McCarthy. Towards a mathematical science of computation. Information Processing, 62, 1962.Google ScholarGoogle Scholar
  25. }}G. Naumovich and P. Centonze. Static analysis of role-based access control in J2EE applications. ACM SIGSOFT Software Engineering Notes, 29(5), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}OWASP. The ten most critical web application risks, 2010. http://www.owasp.org/images/0/0f/OWASP_T10_-_2010_rc1.pdf.Google ScholarGoogle Scholar
  27. }}Sam Ruby, Dave Thomas, and David Heinemeier Hansson. Agile Web Development with Rails. The Pragmatic Bookshelf, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}P. Saxena, D. Akhawe, S. Hanna, F. Mao, S. McCamant, and D. Song. A Symbolic Execution Framework for JavaScript, 2010. Technical Report UCB/EECS-2010--26, EECS Department, University of California, Berkeley.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}SRI. Yices: An SMT solver. http://yices.csl.sri.com/.Google ScholarGoogle Scholar
  30. }}Zhendong Su and Gary Wassermann. The essence of command injection attacks in web applications. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. }}Omer Tripp, Marco Pistoia, Stephen J. Fink, Manu Sridharan, and Omri Weisman. TAJ: Effective taint analysis for Java. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}K. Vikram, A. Prateek, and B. Livshits. Ripley: automatically securing web 2.0 applications through replicated execution. In CCS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}P. Vogt, F. Nentwich, N. Jovanovic, E. Kirda, C. Kruegel, and G. Vigna. Cross-site scripting prevention with dynamic data tainting and static analysis. In NDSS, 2007.Google ScholarGoogle Scholar
  34. }}Gary Wassermann and Zhendong Su. Sound and precise analysis of web applications for injection vulnerabilities. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. }}Web Application Security Consortium. Web application security statistics, 2008. http://projects.webappsec.org/Web-Application-Security-Statistics.Google ScholarGoogle Scholar
  36. }}Heiko Webers. Ruby on rails security, v2. OWASP report: http://www.owasp.org/images/2/26/Owasp-rails-security.pdf.Google ScholarGoogle Scholar
  37. }}Y. Xie and A. Aiken. Static detection of security vulnerabilities in scripting languages. In USENIX Security, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. }}Dachuan Yu, Ajay Chander, Nayeem Islam, and Igor Serikov. Javascript instrumentation for browser security. In POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Symbolic security analysis of ruby-on-rails web applications

              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
                CCS '10: Proceedings of the 17th ACM conference on Computer and communications security
                October 2010
                782 pages
                ISBN:9781450302456
                DOI:10.1145/1866307

                Copyright © 2010 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: 4 October 2010

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                CCS '10 Paper Acceptance Rate55of325submissions,17%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