Deep Learning Guided Directed Fuzzing

Deep Learning Guided Directed Fuzzing

DeFuzz: Deep Learning Guided Directed Fuzzing 1st Xiaogang Zhu 2nd Shigang Liu 3rd Xian Li Swinburne University Of Technology Swinburne University Of Technology Swinburne University Of Technology Melbourne, VIC, Australia Melbourne, VIC, Australia Melbourne, VIC, Australia [email protected] [email protected] [email protected] 4th Sheng Wen 5th Jun Zhang 6th Camtepe Seyit Swinburne University Of Technology Swinburne University Of Technology CSIRO & DATA61 Melbourne, VIC, Australia Melbourne, VIC, Australia Marsfield, NSW, Australia [email protected] [email protected] [email protected] 6th Yang Xiang Swinburne University Of Technology Melbourne, VIC, Australia [email protected] Abstract—Fuzzing is one of the most effective technique to the increasing size of the real-world programs [6]. Moreover, identify potential software vulnerabilities. Most of the fuzzers aim previous study showed that vulnerable functions usually come to improve the code coverage, and there is lack of directedness from a small part of the whole program. To address these (e.g., fuzz the specified path in a software). In this paper, we proposed a deep learning (DL) guided directed fuzzing problems, directed greybox fuzzing, which uses the inputs that for software vulnerability detection, named DeFuzz. DeFuzz are generated with the objective of reaching specific locations, includes two main schemes: (1) we employ a pre-trained DL has been developed. Nevertheless, greybox fuzzing usually prediction model to identify the potentially vulnerable functions has the problem that it cannot be effectively directed [7]. and the locations (i.e., vulnerable addresses). Precisely, we employ Therefore, there is still necessary to research into the directed Bidirectional-LSTM (BiLSTM) to identify attention words, and the vulnerabilities are associated with these attention words in fuzzing, which can fuzz the specific targeted locations with functions. (2) then we employ directly fuzzing to fuzz the potential less of resources. vulnerabilities by generating inputs that tend to arrive the In this work, we take the advantages of deep learning [8], predicted locations. To evaluate the effectiveness and practical of and developed a deep learning directed fuzzing for bugs iden- the proposed DeFuzz technique, we have conducted experiments tification. Deep learning has shown successful in software vul- on real-world data sets. Experimental results show that our DeFuzz can discover coverage more and faster than AFL. nerability detection [9], [10], specifically in learning the high- Moreover, DeFuzz exposes 43 more bugs than AFL on real-world level representations for both vulnerable and not-vulnerable applications. programming features. The high-level representations usually Index Terms—fuzz testing, deep learning, software security, contains richer useful information than the generic hand- vulnerability, static analysis, dynamic analysis crafted features [11]. However, deep learning-based techniques usually has high false positives (e.g., more than 20%) [11], [9], I. INTRODUCTION [10]. In this work, we employ deep learning to identify the Computer software is a crucial part of the modern world. potential vulnerable functions and the vulnerability locations. The software makes the world become smart than before. Then we run the directed fuzzing to fuzz the vulnerable arXiv:2010.12149v1 [cs.CR] 23 Oct 2020 However, cyber threats attributed to vulnerabilities in software locations to reduce the false positive rate. are becoming a serious security problem [1]. For example, it Specifically, given a software program, we first extract is estimated that it will cost $6 trillion to combat cybercrime functions from the program, and then we extract Abstract by 2021, which is double of the cost in 2015. Therefore, the Syntax Trees (ASTs) for each function. The ASTs we collected vulnerabilities in the software should be ideally identified and will be used as the training samples. The training samples fixed before the software get deployed. are from LibTIFF, LibPNG, and FFmpeg, which are three Many algorithms have been developed for software vulner- open-source projects. We label the vulnerable functions by ability detection [2], [3], [4]. Among these techniques, fuzzing following the Common Vulnerability and Exposures and the is one of the most effective approach to identify potential National Vulnerability Database. The assumption is that if software vulnerabilities [5]. However, fuzzing has the problem there are at least one vulnerability in the function, then the of time-consuming because it identify bugs using randomly function will be labeled as vulnerable, otherwise, it will be generated inputs. Fuzz testing usually hard to arrive all the labeled as not vulnerable. Then, we train an attention-based code coverage given a real-world scenario. For example, it deep learning model using the ground truth. The pre-trained is very hard to generate inputs for some sanity checks with model will be applied to the test cases (i.e., a piece of program or a software program). The outputs will be the locations of Meanwhile, deep learning has been widely accepted and the potential vulnerabilities (the vulnerabilities are associated applied for software vulnerability detection. This is because with these attention words in functions). Afterwards, we fuzz deep learning has the capability of learning high-level feature the vulnerable locations using directed fuzzing [12]. We call representations given a program. Lin et al. [22] propose this as deep learning guided directed fuzzing, namely DeFuzz. to employ LSTM for function-level vulnerability detection The main contributions of this work are as follows: based on ASTs. Li et al. [9] consider BiLSTM using code • We propose to employ attention-based deep learning to gadgets as features for software vulnerability detection. Liu highlight code keyword, which will be used to identify et al. [1] realize that there is class imbalance problem [23] the penitential vulnerable locations (i.e., vulnerable ad- in software vulnerability detection, and propose a fuzzy- dresses) for real-world security problems. based oversampling algorithm using ASTs for vulnerability • We propose to use deep learning to guide the directed detection. Furthermore, a deep learning based cross domain fuzzing. When deep learning can successfully predict software detection has been developed [24], this study em- the exact or the neighbours of vulnerability locations, ploys metric transfer learning framework to minimize the directed fuzzing is efficient to detect vulnerabilities. distribution differences between the source domain and target • We conducted experiments on real-world scenarios. Ex- domain. Liu et al. [10] propose to employ attention-based deep perimental results show that the proposed DeFuzz can learning using binary instruction as features for binary-level discover more coverages and faster than AFL. For exam- vulnerability detection. For more information about software ple, DeFuzz exposes 43 more bugs than AFL on real- vulnerability detection using machine, please refer to [25]. world applications. B. Directed Fuzzing II. RELATED WORK Coverage-guided fuzzing is a widely-used fuzzing solution due to its effectiveness [26]–[35]. Coverage-guided fuzzing In this section, we briefly review of the related work aims to cover as much coverage as possible. The assumption from two perspectives: machine learning-based vulnerability is that with more coverage discovered, it has higher chance detection and fuzz testing for software vulnerability discovery. to expose bugs. Driller [34] uses symbolic execution to solve For more information, please refer to [2], [3], [4], [13], [14]. path constrains, which is the major road rock to discover more coverage, for fuzzing. CollAFL [35] improves the coverage A. Machine Learning based vulnerability detection via resolving edge collision. Angora [36] and Matryoshka Machine learning has been widely used for software vulner- [29] regard a single path constraint as a black-box function, ability detection. Morrison et al. [36] investigate the machine and use gradient descent to bypass the path constraint. As learning techniques for software vulnerability identification, some path constraints compare variables with constant val- their study show that machine learning techniques is useful ues, REDQUEEN [31] uses the constant values to bypass in vulnerability detection. However, the classification perfor- constraints. The mutation of the entire input for a program mance based on source code usually performs better than requires much time. Therefore, GREYONE [27] first finds the binary code level. relation between input bytes and path constraints, and then Machine learning techniques for software vulnerability de- only mutates the related bytes. This solution largely reduce tection can be divided into two stages: feature learning, and the searching space of input. As the random nature of fuzzing, model building. Feature learning is a case by case process. the execution speed is critical for fuzzing. Full-speed fuzzing For example, Shar and Tan [15] propose to consider static [28] improves the execution speed of fuzzing via only tracing code attributes for model building to predict specific pro- execution that discovers new coverage. Although coverage- gram statements for SQL injection and cross site scripting. guided fuzzing has achieved a great success, it has problems to Yamaguchi et al. [16] propose to use clustering algorithms detect

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us