Skip to main content
QUICK REVIEW

[Paper Review] Not all bytes are equal: Neural byte sieve for fuzzing

Mohit Rajpal, William Blum|arXiv (Cornell University)|Nov 10, 2017
Software Testing and Debugging TechniquesComputer Science13 references81 citations
TL;DR

The paper introduces Augmented-AFL, a neural-guided fuzzing approach that learns to predict useful byte locations to mutate in inputs, improving code coverage, unique code paths, and crashes for several parsers. It integrates neural heatmaps with AFL to focus mutations.

ABSTRACT

Fuzzing is a popular dynamic program analysis technique used to find vulnerabilities in complex software. Fuzzing involves presenting a target program with crafted malicious input designed to cause crashes, buffer overflows, memory errors, and exceptions. Crafting malicious inputs in an efficient manner is a difficult open problem and often the best approach to generating such inputs is through applying uniform random mutations to pre-existing valid inputs (seed files). We present a learning technique that uses neural networks to learn patterns in the input files from past fuzzing explorations to guide future fuzzing explorations. In particular, the neural models learn a function to predict good (and bad) locations in input files to perform fuzzing mutations based on the past mutations and corresponding code coverage information. We implement several neural models including LSTMs and sequence-to-sequence models that can encode variable length input files. We incorporate our models in the state-of-the-art AFL (American Fuzzy Lop) fuzzer and show significant improvements in terms of code coverage, unique code paths, and crashes for various input formats including ELF, PNG, PDF, and XML.

Motivation & Objective

  • Motivate a learning-based approach to guide fuzzing mutations using past exploration and code coverage.
  • Develop neural models that predict which input locations are most likely to yield new code coverage.
  • Integrate the neural heatmap into AFL to veto low-potential mutations and focus efforts.
  • Evaluate across multiple input formats (ELF, PNG, PDF, XML) to assess benefits and limitations.

Proposed method

  • Define a heatmap function f that maps input file positions to the probability of yielding input gain when mutated.
  • Train neural models (LSTM, bidirectional LSTM, Seq2Seq variants with/without attention) to predict the per-byte usefulness heatmap from seed-input and coverage data.
  • Represent input bytes as sequences of bits to capture bit-level structure and use RNN-based architectures to handle variable-length inputs.
  • Augment AFL by querying the neural model before mutations and vetoing mutations that target locations with low predicted usefulness (via a cutoff).
  • Use a training objective based on the difference in code coverage between a seed and its mutated version, approximated by a bitwise strictly-less scoring function on coverage bitmaps.

Experimental results

Research questions

  • RQ1Can neural models predict mutation locations that lead to new code coverage and crashes?
  • RQ2How do different neural architectures (LSTM, Bidirectional LSTM, Seq2Seq, Seq2Seq+Attn) perform in predicting useful mutation locations across formats?
  • RQ3What is the impact of integrating neural heatmaps on code coverage, number of unique code paths, and crashes compared to vanilla AFL?
  • RQ4What formats benefit most from neural-guided fuzzing (ELF, PNG, PDF, XML), and what are the observed limitations?

Key findings

  • Augmented-AFL generally increases code coverage and unique code paths compared with baseline AFL for ELF, PNG, and XML parsers.
  • Augmented-AFL leads to more crashes for ELF and XML parsers than the baseline AFL.
  • Simple, lightweight neural models often outperform more complex architectures in code coverage improvements.
  • Certain formats (e.g., PDF) show limited gains due to model query overhead on large inputs, indicating a trade-off between model latency and fuzzing throughput.
  • Across targets, neural guidance consistently improves input gain (never-seen-before behavior) relative to AFL in several cases.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.