skip to main content
10.1145/3213846.3213868acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article
Public Access

Badger: complexity analysis with fuzzing and symbolic execution

Published:12 July 2018Publication History

ABSTRACT

Hybrid testing approaches that involve fuzz testing and symbolic execution have shown promising results in achieving high code coverage, uncovering subtle errors and vulnerabilities in a variety of software applications. In this paper we describe Badger - a new hybrid approach for complexity analysis, with the goal of discovering vulnerabilities which occur when the worst-case time or space complexity of an application is significantly higher than the average case.

Badger uses fuzz testing to generate a diverse set of inputs that aim to increase not only coverage but also a resource-related cost associated with each path. Since fuzzing may fail to execute deep program paths due to its limited knowledge about the conditions that influence these paths, we complement the analysis with a symbolic execution, which is also customized to search for paths that increase the resource-related cost. Symbolic execution is particularly good at generating inputs that satisfy various program conditions but by itself suffers from path explosion. Therefore, Badger uses fuzzing and symbolic execution in tandem, to leverage their benefits and overcome their weaknesses.

We implemented our approach for the analysis of Java programs, based on Kelinci and Symbolic PathFinder. We evaluated Badger on Java applications, showing that our approach is significantly faster in generating worst-case executions compared to fuzzing or symbolic execution on their own.

