GithubHelp home page GithubHelp logo

lucabongiorni / mbedtls-fuzz Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aoncyberlabs/mbedtls-fuzz

0.0 2.0 0.0 54 KB

License: GNU General Public License v2.0

C 96.23% Shell 3.51% CMake 0.27%

mbedtls-fuzz's Introduction

Fuzzing mbed TLS

About

This project provides code and tools which allow for fuzzing the mbed TLS library using the american fuzzy lop (afl) fuzzer. An integral part of this project is the code for a self-communicating instance (the client and server run in a single process) of mbed TLS.

More information about the project is available on the Gotham Digital Science blog:

Fuzzing the mbed TLS Library

Installation

Grab the latest version of afl from the afl homepage and compile it.

Update the constants of the scripts in the fuzz folder so they point to the desired afl compiler.

Run the following command which automatically downloads different versions of mbed TLS, patches them, compiles the code, and sets everything up for fuzzing.

./setup.sh

Fuzzing

Change to fuzz subdirectory inside the mbed TLS directory that you wish to fuzz. Run the fuzz.sh script. Running the script without arguments prints the usage screen including a description of the tool. The script requires the network packet number (at least 1) that should be fuzzed and the fuzzer number (use 1 to launch the master instance; higher numbers launch slaves).

In the following example, we launch a master instance to fuzz network packet 3 of the self-communicating mbed TLS 2.0.0 binary:

cd mbedtls-2.0.0/fuzz
./fuzz.sh 3 1

Crash Analysis

If you want to analyze crashes using gdb, generate a file containing the paths of the crash files (the path must contain the packet number) and update the constants in ./crash-analysis.sh accordingly. Finally, run ./crash-analysis.sh which allows you to debug the crash using gdb.

You can use a command such as the following command to create the file containing the paths of the crash files:

find . -name 'id*' -type f | grep crashes | sort > crash_files.txt

Copyright

Fabian Foerg, Gotham Digital Science, 2015

mbedtls-fuzz's People

Contributors

amahmoudgds avatar faf0 avatar danbgds avatar

Watchers

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