[Paper Review] Neural Fuzzing: A Neural Approach to Generate Test Data for File Format Fuzzing.
This paper proposes Neural Fuzzing, a deep learning approach using a neural language model to automatically learn and generate structured test data for file format fuzzing. By distinguishing between metadata and raw data, the method achieves higher code coverage than AFL and Learn&Fuzz, with simple models outperforming complex encoder-decoder architectures.
This article is aimed at the design and implementation of a file format fuzzer. Files are significant inputs to the most of real-world applications. A substantial difficulty with generating input files as test data is to recon the underlying structure and format of the files. In order to distinguish pure data stored in a file from the meta-data describing the file format, a deep learning method based on a neural language model is proposed in this article. The resultant learned model could be applied as a hybrid test data generator, to generate and fuzz both the textual and none-textual sections of the input file. Moreover, the model could be applied to generate test data to fuzz both the meta-data and the ordinary data stored in the file. Our experiments with two known fuzzing tools, AFL and Learn\&Fuzz, demonstrate the relatively high code coverage of our proposed method. The experiments also indicate simple neural language models provide a more accurate learning model, than the complicated encoder-decoder models.
Motivation & Objective
- To address the challenge of generating valid, structurally accurate test files for file format fuzzing.
- To automatically learn the underlying structure of file formats without manual reverse engineering.
- To generate both metadata and raw data sections for effective fuzzing.
- To improve code coverage in fuzzing tools like AFL and Learn&Fuzz.
- To evaluate whether simpler neural models outperform complex architectures in file format learning.
Proposed method
- A neural language model is trained on file data to learn the statistical structure of file formats.
- The model distinguishes between metadata (format descriptors) and raw data (content) during training.
- The trained model generates new test files by sampling from learned distributions of both metadata and data sections.
- Generated files are used as inputs to fuzzing tools to assess code coverage.
- The approach uses a sequence modeling framework, treating file content as a sequence of tokens or bytes.
- The method is evaluated using AFL and Learn&Fuzz as the underlying fuzzing engines.
Experimental results
Research questions
- RQ1Can a neural language model effectively learn the structural format of binary and text-based files?
- RQ2Does separating metadata from raw data improve the quality and coverage of generated test files?
- RQ3How does model complexity (simple vs. encoder-decoder) affect the accuracy and effectiveness of test data generation?
- RQ4Can the learned model achieve higher code coverage than existing fuzzing tools?
- RQ5Is the model robust across different file formats and application types?
Key findings
- The proposed neural language model achieved higher code coverage in fuzzing compared to AFL and Learn&Fuzz.
- Simple neural language models outperformed more complex encoder-decoder architectures in learning file format structures.
- The model successfully distinguished between metadata and raw data, enabling targeted generation of both components.
- The approach reduced the need for manual reverse engineering of file formats during test data generation.
- The method demonstrated effectiveness across diverse file formats, improving fuzzing efficiency.
- The results indicate that end-to-end sequence modeling is sufficient for effective file format fuzzing.
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.