References

  1. Elvira Albert, Puri Arenas, Samir Genaim, and Germán Puebla. 2011. Closed-Form Upper Bounds in Static Cost Analysis. Journal of Automated Reasoning 46, 2 (February 2011), 161–203. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Glenn Ammons, Jong-Deok Choi, Manish Gupta, and Nikhil Swamy. 2004. Finding and Removing Performance Bottlenecks in Large Systems. In ECOOP 2004 - Object-Oriented Programming. 170–194.Google ScholarGoogle Scholar
  3. ASM. 2017. http://asm.ow2.org/. Accessed August 11, 2017.Google ScholarGoogle Scholar
  4. Pietro Braione, Giovanni Denaro, Andrea Mattavelli, and Mauro Pezzè. 2017. Combining Symbolic Execution and Search-based Testing for Programs with Complex Heap Inputs. In Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2017). ACM, New York, NY, USA, 90–101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Burnim, S. Juvekar, and K. Sen. 2009. WISE: Automated test generation for worst-case complexity. In 2009 IEEE 31st International Conference on Software Engineering. 463–473. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cristian Cadar, Daniel Dunbar, and Dawson Engler. 2008. KLEE: unassisted and automatic generation of high-coverage tests for complex systems programs. In Proceedings of the 8th USENIX conference on Operating systems design and implementation (OSDI’08). USENIX Association, Berkeley, CA, USA, 209–224. http://dl.acm.org/citation.cfm?id=1855741.1855756 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Sang Kil Cha, Thanassis Avgerinos, Alexandre Rebert, and David Brumley. 2012. Unleashing Mayhem on Binary Code. In Proceedings of the 2012 IEEE Symposium on Security and Privacy (SP ’12). IEEE Computer Society, Washington, DC, USA, 380–394. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bihuan Chen, Yang Liu, and Wei Le. 2016. Generating performance distributions via probabilistic symbolic execution. In Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14-22, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 49–60.Google ScholarGoogle Scholar
  10. Vitaly Chipounov, Volodymyr Kuznetsov, and George Candea. 2011. S2E: A Platform for In-vivo Multi-path Analysis of Software Systems. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XVI). ACM, New York, NY, USA, 265–278. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. L. A. Clarke. 1976. A System to Generate Test Data and Symbolically Execute Programs. IEEE Trans. Softw. Eng. 2, 3 (May 1976), 215–222. 1109/TSE.1976.233817 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Leonardo De Moura and Nikolaj Bjørner. 2008. Z3: an efficient SMT solver. In Proceedings of the 14th international conference on Tools and algorithms for the construction and analysis of systems (TACAS’08). Springer-Verlag, Berlin, Heidelberg, 337–340. http://dl.acm.org/citation.cfm?id=1792734.1792766 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. P. Galeotti, G. Fraser, and A. Arcuri. 2013. Improving search-based test suite generation with dynamic symbolic execution. In 2013 IEEE 24th International Symposium on Software Reliability Engineering (ISSRE). 360–369.Google ScholarGoogle Scholar
  14. Patrice Godefroid, Nils Klarlund, and Koushik Sen. 2005. DART: directed automated random testing (PLDI ’05). ACM, 213–223. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 1065036Google ScholarGoogle Scholar
  16. Patrice Godefroid, Michael Y. Levin, and David Molnar. 2012. SAGE: Whitebox Fuzzing for Security Testing. Queue 10, 1, Article 20 (Jan. 2012), 8 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Susan L. Graham, Peter B. Kessler, and Marshall K. Mckusick. 1982. Gprof: A Call Graph Execution Profiler. In Proceedings of the 1982 SIGPLAN Symposium on Compiler Construction (SIGPLAN ’82). ACM, 120–126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. BhargavS. Gulavani and Sumit Gulwani. 2008. A Numerical Abstract Domain Based on Expression Abstraction and Max Operator with Application in Timing Analysis. In Computer Aided Verification, Aarti Gupta and Sharad Malik (Eds.). Lecture Notes in Computer Science, Vol. 5123. Springer Berlin Heidelberg, 370– 384. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Sumit Gulwani. 2009. SPEED: Symbolic Complexity Bound Analysis. In CAV ’09: Proceedings of the 21st International Conference on Computer Aided Verification. Springer, 51–62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Jan Gustafsson, Andreas Ermedahl, Christer Sandberg, and Bjorn Lisper. 2006. Automatic Derivation of Loop Bounds and Infeasible Paths for WCET Analysis Using Abstract Execution. In Proceedings of the 27th IEEE International Real-Time Systems Symposium (RTSS ’06). IEEE Computer Society, Washington, DC, USA, 57–66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Christopher Healy, Mikael Sjödin, Viresh Rustagi, David Whalley, and Robert Van Engelen. 2000. Supporting Timing Analysis by Automatic Bounding of LoopIterations. Real-Time Syst. 18, 2/3 (May 2000), 129–156. 1008189014032 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Rody Kersten, Kasper Luckow, and Corina S. Păsăreanu. 2017. POSTER: AFLbased Fuzzing for Java with Kelinci. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS ’17). ACM, New York, NY, USA, 2511–2513. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. James C. King. 1976. Symbolic execution and program testing. Commun. ACM 19, 7 (July 1976), 385–394. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Yau-Tsun Steven Li, Sharad Malik, and Benjamin Ehrenberg. 1998. Performance Analysis of Real-Time Embeded Software. Kluwer Academic Publishers, Norwell, MA, USA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Kasper Luckow, Rody Kersten, and Corina Pasareanu. 2017. Symbolic Complexity Analysis using Context-preserving Histories. In Proceedings of the 10th IEEE International Conference on Software Testing, Verification and Validation (ICST 2017). 58–68.Google ScholarGoogle ScholarCross RefCross Ref
  26. Theofilos Petsios, Jason Zhao, Angelos D. Keromytis, and Suman Jana. 2017. SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS ’17). ACM, New York, NY, USA, 2155–2168. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Corina S. Păsăreanu, Quoc-Sang Phan, and Pasquale Malacaria. 2016. Multi-run Side-Channel Analysis Using Symbolic Execution and Max-SMT. In Proceedings of the 2016 IEEE 29th Computer Security Foundations Symposium (CSF ’16). IEEE Computer Society, Washington, DC, USA, 387–400. 2016.34Google ScholarGoogle ScholarCross RefCross Ref
  28. Corina S. Păsăreanu, Willem Visser, David Bushnell, Jaco Geldenhuys, Peter Mehlitz, and Neha Rungta. 2013. Symbolic PathFinder: integrating symbolic execution with model checking for Java bytecode analysis. Automated Software Engineering (2013), 1–35.Google ScholarGoogle Scholar
  29. Koushik Sen, Darko Marinov, and Gul Agha. 2005. CUTE: a concolic unit testing engine for C. In Proceedings of the 13th ACM SIGSOFT international symposium on Foundations of software engineering (ESEC/FSE-13). ACM, New York, NY, USA, 263–272. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. K Serebryany. {n. d.}. Libfuzzer: A library for coverage-guided fuzz testing (within llvm). http://llvm.org/docs/LibFuzzer.html.Google ScholarGoogle Scholar
  31. Gary Sevitsky, Wim De Pauw, and Ravi Konuru. 2001. An Information Exploration Tool for Performance Analysis of Java Programs. In TOOLS Europe 2001: 38th International Conference on Technology of Object-Oriented Languages and Systems, Components for Mobile Computing. 85–101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Olha Shkaravska, Rody Kersten, and Marko Van Eekelen. 2010. Test-Based Inference of Polynomial Loop-Bound Functions. In PPPJ’10: Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java (ACM Digital Proceedings Series), Andreas Krall and Hanspeter Mössenböck (Eds.). 99–108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Nick Stephens, John Grosen, Christopher Salls, Andrew Dutcher, Ruoyu Wang, Jacopo Corbetta, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. 2016. Driller: Augmenting Fuzzing Through Selective Symbolic Execution. In 23nd Annual Network and Distributed System Security Symposium, NDSS 2016, San Diego, California, USA, February 21-24, 2016. http://www.internetsociety.org/ sites/default/files/blogs-media/driller-augmenting-fuzzing-through-selectivesymbolic-execution.pdfGoogle ScholarGoogle Scholar
  34. Website. 2012. Regular Expressions. http: // www.mkyong .com /regularexpressions/10-java-regular-expression-examples-you-should-know/.Google ScholarGoogle Scholar
  35. Website. 2015. DARPA’s Space-Time Analysis for Cybersecurity program. http: //www.darpa.mil/program/space-time-analysis-for-cybersecurity.Google ScholarGoogle Scholar
  36. Website. 2015. Debian Bug report log 800564 – php5: trivial hash complexity DoS attack. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800564. Accessed Jan 28, 2018.Google ScholarGoogle Scholar
  37. Website. 2016. Cyber Grand Challenge Archive. http://archive.darpa.mil/ cybergrandchallenge/.Google ScholarGoogle Scholar
  38. Website. 2016. DARPA Cyber Grand Challenge. https://www.darpa.mil/newsevents/2016-08-04.Google ScholarGoogle Scholar
  39. Website. 2016. Microsoft Security Risk Detection. https://www.microsoft.com/ en-us/security-risk-detection/.Google ScholarGoogle Scholar
  40. Website. 2017. OSS-Fuzz: Five months later, and rewarding projects. https:// testing.googleblog.com/2017/05/oss-fuzz-five-months-later-and.html. Accessed Jan 28, 2018.Google ScholarGoogle Scholar
  41. Reinhard Wilhelm. 2009. Determining Bounds on Execution Times. In Embedded Systems Design and Verification - Volume 1 of the Embedded Systems Handbook. 9.Google ScholarGoogle Scholar
  42. Guowei Yang, Corina S. Păsăreanu, and Sarfraz Khurshid. 2012. Memoized Symbolic Execution. In Proceedings of the 2012 International Symposium on Software Testing and Analysis (ISSTA 2012). ACM, New York, NY, USA, 144–154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Michal Zalewski. 2017. American Fuzzy Lop (AFL). http://lcamtuf.coredump.cx/ afl/. Accessed August 11, 2017.Google ScholarGoogle Scholar

Index Terms

  1. Badger: complexity analysis with fuzzing and symbolic execution

        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 2018: Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis
          July 2018
          379 pages
          ISBN:9781450356992
          DOI:10.1145/3213846
          • General Chair:
          • Frank Tip,
          • Program Chair:
          • Eric Bodden

          Copyright © 2018 ACM

          © 2018 Association for Computing Machinery. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of the United States government. As such, the United States Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 12 July 2018

          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