Code Monkey home page Code Monkey logo

afl-libprotobuf-mutator's Introduction

afl-libprotobuf-mutator

Example/skeleton for using libprotobuf-mutator together with AFL.

Usage

  1. Download and compile AFLplusplus
  2. Put your protobuffer in gen/out.proto
  3. Write your own protobuffer-message-to-raw-data methods
  4. export AFL_CUSTOM_MUTATOR_ONLY=1
  5. export AFL_CUSTOM_MUTATOR_LIBRARY=./mutator.so

The current implementation turns enum values into bytes. It was an experiment in encoding regexps as protobuffers. Unfortunately, PBs are not powerful enough to do that.

Full Example

export AFL_CUSTOM_MUTATOR_ONLY=1
export AFL_CUSTOM_MUTATOR_LIBRARY=./mutator.so
afl-fuzz -i /tmp/in -o /tmp/out -Q -- ./dumper @@

In order to dump/verify the content of the protobuffers:

for f in /tmp/out/queue/id*src*; do echo "== $f =="; ./dumper $f; done

Install

./build.sh
make

Missing Features

  • AFLplusplus doesn't yet provide a custom splicing hook, so we can't mix two protobuffers
    • I have a custom version on my PC but I'm not sure it's bug-free so I won't push it for the time being
  • honggfuzz has support for external mutators/postprocessors, so it should be trivial to add support (maybe it'll be a little bit slower do to I/O)

afl-libprotobuf-mutator's People

Contributors

thebabush avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.