Software Testing CS 408. Lecture 6: Dynamic Symbolic Execution and Concolic Testing 1/30/18

Size: px
Start display at page:

Download "Software Testing CS 408. Lecture 6: Dynamic Symbolic Execution and Concolic Testing 1/30/18"

Transcription

1 Software Testing CS 408 Lecture 6: Dynamic Symbolic Execution and Concolic Testing 1/30/18

2 Relevant Papers CUTE: A Concolic Unit Testing Engine for C Koushik Sen, Darko Marinov, Gul Agha Department of Computer Science University of Illinois at Urbana-Champaign {ksen,marinov,agha}@cs.uiuc.edu Abstract KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs We present a new symbolic execution tool, KLEE, capable of automatically generating tests that achieve high coverage on a diverse set of complex and environmentally-intensive programs. We used KLEE to thoroughly check all 89 stand-alone programs in the GNU COREUTILS utility suite, which form the core user-level environment installed on millions of Unix systems, and arguably are the single most heavily tested set of open-source programs in existence. KLEE-generated tests achieve high line coverage on average over 90% per tool (median: over 94%) and significantly beat the coverage of the developers own hand-written test suites. When we did the same for 75 equivalent tools in the BUSYBOX embedded system suite, results were even better, including 100% coverage on 31 of them. We also used KLEE as a bug finding tool, applying it to 452 applications (over 430K total lines of code), where it found 56 serious bugs, including three in COREUTILS that had been missed for over 15 years. Finally, we used KLEE to cross-check purportedly identical BUSY- BOX and COREUTILS utilities, finding functional correctness errors and a myriad of inconsistencies. 1 Introduction Many classes of errors, such as functional correctness bugs, are difficult to find without executing a piece of code. The importance of such testing combined with the difficulty and poor performanceof random and manual approaches has led to much recent work in using symbolic execution to automatically generate test inputs [11, 14 16, 20 22, 24, 26, 27, 36]. At a high-level, these tools use variations on the following idea: Instead of running code on manually- or randomly-constructed input, they run it on symbolic input initially allowed to be anything. They substitute program inputs with sym- Author names are in alphabetical order. Daniel Dunbar is the main author of the KLEE system. Cristian Cadar, Daniel Dunbar, Dawson Engler Stanford University bolic values and replace corresponding concrete program operations with ones that manipulate symbolic values. When program execution branches based on a symbolic value, the system (conceptually) follows both branches, on each path maintaining a set of constraints called the path condition which must hold on execution of that path. When a path terminates or hits a bug, a test case can be generated by solving the current path condition for concrete values. Assuming deterministic code, feeding this concrete input to a raw, unmodified version of the checked code will make it follow the same path and hit the same bug. Results are promising. However, while researchers have shown such tools can sometimes get good coverage and find bugs on a small number of programs, it has been an open question whether the approach has any hope of consistently achieving high coverage on real applications. Two common concerns are (1) the exponential number of paths through code and (2) the challenges in handling code that interacts with its surrounding environment, such as the operating system, the network, or the user (colloquially: the environmentproblem ). Neither concern has been much helped by the fact that most past work, including ours, has usually reported results on alimitedsetofhand-pickedbenchmarksandtypically has not included any coverage numbers. This paper makes two contributions. First, we present anewsymbolicexecutiontool, KLEE, which we designed for robust, deep checking of a broad range of applications, leveraging several years of lessons from our previous tool, EXE [16]. KLEE employs a variety of constraint solving optimizations, represents program states compactly, and uses search heuristics to get high code coverage. Additionally, it uses a simple and straightforward approach to dealing with the external environment. These features improve KLEE s performance by overanorderof magnitudeandlet it checka broadrange of system-intensive programs out of the box. ABSTRACT In unit testing, a program is decomposed into units which are collections of functions. A part of unit can be tested by generating inputs for a single entry function. The entry function may contain pointer arguments, in which case the inputs to the unit are memory graphs. The paper addresses the problem of automating unit testing with memory graphs as inputs. The approach used builds on previous work combining symbolic and concrete execution, and more specifically, using such a combination to generate test inputs to explore all feasible execution paths. The current work develops a method to represent and track constraints that capture the behavior of a symbolic execution of a unit with memory graphs as inputs. Moreover, an efficient constraint solver is proposed to facilitate incremental generation of such test inputs. Finally, CUTE, a tool implementing the method is described together with the results of applying CUTE to real-world examples of C code. Categories and Subject Descriptors: D.2.5 [Software Engineering]: Testing and Debugging General Terms: Reliability,Verification Keywords: concolic testing, random testing, explicit path model-checking, data structure testing, unit testing, testing C programs. 1. INTRODUCTION Unit testing is a method for modular testing of a programs functional behavior. A program is decomposed into units, where each unit is a collection of functions, and the units are independently tested. Such testing requires specification of values for the inputs (or test inputs) to the unit. Manual specification of such values is labor intensive and cannot guarantee that all possible behaviors of the unit will be observed during the testing. In order to improve the range of behaviors observed (or test coverage), several techniques have been proposed to automatically generate values for the inputs. One such tech- 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. To copyotherwise,to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. ESEC-FSE 05, September 5 9, 2005, Lisbon, Portugal. Copyright 2005 ACM /05/ $5.00. nique is to randomly choose the values over the domain of potential inputs [4,8,10,21]. The problem with such random testing is two fold: first, many sets of values may lead to the same observable behavior and are thus redundant, and second, the probability of selecting particular inputs that cause buggy behavior may be astronomically small [20]. One approach which addresses the problem of redundant executions and increases test coverage is symbolic execution [1,3,9,22,23,27,28,30]. In symbolic execution, a program is executed using symbolic variables in place of concrete values for inputs. Each conditional expression in the program represents a constraint that determines an execution path. Observe that the feasible executions of a program can be represented as a tree, where the branch points in a program are internal nodes of the tree. The goal is to generate concrete values for inputs which would result in different paths being taken. The classic approach is to use depth first exploration of the paths by backtracking [14]. Unfortunately, for large or complex units, it is computationally intractable to precisely maintain and solve the constraints required for test generation. To the best of our knowledge, Larson and Austin were the first to propose combining concrete and symbolic execution [16]. In their approach, the program is executed on some user-provided concrete input values. Symbolic path constraints are generated for the specific execution. These constraints are solved, if feasible, to see whether there are potential input values that would have led to a violation along the same execution path. This improves coverage while avoiding the computational cost associated with fullblown symbolic execution which exercises all possible execution paths. Godefroid et al. proposed incrementally generating test inputs by combining concrete and symbolic execution [11]. In Godefroid et al. s approach, during a concrete execution, a conjunction of symbolic constraints along the path of the execution is generated. These constraints are modified and then solved, if feasible, to generate further test inputs which would direct the program along alternative paths. Specifically, they systematically negate the conjuncts in the path constraint to provide a depth first exploration of all paths in the computation tree. If it is not feasible to solve the modified constraints, Godefroid et al. propose simply substituting random concrete values. A challenge in applying Godefroid et al. s approach is to provide methods which extract and solve the constraints generated by a program. This problem is particularly complex for programs which have dynamic data structures using Patrice Godefroid Microsoft (Research) pg@microsoft.com Abstract Automated Whitebox Fuzz Testing Michael Y. Levin Microsoft (CSE) mlevin@microsoft.com Fuzz testing is an effective technique for finding security vulnerabilities in software. Traditionally, fuzz testing tools apply random mutations to well-formed inputs of a program and test the resulting values. We present an alternative whitebox fuzz testing approach inspired by recent advances in symbolic execution and dynamic test generation. Our approach records an actual run of the program under test on a well-formed input, symbolically evaluates the recorded trace, and gathers constraints on inputs capturing how the program uses these. The collected constraints are then negated one by one and solved with a constraint solver, producing new inputs that exercise different control paths in the program. This process is repeated with the help of a code-coverage maximizing heuristic designed to find defects as fast as possible. We have implemented this algorithm in SAGE (Scalable, Automated, Guided Execution), a new tool employing x86 instruction-level tracing and emulation for whitebox fuzzing of arbitrary file-reading Windows applications. We describe key optimizations needed to make dynamic test generation scale to large input files and long execution traces with hundreds of millions of instructions. We then present detailed experiments with several Windows applications. Notably, without any format-specific knowledge, SAGE detects the MS ANI vulnerability, which was missed by extensive blackbox fuzzing and static analysis tools. Furthermore, while still in an early stage of development, SAGE has already discovered 30+ new bugs in large shipped Windows applications including image processors, media players, and file decoders. Several of these bugs are potentially exploitable memory access violations. 1 Introduction Since the Month of Browser Bugs released a new bug each day of July 2006 [25], fuzz testing has leapt to prominence as a quick and cost-effective method for finding serious security defects in large applications. Fuzz testing is a The work of this author was done while visiting Microsoft. David Molnar UC Berkeley dmolnar@eecs.berkeley.edu form of blackbox random testing which randomly mutates well-formed inputs and tests the program on the resulting data [13, 30, 1, 4]. In some cases, grammars are used to generate the well-formed inputs, which also allows encoding application-specific knowledge and test heuristics. Although fuzz testing can be remarkably effective, the limitations of blackbox testing approaches are well-known. For instance, the then branch of the conditional statement if (x==10) then hasonlyonein2 32 chances of being exercised if x is a randomly chosen 32-bit input value. This intuitively explains why random testing usually provides low code coverage [28]. In the security context, these limitations mean that potentially serious security bugs, such as buffer overflows, may be missed because the code that contains the bug is not even exercised. Weproposeaconceptually simplebutdifferentapproach of whitebox fuzz testing. This workisinspiredby recent advances in systematic dynamic test generation [16, 7]. Starting with a fixed input, our algorithm symbolically executes the program, gathering input constraints from conditional statements encountered along the way. The collected constraints are then systematically negated and solved with a constraint solver, yielding new inputs that exercise different execution paths in the program. This process is repeated using a novel search algorithm with a coverage-maximizing heuristic designed to find defects as fast as possible. For example, symbolic execution of the above fragment on the input x = 0 generates the constraint x 10. Oncethisconstraint is negated and solved, it yields x = 10, which gives us a new input that causes the program to follow the then branch of the given conditional statement. This allows us to exercise and test additional code for security bugs, even without specific knowledge of the input format. Furthermore, this approach automatically discovers and tests corner cases where programmers may fail to properly allocate memory or manipulate buffers, leading to security vulnerabilities. In theory, systematic dynamic test generation can lead to full program path coverage, i.e., program verification [16]. In practice, however, the search is typically incomplete both because the number of execution paths in the program un- 2

3 Blackbox vs Whitebox Testing Korat, Randoop, and Quickcheck effectively employ blackbox methods - They don t try to analyze the program or methods under test - Instead, they use random testing along with clever heuristics or user-provided directives (e.g., properties) to improve coverage In contrast, whitebox testing methods analyze the source and use the output of the analysis to drive testcase generation 3

4 Dynamic Symbolic Execution A specific (and particularly useful) kind of whitebox testing is dynamic symbolic execution Basic idea: - Maintain both concrete and symbolic representations of program state at every program point - Use a theorem prover or constraint solver to guide execution along unexplored paths - Goal: explore all paths in the method under test 4

5 Program Paths and Computation Trees 5

6 Example 6

7 Dynamic Techniques When reachability conditions depend upon specific values drawn from a large universe of values, random testing is unlikely to be effective 7

8 Symbolic Execution Rather than simply relying on random execution to reach an error state, we might symbolically evaluate the program. A symbolic value represents a set of concrete values (e.g., a type). Collect constraints on these values along different paths. Use a theorem prover to reason about these constraints. - To reach the error state, we need to discover a value for x such that (x * 3 == 15) /\!(x % 5) == 0 - A theorem prover would respond that no such x exists, allowing us to conclude that the error condition cannot arise. 8

9 Challenges - Complexity of symbolic constraints might overwhelm the theorem prover - How do we define symbolic abstractions of data structures and the heap? - E.g., how do we encode properties like heap reachability? - What about library calls or methods that are dynamically linked? Scalability? 9

10 Dynamic Symbolic Execution (Concolic Testing) This approach allows the theorem prover to be incomplete - concrete values are used to simplify constraints No unsatisfiable constraint will be deemed satisfiable 10

11 Example 11

12 Example 12

13 Example 13

14 Example 14

15 Example 15

16 Example 16

17 Example 17

18 Example 18

19 Example 19

20 Example 20

21 Example 21

22 Example 22

23 Constraint Exploration What are the different constraints that a dynamic symbolic execution strategy might solve in exploring the following computation tree? 23

24 Another Example (Overcoming Complexity) 24

25 Another Example 25

26 Another Example 26

27 Another Example 27

28 Another Example 28

29 Another Example 29

30 Another Example 30

31 Another Example 31

32 Soundness 32

33 Soundness 33

34 Soundness 34

35 Soundness 35

36 Dynamic vs. Symbolic Execution A dynamic analysis never examines an execution that could not occur. - Never returns false positives - every error is a true error - But, may have false negatives - not all (latent) errors will be discovered Symbolic execution attempts to examine all paths - But, not all such paths are actually realizable (feasible) - It can thus have false positives - not every error it reports will be a true error - But, will never have false negatives - it will never incorrectly declare a program to be error-free (thus, it is always sound) 36

37 Dynamic Symbolic Execution 37

38 Another Example 38

39 Dealing with Data Structures What is the likelihood random testing would reach the error state? To trigger the testcase, a randomly generated testcase would need to: - pick x > 0 - pick p to be a non-empty linked list - set the contents of the first element to be the value of foo(x) - set the tail of the first element to point to p 39

40 Dealing with Data Structures 40

41 Dealing with Data Structures 41

42 Dealing with Data Structures 42

43 Dealing with Data Structures 43

44 Dealing with Data Structures 44

45 Dealing with Data Structures 45

46 Dealing with Data Structures 46

47 Dealing with Data Structures 47

48 Dealing with Data Structures 48

49 Dealing with Data Structures 49

50 Summary 50

51 Summary 51

Automated Whitebox Fuzz Testing. by - Patrice Godefroid, - Michael Y. Levin and - David Molnar

Automated Whitebox Fuzz Testing. by - Patrice Godefroid, - Michael Y. Levin and - David Molnar Automated Whitebox Fuzz Testing by - Patrice Godefroid, - Michael Y. Levin and - David Molnar OUTLINE Introduction Methods Experiments Results Conclusion Introduction Fuzz testing is an effective Software

More information

Software Testing CS 408. Lecture 11: Review 2/20/18

Software Testing CS 408. Lecture 11: Review 2/20/18 Software Testing CS 408 Lecture 11: Review 2/20/18 Lecture 1: Basics 2 Two Views Verification: Prove the absence, and conjecture the presence, of bugs Ex: types: Not all ill-typed programs are wrong But,

More information

CUTE: A Concolic Unit Testing Engine for C

CUTE: A Concolic Unit Testing Engine for C CUTE: A Concolic Unit Testing Engine for C Koushik Sen Darko Marinov Gul Agha University of Illinois Urbana-Champaign Goal Automated Scalable Unit Testing of real-world C Programs Generate test inputs

More information

Symbolic and Concolic Execution of Programs

Symbolic and Concolic Execution of Programs Symbolic and Concolic Execution of Programs Information Security, CS 526 Omar Chowdhury 10/7/2015 Information Security, CS 526 1 Reading for this lecture Symbolic execution and program testing - James

More information

Automated Whitebox Fuzz Testing

