skip to main content
10.1145/1390630.1390661acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Dynamic test input generation for web applications

Published:20 July 2008Publication History

ABSTRACT

Web applications routinely handle sensitive data, and many people rely on them to support various daily activities, so errors can have severe and broad-reaching consequences. Unlike most desktop applications, many web applications are written in scripting languages, such as PHP. The dynamic features commonly supported by these languages significantly inhibit static analysis and existing static analysis of these languages can fail to produce meaningful results on realworld web applications.

Automated test input generation using the concolic testing framework has proven useful for finding bugs and improving test coverage on C and Java programs, which generally emphasize numeric values and pointer-based data structures. However, scripting languages, such as PHP, promote a style of programming for developing web applications that emphasizes string values, objects, and arrays.

In this paper, we propose an automated input test generation algorithm that uses runtime values to analyze dynamic code, models the semantics of string operations, and handles operations whose argument and return values may not share a common type. As in the standard concolic testing framework, our algorithm gathers constraints during symbolic execution. Our algorithm resolves constraints over multiple types by considering each variable instance individually, so that it only needs to invert each operation. By recording constraints selectively, our implementation successfully finds bugs in real-world web applications which state-of-the-art static analysis tools fail to analyze.

References

  1. M. Benedikt, J. Freire, and P. Godefroid. Veriweb: Automatically testing dynamic web sites. In Proceedings of the Eleventh International World Wide Web Conference (WWW 2002), 2002.Google ScholarGoogle Scholar
  2. T. S. BV. Tiobe programming community index, September 2007. URL: http://www.tiobe.com/tpci.htm.Google ScholarGoogle Scholar
  3. C. Cadar and D. R. Engler. Execution generated test cases: How to make system code crash itself. In Model Checking Software, 12th International SPIN Workshop, pages 2--23, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Cadar, V. Ganesh, P. M. Pawlowski, D. L. Dill, and D. R. Engler. Exe: automatically generating inputs of death. In Proceedings of the 13th ACM Conference on Computer and Communications Security (CCS 2006), pages 322--335, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Costa, M. Castro, L. Zhou, L. Zhang, and M. Peinado. Bouncer: securing software by blocking bad input. In Proceedings of the 21st ACM Symposium on Operating Systems Principles 2007 (SOSP 2007), pages 117--130, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Csallner and Y. Smaragdakis. Jcrasher: an automatic robustness tester for java. Software-Practice and Experience, pages 1025--1050, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. E. de Vries, J. Gilbert, and P. Biggar. phc: The open source php compiler.Google ScholarGoogle Scholar
  8. M. Emmi, R. Majumdar, and K. Sen. Dynamic test input generation for database applications. In Proceedings of the ACM/SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2007), pages 151--162, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Futoransky, E. Gutesman, and A. Waissbein. A dynamic technique for enhancing the security and privacy of web applications. In Proc. Black Hat USA, 2007.Google ScholarGoogle Scholar
  10. B. S. Gulavani, T. A. Henzinger, Y. Kannan, A. V. Nori, and S. K. Rajamani. Synergy: a new algorithm for property checking. In Proceedings of the 14th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2006), pages 117--127, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. W. G. Halfond and A. Orso. Improving test case generation for web applications using automated interface discovery. In Proceedings of the 15th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2007), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. E. Hopcroft, R. Motwani, and J. D. Ullman. Introduction to Automata Theory, Languages and Computability. Addison-Wesley, Boston, MA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. X. Jia and H. Liu. Rigorous and automatic testing of web applications, 2002.Google ScholarGoogle Scholar
  14. N. Jovanovic, C. Kruegel, and E. Kirda. Pixy: A static analysis tool for detecting web application vulnerabilities (short paper). In 2006 IEEE Symposium on Security and Privacy (S&P 2006), pages 258--263, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Kunc. What do we know about language equations? In Developments in Language Theory, 11th International Conference (DLT 2007), pages 23--27, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Kung, C. H. Liu, and P. Hsia. An object-oriented web test model for testing web applications. In 24th International Computer Software and Applications Conference (COMPSAC 2000), pages 537--542, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Y. Lei and J. H. Andrews. Minimization of randomized unit test cases. In 16th International Symposium on Software Reliability Engineering (ISSRE 2005), pages 267--276, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. J. Li, D. Weiss, and H. Yee. Code-coverage guided prioritized test generation. Information and Software Technology, pages 1187--1198, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Y. Minamide. Static approximation of dynamically generated web pages. In Proceedings of the 14th International World Wide Web Conference (WWW 2005), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation (PLDI 2007), pages 89--100, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Nguyen-Tuong, S. Guarnieri, D. Greene, J. Shirley, and D. Evans. Automatically hardening web applications using precise tainting. In Twentieth IFIP International Information Security Conference (SEC'05), 2005.Google ScholarGoogle ScholarCross RefCross Ref
  22. C. Pacheco and M. D. Ernst. Eclat: Automatic generation and classification of test inputs. In Object-Oriented Programming, 19th European Conference (ECOOP 2005), pages 504--527, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. W. Plandowski. Satisfiability of word equations with constants is in pspace. In 40th Annual Symposium on Foundations of Computer Science (FOCS 1999), pages 495--500, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Conference Record of POPL'95: 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 49--61, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. F. Ricca and P. Tonella. Analysis and testing of web applications. In Proceedings of the 23rd International Conference on Software Engineering (ICSE 2001), pages 25--34, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. K. Sen and G. Agha. Cute and jcute : Concolic unit testing and explicit path model-checking tools. In Computer Aided Verification, 18th International Conference (CAV 2006), pages 419--423, 2006. (Tool Paper). Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. K. Sen, D. Marinov, and G. Agha. Cute: a concolic unit testing engine for c. In Proceedings of the 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2005), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Z. Su and G. Wassermann. The essence of command injection attacks in web applications. In Proceedings of the 33rd Annual Symposium on Principles of Programming Languages, pages 372--382, Charleston, SC, Jan. 2006. ACM Press New York, NY, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G. Wassermann and Z. Su. Sound and Precise Analysis of Web Applications for Injection Vulnerabilities. In Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation (PLDI 2007), pages 32--41, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Y. Xie and A. Aiken. Static detection of security vulnerabilities in scripting languages. In Proceedings of the USENIX Security Symposium, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dynamic test input generation for 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
                ISSTA '08: Proceedings of the 2008 international symposium on Software testing and analysis
                July 2008
                324 pages
                ISBN:9781605580500
                DOI:10.1145/1390630

                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: 20 July 2008

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                Overall Acceptance Rate58of213submissions,27%

                Upcoming Conference

                ISSTA '24

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader