[Paper Review] DeFuzz: Deep Learning Guided Directed Fuzzing
DeFuzz proposes a deep learning-guided directed fuzzing framework that uses a pre-trained BiLSTM model to identify potential vulnerable code locations by analyzing attention words in abstract syntax trees (ASTs) of functions. It then directs AFL-based fuzzing toward these predicted locations, achieving 43% more bug discoveries than AFL on real-world applications while improving code coverage and efficiency.
Fuzzing is one of the most effective technique to identify potential software vulnerabilities. Most of the fuzzers aim to improve the code coverage, and there is lack of directedness (e.g., fuzz the specified path in a software). In this paper, we proposed a deep learning (DL) guided directed fuzzing for software vulnerability detection, named DeFuzz. DeFuzz includes two main schemes: (1) we employ a pre-trained DL prediction model to identify the potentially vulnerable functions and the locations (i.e., vulnerable addresses). Precisely, we employ Bidirectional-LSTM (BiLSTM) to identify attention words, and the vulnerabilities are associated with these attention words in functions. (2) then we employ directly fuzzing to fuzz the potential vulnerabilities by generating inputs that tend to arrive the predicted locations. To evaluate the effectiveness and practical of the proposed DeFuzz technique, we have conducted experiments on real-world data sets. Experimental results show that our DeFuzz can discover coverage more and faster than AFL. Moreover, DeFuzz exposes 43 more bugs than AFL on real-world applications.
Motivation & Objective
- To address the inefficiency of traditional fuzzing in achieving high code coverage and targeting specific vulnerabilities.
- To reduce false positives in vulnerability detection by leveraging deep learning to identify likely vulnerable functions and code locations.
- To improve directed fuzzing efficiency by using attention-based BiLSTM to predict vulnerable addresses from ASTs of software functions.
- To enhance software security testing by combining static analysis (AST extraction) with dynamic, targeted fuzzing.
- To evaluate the effectiveness of deep learning in guiding fuzzing for real-world software vulnerabilities.
Proposed method
- Extract functions and generate Abstract Syntax Trees (ASTs) from source code of open-source projects (LibTIFF, LibPNG, FFmpeg).
- Label functions as vulnerable or not based on Common Vulnerability and Exposures (CVE) and National Vulnerability Database (NVD) records.
- Train an attention-based Bidirectional Long Short-Term Memory (BiLSTM) model on labeled ASTs to identify attention words associated with vulnerabilities.
- Use the trained model to predict potential vulnerable code locations (addresses) in new, unseen software.
- Apply directed fuzzing using AFLgo to target the predicted vulnerable locations, focusing mutation efforts on high-risk code regions.
- Calculate path distances from current execution to target locations using control flow graphs (CFGs) to guide fuzzing direction.
Experimental results
Research questions
- RQ1Can a deep learning model trained on ASTs accurately predict vulnerable code locations in real-world software?
- RQ2Does guiding fuzzing toward predicted vulnerable locations improve code coverage and vulnerability discovery compared to traditional fuzzing?
- RQ3How does DeFuzz compare to AFL in terms of the number of bugs discovered and time to first crash?
- RQ4To what extent do predicted vulnerable locations align with actual bug locations in real-world applications?
- RQ5How effective is the combination of attention-based deep learning and directed fuzzing in reducing false positives and improving vulnerability detection?
Key findings
- DeFuzz discovered 63 bugs across seven real-world applications, compared to only 20 bugs discovered by AFL.
- DeFuzz exposed 43 more bugs than AFL on real-world applications, demonstrating a significant improvement in vulnerability detection.
- On six applications, AFL failed to discover any crashes within 24 hours, while DeFuzz successfully exposed crashes on all six.
- The deep learning model accurately predicted all actual bug locations on seven applications from libming, with predictions within close proximity on gifsponge (e.g., lines 764/802 vs. 771/790).
- DeFuzz achieved faster code coverage and higher efficiency by focusing fuzzing on predicted vulnerable regions rather than random input generation.
- The model detected both out-of-memory and double-free bugs, while AFL only detected out-of-memory bugs, indicating broader vulnerability exposure.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.