Font Size: a A A

Research On Key Technologies Of Smart Fuzzing For Java Programs

Posted on:2019-11-01Degree:DoctorType:Dissertation
Country:ChinaCandidate:Z J HuangFull Text:PDF
GTID:1368330611493105Subject:Army commanding learn
Abstract/Summary:PDF Full Text Request
Java is one of the most widely used programming languages today,its feature of being able to ”write once run everywhere” has made it popular in developing various applications.As the number of Java programs evolves,and the complexity of Java program increases,traditional unit testing techniques faces great challenges for being not fit for third-party testing,and low in efficiency.The great success of smart fuzzing has shed lights on Java testing,who alleviates blindness and achieves great improvement in efficiency.Research on the key techniques of smart fuzzing for Java programs will help improve the efficiency of Java program testing,and give a new choice for Java testing.Aims to meet the requirements of improving testcase generation ability,testing efficiency and speed,this thesis works to solve the driver class generation,directed efficient fuzzing on Java programs,and test scheduling problems.The main work and contribution of this paper are summarized as follows:(1)First study on automatic driver class generation for fuzzing Java programs.As Java programs are tested in a unit testing convention,it requires driver class to prepare basic runtime environment.We systematically analyze the problem of automatic driver class generation for fuzzing,and propose a dependency analysis based automatic driver class generation method and implement it into a tool named JDriver.JDriver employs dependency analysis to extract information that what fields are accessed by the method under test(MUT)and what methods can be used to modify target field.With these information,we build method sequences that can be used to mutate the class/instance status so as to explore more paths.We propose a knowledge-based method to make instances for involved parameters.Finally,to adapt to the interface of MUT,we propose an inputfile oriented driver class organization method to make statements for reading contents for the input generated by fuzzing tools and declaring variables for the parameters that are required by the parameters.We evaluate our method on real-world libraries,and results prove JDriver is effective in generating driver class.To the best of our knowledge,we are the first to study this problem.(2)A new efficient approach to fuzzing methods in Java.To fill the gap between present fuzzing tools and Java,as well as solve the fuzzing efficiency problems,we propose a conditional statement tainting based directed fuzzing method.This method starts by formally defining the test input problem for Java programs.It adapts mutationbased fuzzing and overcomes blindness by fuzzing towards branches.For each branch,its variable-level tainting engine solves the constraints in conditional statements,which direct the mutators to generate new inputs to cover unexplored branches.Evaluation on real-world codes proves the method effective in overcoming blindness of fuzzing.It handles well with various Java codes and achieves higher test coverage and execution speed than the state-of-art tool Kelinci.Our tool outperforms Kelinci by 1.70 x to 2.68 x faster in execution speed.(3)A hybrid approach to scheduling tests for Java programs.Methods in Java programs are tested one by one in unit testing style,which costs large amounts of time.To solve this problem,we propose a hybrid method combining static analysis to sort the methods under test and scheduling tests dynamically with execution feedbacks.It finds driver method for private methods and protected methods through building global call graph.By using heuristics,it picks up the methods that are unnecessary for test.The method sorts the methods under test according to a defined priority metric and reorganizes the testing dynamically regarding to the execution feedbacks of path coverage status.Evaluation on real-world libraries proves our method is able to avoid unnecessary test,and it achieves high coverage with less time spent.To the best of knowledge,we are the first to study this question.(4)A novel smart fuzzing platform for Java programs.We presented CuteFuzzer,a brand new smart fuzzing platform for Java programs,implemented with the directed fuzzing techniques as well as testing schedule algorithms proposed above.CuteFuzzer is able to perform static analysis,single method tests as well as software tests,which meets the requirements for most testing scenarios.The core of CuteFuzzer is consisted of more than 9000 lines of Java code.We have not discovered a similar tool.
Keywords/Search Tags:Fuzzing, Java testing, Driver class generation, Taint tracking, Test Scheduling, Smart fuzzing platform
PDF Full Text Request
Related items