Abstract
Grey-box fuzzers such as American Fuzzy Lop (AFL) are popular tools for finding bugs and potential vulnerabilities in programs. While these fuzzers have been able to find vulnerabilities in many widely used programs, they are not efficient; of the millions of inputs executed by AFL in a typical fuzzing run, only a handful discover unseen behavior or trigger a crash. The remaining inputs are redundant, exhibiting behavior that has already been observed. Here, we present an approach to increase the efficiency of fuzzers like AFL by applying machine learning to directly model how programs behave. We learn a forward prediction model that maps program inputs to execution traces, training on the thousands of inputs collected during standard fuzzing. This learned model guides exploration by focusing on fuzzing inputs on which our model is the most uncertain (measured via the entropy of the predicted execution trace distribution). By focusing on executing inputs our learned model is unsure about, and ignoring any input whose behavior our model is certain about, we show that we can significantly limit wasteful execution. Through testing our approach on a set of binaries released as part of the DARPA Cyber Grand Challenge, we show that our approach is able to find a set of inputs that result in more code coverage and discovered crashes than baseline fuzzers with significantly fewer executions.
Introduction
Fuzzing is a cornerstone of automated software testing, where a tool generates millions of random or mutated inputs to find crashes and vulnerabilities. Grey-box fuzzers, such as American Fuzzy Lop (AFL), have become the industry standard due to their high execution speed. Unlike "white-box" tools that perform heavy program analysis, grey-box fuzzers rely on lightweight instrumentation to detect if an input reaches a new code path.
However, this speed comes at the cost of efficiency. In a typical fuzzing run, only a tiny fraction of generated inputs discover new behavior; the vast majority are redundant, executing paths already explored thousands of times. This "wasteful execution" consumes significant CPU resources. This paper proposes a machine learning-based filtering layer to bridge the gap between fast "dumb" fuzzers and slow "smart" symbolic execution tools, effectively giving the fuzzer a "brain" to predict which inputs are worth executing.
Methodology
The proposed system treats program behavior as a supervised learning problem, integrating a predictive model into the fuzzing loop to filter out redundant inputs.
The pipeline consists of five main stages:
- Generation: AFL’s mutation engine creates a large batch of candidate inputs.
- Featurization: Raw byte strings are converted into numerical features using byte bigrams (counts of every possible pair of bytes), capturing the local structure of the input.
- Path Prediction: A Multinomial Logistic Regression model uses these bigram counts to predict a probability distribution over known execution paths.
- Uncertainty Scoring: The system calculates the entropy of the model’s prediction. Low entropy indicates the model is certain about the outcome (likely a redundant path), while high entropy suggests the model is "confused," indicating a higher likelihood of triggering new behavior.
- Execution & Retraining: The fuzzer executes only the top fraction of inputs with the highest entropy. The resulting execution traces are then used to retrain the model, creating an active learning loop.
Experimental Evaluation
The researchers evaluated their approach using a subset of 24 programs from the DARPA Cyber Grand Challenge (CGC) Binaries. These programs are designed to benchmark automated bug-finding tools and contain human-written vulnerabilities that mimic real-world software flaws. The binaries were compiled for x86 Linux to ensure compatibility with standard AFL.
The ML-guided approach was compared against three baselines: standard AFL (FidgetyAFL), a batched version of AFL, and a version that selects inputs randomly.
Results and Discussion
The core insight of this work is that uncertainty can serve as a powerful proxy for novelty. By focusing on inputs where the model is most unsure, the fuzzer naturally selects the most informative data for both discovering new code paths and improving the model itself.
Key findings include:
- Superior Coverage: At the 50,000 execution mark, the ML-guided approach achieved a relative coverage of approximately 81.6%, significantly outperforming standard AFL, which reached 70.6%.
- Efficiency Gains: The performance gap between the ML approach and baselines widened as the fuzzing runs progressed. This suggests that as programs become harder to explore, the model's guidance becomes increasingly valuable.
- Computational Trade-off: Although the ML model introduces overhead, the time saved by skipping thousands of redundant executions far outweighs the cost of logistic regression inference.
Conclusion and Future Work
This research demonstrates that simple machine learning models can significantly improve the efficiency of grey-box fuzzers. By modeling program behavior and prioritizing high-entropy inputs, the system achieves higher code coverage with fewer executions.
Future work could address current limitations, such as the overhead of batching, by moving toward a threshold-based online model for continuous updates. Additionally, exploring more sophisticated features or neural architectures (like Transformers) could help the model understand long-range dependencies in input files. Finally, scaling the approach to massive, multi-million line codebases remains an important next step for validating the generalizability of ML-guided fuzzing.
Summary updated