StateAFL: Greybox Fuzzing for Stateful Network Servers

Roberto Natella
10/12/2021
cs.CRcs.OScs.SE

Official code: stateafl/stateafl (181 stars, C, Apache-2.0, last commit 2023-05-03).

Abstract

Fuzzing network servers is a technical challenge, since the behavior of the target server depends on its state over a sequence of multiple messages. Existing solutions are costly and difficult to use, as they rely on manually-customized artifacts such as protocol models, protocol parsers, and learning frameworks.

Show full abstract

The aim of this work is to develop a greybox fuzzer (StateaAFL) for network servers that only relies on lightweight analysis of the target program, with no manual customization, in a similar way to what the AFL fuzzer achieved for stateless programs. The proposed fuzzer instruments the target server at compile-time, to insert probes on memory allocations and network I/O operations. At run-time, it infers the current protocol state of the target server by taking snapshots of long-lived memory areas, and by applying a fuzzy hashing algorithm (Locality-Sensitive Hashing) to map memory contents to a unique state identifier. The fuzzer incrementally builds a protocol state machine for guiding fuzzing. We implemented and released StateaAFL as open-source software. As a basis for reproducible experimentation, we integrated StateaAFL with a large set of network servers for popular protocols, with no manual customization to accomodate for the protocol. The experimental results show that the fuzzer can be applied with no manual customization on a large set of network servers for popular protocols, and that it can achieve comparable, or even better code coverage and bug detection than customized fuzzing. Moreover, our qualitative analysis shows that states inferred from memory better reflect the server behavior than only using response codes from messages.

View on arXivView PDF

Code Implementations(1)

stateafl/stateaflOfficial100%
Apache-2.0

StateAFL: A Greybox Fuzzer for Stateful Network Servers

18138C, ShellOct 12, 20213 years agoApache-2.0
fuzzing

Similar Papers

Cite this paper

@article{natella2021stateafl,
  title  = {StateAFL: Greybox Fuzzing for Stateful Network Servers},
  author = {Roberto Natella},
  year   = {2021},
  eprint = {2110.06253},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.06253}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.06253.svg)](https://codeofpaper.com/paper/2110.06253)

Discussion