Automated Whitebox Fuzz Testing Automated Whitebox Fuzz Testing ( Research Patrice Godefroid (Microsoft Michael Y. Levin (Microsoft Center for ( Excellence Software David Molnar (UC Berkeley & MSR) Fuzz Testing Send random data to application

More information

Symbolic Execution, Dynamic Analysis

Symbolic Execution, Dynamic Analysis Symbolic Execution, Dynamic Analysis http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Symbolic execution Pavel Parízek Symbolic Execution, Dynamic Analysis

More information

KLEE: Effective Testing of Systems Programs Cristian Cadar

KLEE: Effective Testing of Systems Programs Cristian Cadar KLEE: Effective Testing of Systems Programs Cristian Cadar Joint work with Daniel Dunbar and Dawson Engler April 16th, 2009 Writing Systems Code Is Hard Code complexity Tricky control flow Complex dependencies

More information

CUTE: A Concolic Unit Testing Engine for C

CUTE: A Concolic Unit Testing Engine for C CUTE: A Concolic Unit Testing Engine for C Koushik Sen, Darko Marinov, Gul Agha Department of Computer Science University of Illinois at Urbana-Champaign {ksen,marinov,agha}@cs.uiuc.edu ABSTRACT In unit

More information

Concolic Testing of Sequential and Concurrent Programs

Concolic Testing of Sequential and Concurrent Programs Concolic Testing of Sequential and Concurrent Programs Koushik Sen University of California, Berkeley ksen@cs.berkeley.edu and Darko Marinov University of Illinois at Urbana Champaign marinov@cs.uiuc.edu

More information

Billions and Billions of Constraints: Whitebox Fuzz Testing in Production

Billions and Billions of Constraints: Whitebox Fuzz Testing in Production Billions and Billions of Constraints: Whitebox Fuzz Testing in Production Ella Bounimova Patrice Godefroid David Molnar Abstract We report experiences with constraint-based whitebox fuzz testing in production

More information

Symbolic Execution. Wei Le April

Symbolic Execution. Wei Le April Symbolic Execution Wei Le 2016 April Agenda What is symbolic execution? Applications History Interal Design: The three challenges Path explosion Modeling statements and environments Constraint solving

More information

Static Analysis and Bugfinding

Static Analysis and Bugfinding Static Analysis and Bugfinding Alex Kantchelian 09/12/2011 Last week we talked about runtime checking methods: tools for detecting vulnerabilities being exploited in deployment. So far, these tools have

More information

A Survey of Search Strategies in the Dynamic Symbolic Execution

A Survey of Search Strategies in the Dynamic Symbolic Execution A Survey of Search Strategies in the Dynamic Symbolic Execution Yu LIU *, Xu ZHOU a and Wei-Wei GONG b National University of Defense Technology, Changsha, China a zhouxu@nudt.edu.cn, b IssacGong@outlook.com

More information

Emblematic Execution for Software Testing based on DART AND CUTE

Emblematic Execution for Software Testing based on DART AND CUTE Emblematic Execution for Software Testing based on DART AND CUTE K. K. V. D. Hari Prasad 1, Ch. V. Phani Krishna and V. Samson Deva Kumar 3 1 Student, IV/IV B.Tech, Department of Computer Science Engineering,

More information

Automated Software Analysis Techniques For High Reliability: A Concolic Testing Approach. Moonzoo Kim

Automated Software Analysis Techniques For High Reliability: A Concolic Testing Approach. Moonzoo Kim Automated Software Analysis Techniques For High Reliability: A Concolic Testing Approach Moonzoo Kim Contents Automated Software Analysis Techniques Background Concolic testing process Example of concolic

More information

DART: Directed Automated Random Testing

DART: Directed Automated Random Testing DART: Directed Automated Random Testing Patrice Godefroid Nils Klarlund Koushik Sen Bell Labs Bell Labs UIUC Presented by Wei Fang January 22, 2015 PLDI 2005 Page 1 June 2005 Motivation Software testing:

More information

Software Model Checking

Software Model Checking 20 ans de Recherches sur le Software Model Checking 1989 1994 2006 2009 Université de Liège Bell Labs Microsoft Research Patrice Godefroid Page 1 Mars 2009 Model Checking A B C Each component is modeled

More information

Symbolic Execution for Bug Detection and Automated Exploit Generation

Symbolic Execution for Bug Detection and Automated Exploit Generation Symbolic Execution for Bug Detection and Automated Exploit Generation Daniele Cono D Elia Credits: Emilio Coppa SEASON Lab season-lab.github.io May 27, 2016 1 / 29 Daniele Cono D Elia Symbolic Execution

More information

From Symbolic Execution to Concolic Testing. Daniel Paqué

From Symbolic Execution to Concolic Testing. Daniel Paqué From Symbolic Execution to Concolic Testing Daniel Paqué Structure Symbolic Execution Concolic Testing Execution Generated Testing Concurrency in Concolic Testing 2 Motivation Software Testing usually

More information

Microsoft SAGE and LLVM KLEE. Julian Cohen Manual and Automatic Program Analysis

Microsoft SAGE and LLVM KLEE. Julian Cohen Manual and Automatic Program Analysis Microsoft SAGE and LLVM KLEE Julian Cohen HockeyInJune@isis.poly.edu Manual and Automatic Program Analysis KLEE KLEE [OSDI 2008, Best Paper Award] Based on symbolic execution and constraint solving techniques

More information

Symbolic Execution for Software Testing: Three Decades Later

Symbolic Execution for Software Testing: Three Decades Later doi:10.1145/2408776.2408795 The challenges and great promise of modern symbolic execution techniques, and the tools to help implement them. By Cristian Cadar and Koushik Sen Symbolic Execution for Software

More information

Software Vulnerability

Software Vulnerability Software Vulnerability Refers to a weakness in a system allowing an attacker to violate the integrity, confidentiality, access control, availability, consistency or audit mechanism of the system or the

More information

Dynamic Software Model Checking

Dynamic Software Model Checking Dynamic Software Model Checking Patrice Godefroid Microsoft Research Page 1 September 2014 Ed Clarke: A man, An idea LASER 2011 summer school (Elba island, Italy) Page 2 September 2014 Ed Clarke: A man,

More information

Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui

Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui Projects 1 Information flow analysis for mobile applications 2 2 Machine-learning-guide typestate analysis for UAF vulnerabilities 3 3 Preventing

More information

Efficient Solving of Structural Constraints

Efficient Solving of Structural Constraints Efficient Solving of Structural Constraints Bassem Elkarablieh University of Texas at Austin Austin, TX 78712 elkarabl@ece.utexas.edu Darko Marinov University of Illinois at Urbana Urbana, IL 61801 marinov@cs.uiuc.edu

More information

Dynamic Test Generation to Find Bugs in Web Application

Dynamic Test Generation to Find Bugs in Web Application Dynamic Test Generation to Find Bugs in Web Application C.SathyaPriya 1 and S.Thiruvenkatasamy 2 1 Department of IT, Shree Venkateshwara Hi-Tech Engineering College, Gobi, Tamilnadu, India. 2 Department

More information

Billions and Billions of Constraints: Whitebox Fuzz Testing in Production

Billions and Billions of Constraints: Whitebox Fuzz Testing in Production Billions and Billions of Constraints: Whitebox Fuzz Testing in Production Ella Bounimova Microsoft Research, USA Patrice Godefroid Microsoft Research, USA David Molnar Microsoft Research, USA Abstract

More information

IC-Cut: A Compositional Search Strategy for Dynamic Test Generation

IC-Cut: A Compositional Search Strategy for Dynamic Test Generation IC-Cut: A Compositional Search Strategy for Dynamic Test Generation Maria Christakis 1 and Patrice Godefroid 2 1 Department of Computer Science ETH Zurich, Switzerland maria.christakis@inf.ethz.ch 2 Microsoft

More information

References: Thomas A. Henzinger (1996): The theory of hybrid automata In: Annual IEEE Symposium on Logic in Computer Science

References: Thomas A. Henzinger (1996): The theory of hybrid automata In: Annual IEEE Symposium on Logic in Computer Science Hybrid Systems Modeling In today's fast evolving technologies where the line between analog and digital systems is getting blurred, systems consist of a mix of continuous and discrete components. A discrete

More information

Test Automation. 20 December 2017

Test Automation. 20 December 2017 Test Automation 20 December 2017 The problem of test automation Testing has repetitive components, so automation is justified The problem is cost-benefit evaluation of automation [Kaner] Time for: test

More information

Fuzzing. Abstract. What is Fuzzing? Fuzzing. Daniel Basáez S. January 22, 2009

Fuzzing. Abstract. What is Fuzzing? Fuzzing. Daniel Basáez S.  January 22, 2009 Fuzzing Daniel Basáez S. dbasaez@inf.utfsm.cl dbasaez@stud.fh-offenburg.de January 22, 2009 Abstract Fuzzing is a technique for Testing, and is very effective for finding security vulnerabilities in software.

More information

Tackling the Path Explosion Problem in Symbolic Execution-driven Test Generation for Programs

Tackling the Path Explosion Problem in Symbolic Execution-driven Test Generation for Programs 2010 19th IEEE Asian Test Symposium Tackling the Path Explosion Problem in Symbolic Execution-driven Test Generation for Programs Saparya Krishnamoorthy, Michael S. Hsiao and Loganathan Lingappan Department

More information

Program Testing via Symbolic Execution

Program Testing via Symbolic Execution Program Testing via Symbolic Execution Daniel Dunbar Program Testing via Symbolic Execution p. 1/26 Introduction Motivation Manual testing is difficult Program Testing via Symbolic Execution p. 2/26 Introduction

More information

CSE 565 Computer Security Fall 2018

CSE 565 Computer Security Fall 2018 CSE 565 Computer Security Fall 2018 Lecture 16: Building Secure Software Department of Computer Science and Engineering University at Buffalo 1 Review A large number of software vulnerabilities various

More information

A Survey of Approaches for Automated Unit Testing. Outline

A Survey of Approaches for Automated Unit Testing. Outline A Survey of Approaches for Automated Unit Testing Peter Carr Ron Kneusel Outline Introduction/Motivation Concolic Testing Random Testing Evolutionary Testing Random/Evolutionary Experiment and Results

More information

SOFTWARE testing techniques have not progressed significantly

SOFTWARE testing techniques have not progressed significantly EDIC RESEARCH PROPOSAL 1 Scalable Automated Testing Using Symbolic Execution Stefan Bucur DSLAB, I&C, EPFL Abstract Current software testing processes involve significant human intervention, which is both

More information

Symbolic Execu.on. Suman Jana

Symbolic Execu.on. Suman Jana Symbolic Execu.on Suman Jana Acknowledgement: Baishakhi Ray (Uva), Omar Chowdhury (Purdue), Saswat Anand (GA Tech), Rupak Majumdar (UCLA), Koushik Sen (UCB) What is the goal? Tes.ng Tes%ng approaches are

More information

Automatic Partial Loop Summarization in Dynamic Test Generation

Automatic Partial Loop Summarization in Dynamic Test Generation Automatic Partial Loop Summarization in Dynamic Test Generation Patrice Godefroid Microsoft Research Redmond, WA, USA pg@microsoft.com Daniel Luchaup University of Wisconsin Madison Madison, WI, USA luchaup@cs.wisc.edu

More information

Research on Fuzz Testing Framework based on Concolic Execution

Research on Fuzz Testing Framework based on Concolic Execution 017 International Conference on Computer Science and Application Engineering (CSAE 017) ISBN: 978-1-60595-505-6 Research on uzz Testing ramework based on Concolic Execution Xiong Xie and Yuhang Chen *

More information

KLEE Workshop Feeding the Fuzzers. with KLEE. Marek Zmysłowski MOBILE SECURITY TEAM R&D INSTITUTE POLAND

KLEE Workshop Feeding the Fuzzers. with KLEE. Marek Zmysłowski MOBILE SECURITY TEAM R&D INSTITUTE POLAND Feeding the Fuzzers with KLEE Marek Zmysłowski MOBILE SECURITY TEAM R&D INSTITUTE POLAND This presentation was created with help and commitment of the Samsung R&D Poland Mobile Security team. KLEE and

More information

Automated Testing of Cloud Applications

Automated Testing of Cloud Applications Automated Testing of Cloud Applications Linghao Zhang, Tao Xie, Nikolai Tillmann, Peli de Halleux, Xiaoxing Ma, Jian lv {lzhang25, txie}@ncsu.edu, {nikolait, jhalleux}@microsoft.com, {xxm, lj}@nju.edu.cn

More information

n HW7 due in about ten days n HW8 will be optional n No CLASS or office hours on Tuesday n I will catch up on grading next week!

n HW7 due in about ten days n HW8 will be optional n No CLASS or office hours on Tuesday n I will catch up on grading next week! Announcements SMT Solvers, Symbolic Execution n HW7 due in about ten days n HW8 will be optional n No CLASS or office hours on Tuesday n I will catch up on grading next week! n Presentations n Some of

More information

A Comparison of Error Metrics for Learning Model Parameters in Bayesian Knowledge Tracing

A Comparison of Error Metrics for Learning Model Parameters in Bayesian Knowledge Tracing A Comparison of Error Metrics for Learning Model Parameters in Bayesian Knowledge Tracing Asif Dhanani Seung Yeon Lee Phitchaya Phothilimthana Zachary Pardos Electrical Engineering and Computer Sciences

More information

Computer Security Course. Midterm Review

Computer Security Course. Midterm Review Computer Security Course. Dawn Song Midterm Review In class: Logistics On time: 4:10-5:30pm Wed 1 8x11 page cheat sheet allowed Special requirements: see TA Part I, II, III Scope Software Security Secure

More information

Symbolic Execution. Joe Hendrix Galois, Inc SMT Summer School galois

Symbolic Execution. Joe Hendrix Galois, Inc SMT Summer School galois Symbolic Execution Joe Hendrix Galois, Inc SMT Summer School 2015 Galois, Inc We solve hard research problems for clients. Symbolic Execution is a technique for mapping code into logic. is widely used

More information

Leveraging Data Invariants in Model Inference for Test Case Generation

Leveraging Data Invariants in Model Inference for Test Case Generation Leveraging Data Invariants in Model Inference for Test Case Generation Roykrong Sukkerd Abstract Testing is an effective mean to find bugs in systems, but manually writing test cases is often tedious.

More information

Testing, Fuzzing, & Symbolic Execution

Testing, Fuzzing, & Symbolic Execution Testing, Fuzzing, & Symbolic Execution Software Testing The most common way of measuring & ensuring correctness Input 2 Software Testing The most common way of measuring & ensuring correctness Input Observed

More information

Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa, Ling Lu, Wen Jiao

Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa, Ling Lu, Wen Jiao 6th International Conference on Information Engineering for Mechanics and Materials (ICIMM 2016) Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa,

More information

Chapter 9. Software Testing

Chapter 9. Software Testing Chapter 9. Software Testing Table of Contents Objectives... 1 Introduction to software testing... 1 The testers... 2 The developers... 2 An independent testing team... 2 The customer... 2 Principles of

More information

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013! Testing Prof. Leon Osterweil CS 520/620 Spring 2013 Relations and Analysis A software product consists of A collection of (types of) artifacts Related to each other by myriad Relations The relations are

More information

Directed symbolic execution

Directed symbolic execution Directed symbolic execution Kin-Keung Ma, Khoo Yit Phang, Jeffrey S. Foster, and Michael Hicks Computer Science Department, University of Maryland, College Park {kkma,khooyp,jfoster,mwh}@cs.umd.edu Technical

More information

6.034 Notes: Section 3.1

6.034 Notes: Section 3.1 6.034 Notes: Section 3.1 Slide 3.1.1 In this presentation, we'll take a look at the class of problems called Constraint Satisfaction Problems (CSPs). CSPs arise in many application areas: they can be used

More information

JMLCUTE: Automated JML-Based Unit Test Case Generation

JMLCUTE: Automated JML-Based Unit Test Case Generation JMLCUTE: Automated JML-Based Unit Test Case Generation Rafael Baltazar Instituto Superior Tecnico, Lisboa, Portugal, rafael.baltazar@tecnico.ulisboa.pt Abstract. A formal specification is the detailed

More information

Query Likelihood with Negative Query Generation

Query Likelihood with Negative Query Generation Query Likelihood with Negative Query Generation Yuanhua Lv Department of Computer Science University of Illinois at Urbana-Champaign Urbana, IL 61801 ylv2@uiuc.edu ChengXiang Zhai Department of Computer

More information

Lecture 15 Software Testing

Lecture 15 Software Testing Lecture 15 Software Testing Includes slides from the companion website for Sommerville, Software Engineering, 10/e. Pearson Higher Education, 2016. All rights reserved. Used with permission. Topics covered

More information

CMSC 430 Introduction to Compilers. Fall Symbolic Execution

CMSC 430 Introduction to Compilers. Fall Symbolic Execution CMSC 430 Introduction to Compilers Fall 2015 Symbolic Execution Introduction Static analysis is great Lots of interesting ideas and tools Commercial companies sell, use static analysis It all looks good

More information

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I ECE 587 Hardware/Software Co-Design Spring 2018 1/23 ECE 587 Hardware/Software Co-Design Lecture 11 Verification I Professor Jia Wang Department of Electrical and Computer Engineering Illinois Institute

More information

DART: Directed Automated Random Testing. CUTE: Concolic Unit Testing Engine. Slide Source: Koushik Sen from Berkeley

DART: Directed Automated Random Testing. CUTE: Concolic Unit Testing Engine. Slide Source: Koushik Sen from Berkeley DAR: Directed Automated Random esting CUE: Concolic Unit esting Engine Slide Source: Koushik Sen from Berkeley Verification and esting We would like to prove programs correct Verification and esting We

More information

Program Partitioning - A Framework for Combining Static and Dynamic Analysis

Program Partitioning - A Framework for Combining Static and Dynamic Analysis Program Partitioning - A Framework for Combining Static and Dynamic Analysis Pankaj Jalote, Vipindeep V, Taranbir Singh, Prateek Jain Department of Computer Science and Engineering Indian Institute of

More information

Rubicon: Scalable Bounded Verification of Web Applications

Rubicon: Scalable Bounded Verification of Web Applications Joseph P. Near Research Statement My research focuses on developing domain-specific static analyses to improve software security and reliability. In contrast to existing approaches, my techniques leverage

More information

Massively Parallel Seesaw Search for MAX-SAT

Massively Parallel Seesaw Search for MAX-SAT Massively Parallel Seesaw Search for MAX-SAT Harshad Paradkar Rochester Institute of Technology hp7212@rit.edu Prof. Alan Kaminsky (Advisor) Rochester Institute of Technology ark@cs.rit.edu Abstract The

More information

Automated Software Testing

Automated Software Testing Automated Software Testing for the 21 st Century Patrice Godefroid Microsoft Research Page 1 June 2015 Outline Two parts: 1. Some recent advances on automated software testing Technical developments Applications

More information

From Z3 to Lean, Efficient Verification

From Z3 to Lean, Efficient Verification From Z3 to Lean, Efficient Verification Turing Gateway to Mathematics, 19 July 2017 Leonardo de Moura, Microsoft Research Joint work with Nikolaj Bjorner and Christoph Wintersteiger Satisfiability Solution/Model

More information

Static Analysis of C++ Projects with CodeSonar

Static Analysis of C++ Projects with CodeSonar Static Analysis of C++ Projects with CodeSonar John Plaice, Senior Scientist, GrammaTech jplaice@grammatech.com 25 July 2017, Meetup C++ de Montréal Abstract Static program analysis consists of the analysis

More information

Automatic Software Verification

Automatic Software Verification Automatic Software Verification Instructor: Mooly Sagiv TA: Oded Padon Slides from Eran Yahav and the Noun Project, Wikipedia Course Requirements Summarize one lecture 10% one lecture notes 45% homework

More information

Appendix to The Health of Software Engineering Research

Appendix to The Health of Software Engineering Research Appendix to The Health of Software Engineering Research David Lo School of Information Systems Singapore Management University Singapore davidlo@smu.edu.sg Nachiappan Nagappan and Thomas Zimmermann Research

More information

Automatically Locating software Errors using Interesting Value Mapping Pair (IVMP)

Automatically Locating software Errors using Interesting Value Mapping Pair (IVMP) 71 Automatically Locating software Errors using Interesting Value Mapping Pair (IVMP) Ajai Kumar 1, Anil Kumar 2, Deepti Tak 3, Sonam Pal 4, 1,2 Sr. Lecturer, Krishna Institute of Management & Technology,

More information

6 ways to statically find software bugs. Gang Fan

6 ways to statically find software bugs. Gang Fan 6 ways to statically find software bugs Gang Fan S Outline S What bugs? S Why statically? S Six ways to find bugs: S Pattern matching S Inconsistency S IFDS S Value flow graph S Backward symbolic analysis

More information

Exercises Computational Complexity

Exercises Computational Complexity Exercises Computational Complexity March 22, 2017 Exercises marked with a are more difficult. 1 Chapter 7, P and NP Exercise 1. Suppose some pancakes are stacked on a surface such that no two pancakes

More information

Fitness-Guided Path Exploration in Dynamic Symbolic Execution

Fitness-Guided Path Exploration in Dynamic Symbolic Execution Fitness-Guided Path Exploration in Dynamic Symbolic Execution Tao Xie 1 Nikolai Tillmann 2 Jonathan de Halleux 2 Wolfram Schulte 2 1 Department of Computer Science, North Carolina State University, NC

More information

HAMPI A Solver for String Theories

HAMPI A Solver for String Theories HAMPI A Solver for String Theories Vijay Ganesh MIT (With Adam Kiezun, Philip Guo, Pieter Hooimeijer and Mike Ernst) Dagstuhl, 2010 Motivation for String Theories String-manipulating programs ü String

More information

Constraint Solving Challenges in Dynamic Symbolic Execution. Cristian Cadar. Department of Computing Imperial College London

Constraint Solving Challenges in Dynamic Symbolic Execution. Cristian Cadar. Department of Computing Imperial College London Constraint Solving Challenges in Dynamic Symbolic Execution Cristian Cadar Department of Computing Imperial College London Joint work with Dawson Engler, Daniel Dunbar Peter Collingbourne, Paul Kelly,

More information

Dynamic Symbolic Execution using Eclipse CDT

Dynamic Symbolic Execution using Eclipse CDT Dynamic Symbolic Execution using Eclipse CDT Andreas Ibing Chair for IT Security TU München Boltzmannstrasse 3, 85748 Garching, Germany Email: andreas.ibing@tum.de Abstract Finding software bugs before

More information

KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs

KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs Cristian Cadar, Daniel Dunbar, Dawson Engler Stanford University Abstract We present a new symbolic execution

More information

Software security, secure programming

Software security, secure programming Software security, secure programming Fuzzing and Dynamic Analysis Master on Cybersecurity Master MoSiG Academic Year 2017-2018 Outline Fuzzing (or how to cheaply produce useful program inputs) A concrete

More information

1.1 For Fun and Profit. 1.2 Common Techniques. My Preferred Techniques

1.1 For Fun and Profit. 1.2 Common Techniques. My Preferred Techniques 1 Bug Hunting Bug hunting is the process of finding bugs in software or hardware. In this book, however, the term bug hunting will be used specifically to describe the process of finding security-critical

More information

Test Generation Using Symbolic Execution

Test Generation Using Symbolic Execution Test Generation Using Symbolic Execution Patrice Godefroid Microsoft Research pg@microsoft.com Abstract This paper presents a short introduction to automatic code-driven test generation using symbolic

More information

Symbolic Execution in Difficult Environments

Symbolic Execution in Difficult Environments 15-745 Optimizing Compilers Project Final Report Symbolic Execution in Difficult Environments David Renshaw renshaw@cmu.edu Soonho Kong soonhok@cs.cmu.edu April 28, 2011 1 Introduction 1.1 Problem / Opportunity

More information

Symbolic Execution of Virtual Devices

Symbolic Execution of Virtual Devices 2013 13th International Conference on Quality Software Symbolic Execution of Virtual Devices Kai Cong, Fei Xie, and Li Lei Department of Computer Science Portland State University Portland, OR 97207, USA

More information

MultiSE: Multi-path Symbolic Execution using Value Summaries

MultiSE: Multi-path Symbolic Execution using Value Summaries MultiSE: Multi-path Symbolic Execution using Value Summaries Koushik Sen, George Necula, Liang Gong, Wontae Choi EECS Department, University of California, Berkeley, USA { ksen, necula, gongliang13, wtchoi

More information

Programming Languages and Compilers Qualifying Examination. Answer 4 of 6 questions.

Programming Languages and Compilers Qualifying Examination. Answer 4 of 6 questions. Programming Languages and Compilers Qualifying Examination Fall 2017 Answer 4 of 6 questions. GENERAL INSTRUCTIONS 1. Answer each question in a separate book. 2. Indicate on the cover of each book the

More information

Testing & Symbolic Execution

Testing & Symbolic Execution Testing & Symbolic Execution Software Testing The most common way of measuring & ensuring correctness Input 2 Software Testing The most common way of measuring & ensuring correctness Input Observed Behavior

More information

Three Important Testing Questions

Three Important Testing Questions Testing Part 2 1 Three Important Testing Questions How shall we generate/select test cases? Did this test execution succeed or fail? How do we know when we ve tested enough? 65 1. How do we know when we

More information

6.001 Notes: Section 31.1

6.001 Notes: Section 31.1 6.001 Notes: Section 31.1 Slide 31.1.1 In previous lectures we have seen a number of important themes, which relate to designing code for complex systems. One was the idea of proof by induction, meaning

More information

Improving Program Testing and Understanding via Symbolic Execution

Improving Program Testing and Understanding via Symbolic Execution Improving Program Testing and Understanding via Symbolic Execution Kin-Keung Ma PhD Dissertation Defense December 9 th, 2011 Motivation } Every year, billions of dollars are lost due to software system

More information

A Backtracking Symbolic Execution Engine with Sound Path Merging

A Backtracking Symbolic Execution Engine with Sound Path Merging A Backtracking Symbolic Execution Engine with Sound Path Merging Andreas Ibing Chair for IT Security TU München, Germany Email: andreas.ibing@tum.de Abstract Software vulnerabilities are a major security

More information

CS 520 Theory and Practice of Software Engineering Fall 2018

CS 520 Theory and Practice of Software Engineering Fall 2018 Today CS 52 Theory and Practice of Software Engineering Fall 218 Software testing October 11, 218 Introduction to software testing Blackbox vs. whitebox testing Unit testing (vs. integration vs. system

More information

LATEST : Lazy Dynamic Test Input Generation

LATEST : Lazy Dynamic Test Input Generation LATEST : Lazy Dynamic Test Input Generation Rupak Majumdar Koushik Sen Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No. UCB/EECS-2007-36 http://www.eecs.berkeley.edu/pubs/techrpts/2007/eecs-2007-36.html

More information

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur Module 4 Constraint satisfaction problems Lesson 10 Constraint satisfaction problems - II 4.5 Variable and Value Ordering A search algorithm for constraint satisfaction requires the order in which variables

More information

KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs

KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs Cristian Cadar, Daniel Dunbar, Dawson Engler Stanford University Abstract We present a new symbolic execution

More information

Outline. Introduction SDV Motivation Model vs Real Implementation SLIC SDVRP SLAM-2 Comparisons Conclusions

Outline. Introduction SDV Motivation Model vs Real Implementation SLIC SDVRP SLAM-2 Comparisons Conclusions Outline Introduction SDV Motivation Model vs Real Implementation SIC SDVRP SAM-2 Comparisons Conclusions SDV Research Platform Academic release of SDV (Static Driver Verifier), based on the code that ships

More information

CS/ECE 5780/6780: Embedded System Design

CS/ECE 5780/6780: Embedded System Design CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 18: Introduction to Verification What is verification? Verification: A process that determines if the design conforms to the specification.

More information

Unit Testing as Hypothesis Testing

Unit Testing as Hypothesis Testing Unit Testing as Hypothesis Testing Jonathan Clark September 19, 2012 5 minutes You should test your code. Why? To find bugs. Even for seasoned programmers, bugs are an inevitable reality. Today, we ll

More information

Concolic Fault Abstraction

Concolic Fault Abstraction Concolic Fault Abstraction Chanseok Oh New York University Email: chanseok@cs.nyu.edu Martin Schäf SRI International Email: martin.schaef@sri.com Daniel Schwartz-Narbonne New York University Email: dsn@cs.nyu.edu

More information

CS2 Language Processing note 3

CS2 Language Processing note 3 CS2 Language Processing note 3 CS2Ah 5..4 CS2 Language Processing note 3 Nondeterministic finite automata In this lecture we look at nondeterministic finite automata and prove the Conversion Theorem, which

More information

Introduction to optimizations. CS Compiler Design. Phases inside the compiler. Optimization. Introduction to Optimizations. V.

Introduction to optimizations. CS Compiler Design. Phases inside the compiler. Optimization. Introduction to Optimizations. V. Introduction to optimizations CS3300 - Compiler Design Introduction to Optimizations V. Krishna Nandivada IIT Madras Copyright c 2018 by Antony L. Hosking. Permission to make digital or hard copies of

More information

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps Oliver Cardwell, Ramakrishnan Mukundan Department of Computer Science and Software Engineering University of Canterbury

More information

Security Testing. Ulf Kargén Department of Computer and Information Science (IDA) Division for Database and Information Techniques (ADIT)

Security Testing. Ulf Kargén Department of Computer and Information Science (IDA) Division for Database and Information Techniques (ADIT) Security Testing TDDC90 Software Security Ulf Kargén Department of Computer and Information Science (IDA) Division for Database and Information Techniques (ADIT) Security testing vs regular testing Regular

More information

Program Correctness and Efficiency. Chapter 2

Program Correctness and Efficiency. Chapter 2 Program Correctness and Efficiency Chapter 2 Chapter Objectives To understand the differences between the three categories of program errors To understand the effect of an uncaught exception and why you

More information

Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM

Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM Hyunchul Seok Daejeon, Korea hcseok@core.kaist.ac.kr Youngwoo Park Daejeon, Korea ywpark@core.kaist.ac.kr Kyu Ho Park Deajeon,

More information