GithubHelp home page GithubHelp logo

l9sk / peach Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozillasecurity/peach

0.0 1.0 0.0 2.35 MB

Peach is a fuzzing framework which uses a DSL for building fuzzers and an observer based architecture to execute and monitor them.

License: Mozilla Public License 2.0

Python 99.91% JavaScript 0.09% HTML 0.01%

peach's Introduction

Logo

MozPeach is a fork of Peach v2.7 and is actively maintained by Mozilla Security. With support from our community and partnerships our goal is to continue to deliver Peach as an open source product with Python compatibility and new features.

Our focus is on usability, speed and fewer dependencies. We have also begun work on Python 3 support, replaced deprecated Python dependencies, switched the XML back-end, added a new configuration system, simplified code and much more.

Setup

Prerequisites for Ubuntu
sudo apt-get --yes --quiet install libxml2-dev libxslt1-dev lib32z1-dev
General
pip install virtualenv
pip install virtualenvwrapper

git clone --depth 1 https://github.com/mozillasecurity/peach

cd peach
git clone --depth 1 https://github.com/mozillasecurity/fuzzdata

mkvirtualenv -r requirements.txt peach

or

workon peach

Fundamentals

Peach uses XML based "pits" as configuration files. There are two types of pits which we will briefly describe here.

Pit: Data Model

A data-model pit is an XML description of a specification and is required to parse any kind of input into an in-memory XML tree. Peach then uses that tree to generate fuzzed output.

Pit: Target

The target pit is used to define how the target process will get fuzzed, how it will be monitored for suspicious behavior and how to deal with results.

It is optional whether you place everything into one pit however not doing so will simplify working with multiple targets, different hosts and reusing pits. Following the data model/target pit practice will allow the reuse of data model pits across projects.

Examples

Run
./peach.py -pit Pits/<component>/<format>/<name>.xml -target Pits/Targets/firefox.xml -run Browser

HINT: You can set related configuration values for both pits from the command-line by using the -macros switch.

Debug
./peach.py -pit Pits/<component>/<format>/<name>.xml -1 -debug | less -R

NOTE: This will show a very verbose output of the parsing process. To see only the results of the parsing process for each element you can add: "| grep Rating | less -R"

Help Menu

% ./peach.py -h
usage: peach.py [-h] [-pit path] [-run name]
                [-analyzer ANALYZER [ANALYZER ...]] [-parser PARSER]
                [-target TARGET] [-macros MACROS [MACROS ...]] [-seed #]
                [-debug] [-new] [-1] [-range # #] [-test] [-count] [-skipto #]
                [-parallel # #] [-agent # #] [-logging #]
                [-check model samples] [-verbose] [-clean] [-version]

Peach Runtime

optional arguments:
  -h, --help            show this help message and exit
  -pit path             pit file
  -run name             run name
  -analyzer ANALYZER [ANALYZER ...]
                        load analyzer.
  -parser PARSER        use specific parser.
  -target TARGET        select a target pit.
  -macros MACROS [MACROS ...]
                        override configuration macros
  -seed #               seed
  -debug                turn on debugging. (default: False)
  -new                  use new relations.
  -1                    run single test case.
  -range # #            run range of test cases.
  -test                 validate pit file.
  -count                count test cases for deterministic strategies.
  -skipto #             skip to a test case number.
  -parallel # #         use parallelism.
  -agent # #            start agent.
  -logging #            verbosity level of logging
  -check model samples  validate a data model against a set of samples.
  -verbose              turn verbosity on. (default: False)
  -clean                remove python object files.
  -version              show program's version number and exit

Resources

Resources which aid in building a pit based on the grammar of a file format:

* http://www.sweetscape.com/010editor/templates/
* http://www.synalysis.net/formats.xml

peach's People

Contributors

posidron avatar mozilla-github-standards 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.