Giter VIP home page Giter VIP logo

afl-pin's Introduction

Intro

This is the fastest pintool afl-fuzzer out there currently. And it runs with pintool 3.6, so 4.x x64 kernels are fine. But ... pintool is super slow. So this is basically only if you have no other option. I am currently developing an alternative with DynamoRIO and is 10x faster - but still, afl qemu mode is 5-10x faster than that ...

Installation

  1. download, compile and install afl => https://github.com/vanhauser-thc/AFLplusplus Optional: 2. download, compile and install dyninst => https://github.com/dyninst/dyninst Optional: 3. download, compile and install afl-dyninst => https://github.com/vanhauser-thc/afl-dyninst
  2. download and unpack pin => https://software.intel.com/en-us/articles/pintool-downloads (download 3.6 or 3.7) => NOTE: version 3.10 does not work because the API changed!
  3. export PIN_ROOT=/path/to/pin directory
  4. make a symlink to the afl folder in the afl-pin directory named "afl" , e.g. "ln -s ../afl-2.52b afl"
  5. make
  6. make install

Options

-libs also instrument the dynamic libraries -exitpoint target exit the program when this address/function is reached. speeeed! -forkserver install a forkserver. You must set PIN_APP_LD_PRELOAD - or use afl-fuzz-pin.sh -entrypoint target function or address where you want to install the forkserver -alternative a little bit faster but less quality

How to run

Optional: 1. afl-dyninst.sh -i program -o program_instrumented -D It is a good idea to add -e and -E with well selected function addresses to make the fuzzing faster

  1. afl-fuzz-pin.sh [normal afl-fuzz options] If you did not do step 1, add the option -forkserver (-forkserver is faster than afl-dyninst). You can increase speed more by selecting a good "-entrypoint function_name" or "-entrypoing 0x123456" location. That's it! If you fuzzing does not run, afl-fuzz might need more memory, set AFL_MEM to a high value, e.g. 700 for 700MB Using -forkserver requires PIN_APP_LD_PRELOAD=/usr/local/lib/pintool/forkserver.so but afl-fuzz-pin.sh takes care of this.

When to use it

When you have no source code, normal afl-dyninst is crashing the binary, qemu mode -Q is not an option and dynamorio is not working either. Pin is even 90% slower than my dynamorio implementation ...

Limitations

Pin is super slow ... it is the tool of last resort on x86/x64.

Who and where

Marc "van Hauser" Heuse [email protected] || [email protected] https://github.com/vanhauser-thc/afl-pin

afl-pin's People

Contributors

vanhauser-thc avatar

Watchers

James Cloos 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.