[Paper Review] Faster Fuzzing: Reinitialization with Deep Neural Models
This paper proposes enhancing the American Fuzzy Lop (AFL) fuzzer by using Generative Adversarial Networks (GANs) to reinitialize fuzzing with synthetic seed files derived from real AFL-generated inputs. The GAN-based reinitialization discovered 14.23% more unique code paths and 6.16% more novel paths than random reinitialization in the same CPU time, while also uncovering paths 13.84% longer on average, demonstrating superior performance in exploring deeper code paths.
We improve the performance of the American Fuzzy Lop (AFL) fuzz testing framework by using Generative Adversarial Network (GAN) models to reinitialize the system with novel seed files. We assess performance based on the temporal rate at which we produce novel and unseen code paths. We compare this approach to seed file generation from a random draw of bytes observed in the training seed files. The code path lengths and variations were not sufficiently diverse to fully replace AFL input generation. However, augmenting native AFL with these additional code paths demonstrated improvements over AFL alone. Specifically, experiments showed the GAN was faster and more effective than the LSTM and out-performed a random augmentation strategy, as measured by the number of unique code paths discovered. GAN helps AFL discover 14.23% more code paths than the random strategy in the same amount of CPU time, finds 6.16% more unique code paths, and finds paths that are on average 13.84% longer. Using GAN shows promise as a reinitialization strategy for AFL to help the fuzzer exercise deep paths in software.
Motivation & Objective
- To improve the efficiency of AFL fuzzing by accelerating the discovery of novel and deep code paths.
- To evaluate whether deep generative models like GANs and LSTMs can outperform random seed generation in reinitializing AFL.
- To determine if synthetic seed files from generative models can effectively augment AFL without replacing its native mutation-based exploration.
- To quantify the performance gains of GAN-based reinitialization over random and LSTM-based strategies in terms of code path diversity and depth.
- To explore the feasibility of using unsupervised deep learning to scale up fuzzing efficiency with minimal manual input or format analysis.
Proposed method
- Train a GAN on AFL-generated seed files to learn the distribution of input data that trigger unique code paths.
- Use the trained GAN generator to produce synthetic seed files for reinitializing AFL, which are then injected into the AFL working directory.
- Compare the GAN-generated seeds against random byte sampling and LSTM-generated seeds in terms of code path discovery rate and diversity.
- Measure performance using metrics such as unique code path count, path length, and time-to-discovery over 24-hour fuzzing campaigns.
- Use Keras to train both LSTM and GAN models on concatenated AFL seed files, with temperature tuning for LSTM output diversity.
- Apply AFL’s compiler instrumentation and genetic mutation framework, with periodic reinitialization using synthetic seeds to escape local optima.
Experimental results
Research questions
- RQ1Can GAN-generated seed files improve the rate of unique code path discovery in AFL compared to random or LSTM-based reinitialization?
- RQ2Does the use of deep generative models lead to the discovery of longer and more deeply nested code paths in software under test?
- RQ3How does the training time of GANs and LSTMs compare to the time saved in fuzzing when using their synthetic seeds?
- RQ4To what extent do synthetic seed files from GANs and LSTMs reflect the statistical distribution of real AFL-generated inputs in terms of code path length and variance?
- RQ5Can unsupervised deep learning models effectively augment AFL without requiring manual format analysis or program state exposure?
Key findings
- The GAN-based reinitialization strategy discovered 14.23% more unique code paths per second than the random reinitialization strategy in a 24-hour fuzzing run.
- GAN reinitialization found 6.16% more novel code paths—those not present in the initial AFL run—than the random strategy, indicating improved exploration of uncharted code regions.
- The average code path length discovered using GAN-generated seeds was 13.84% longer than with random reinitialization, suggesting better traversal of deep program logic.
- GAN training took approximately 30 minutes, significantly faster than the 14-hour training time required for the LSTM model, which also underperformed in path discovery.
- LSTM-generated seeds were less effective than both GAN and random strategies, with a 28.7% lower code path discovery rate and 29.5% lower novel path rate than GAN.
- Synthetic seed files from both GAN and LSTM did not match the mean and variance of code path lengths from native AFL, indicating they should be used as augmentation, not replacement, for AFL’s native mutation strategy.
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.