Giter Site home page Giter Site logo

pastis-sydr's Introduction

README

This is engine for PASTIS, that allows to launch Sydr-Fuzz framework. Sydr-Fuzz is a proprietary hybrid fuzzing tool that combines AFL++ fuzzer with symbolic execution engine named Sydr.

Installation

pastis-sydr depends on libpastis, which could be installed by pip:

pip install pastis-framework

To install pastis-sydr just run pip install . in pastis-sydr directory.

Running it in offline mode

  1. Set environment variables:
export SYDR_PATH=</path/to/sydr-fuzz>  # by default sydr-fuzz is expected at /fuzz/sydr/sydr-fuzz
export SYDR_WS=</path/to/workspace>    # the default value is /tmp/sydr_workspace
  1. Run:

For binary-only fuzzing (Qemu mode) Sydr and AFL++ are launched on the same target <fuzz_target>. When using file as input source, @@ would be automatically added to if it wasn't specified.

# stdin input source
pastis-sydr offline --corpus inputs --input-source STDIN --fuzzmode BINARY_ONLY <fuzz_target> <ARGS>

# File input source
pastis-sydr offline --corpus inputs --input-source ARGV --fuzzmode BINARY_ONLY <fuzz_target> <ARGS>

For source-instrumentation fuzzing AFL++ use instrumented target <fuzz_target>. Uninstrumented target for Sydr expected to be in package.other_files in package.zip:

zip -r package.zip <fuzz_target> <sydr_target>
pastis-sydr offline --corpus inputs --input-source STDIN --fuzzmode INSTRUMENTED -p package.zip <fuzz_target> <ARGS>

Running it in online mode

  1. Set environment variables:
export SYDR_PATH=</path/to/sydr-fuzz>
export SYDR_WS=</path/to/workspace>    # the default value is /tmp/sydr_workspace
  1. Run Client:
pastis-sydr online -h <ip> -p <port>

Launching pastis-sydr with PastisBroker

  1. Build pastis (https://github.com/quarkslab/pastis.git) and install sydrbroker:
git clone https://github.com/quarkslab/pastis.git pastis
cd pastis
docker build -t pastis-framework .
docker run --rm -it -p 5555:5555 -v $PWD:/mnt pastis-framework bash
cd /mnt/engines && git clone https://github.com/apach301/pastis-sydr.git
cd pastis-sydr/broker-addon && pip install .
  1. Build pastis-sydr (in another container):
git clone https://github.com/apach301/pastis-sydr.git
cd pastis-sydr
docker build -t pastis-sydr .
docker run --rm -it -v $PWD:/mnt pastis-sydr bash
  1. Launch broker and pastis-sydr in the corresponding containers:
[pastis-framework] ./bin/pastis-benchmark run --workspace /mnt/output --bins </path/to/target/bin> --seeds </path/to/init_corpus> --mode NO_TRANSMIT --injloc ARGV --timeout 300 --port 5555 --start-quorum 1 --allow-remote
[pastis-sydr] cd /pastis && SYDR_WS=/mnt/sydr-workspace ./bin/pastis-sydr online -h <ip> -p 5555

pastis-sydr's People

Contributors

apach301 avatar

Stargazers

Ivan Kapranov avatar

Watchers

Robin David avatar Christian Heitman 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.