All Projects → d0c-s4vage → Gramfuzz

d0c-s4vage / Gramfuzz

Licence: mit
gramfuzz is a grammar-based fuzzer that lets one define complex grammars to generate text and binary data formats.

Programming Languages

python
139335 projects - #7 most used programming language
grammar
57 projects

Projects that are alternatives of or similar to Gramfuzz

Crlf Injection Scanner
Command line tool for testing CRLF injection on a list of domains.
Stars: ✭ 91 (-56.46%)
Mutual labels:  fuzzing, fuzzer
Fuzzing Survey
The Art, Science, and Engineering of Fuzzing: A Survey
Stars: ✭ 116 (-44.5%)
Mutual labels:  fuzzing, fuzzer
Ansvif
A Not So Very Intelligent Fuzzer: An advanced fuzzing framework designed to find vulnerabilities in C/C++ code.
Stars: ✭ 107 (-48.8%)
Mutual labels:  fuzzing, fuzzer
Dirsearch
Web path scanner
Stars: ✭ 7,246 (+3366.99%)
Mutual labels:  fuzzing, fuzzer
Sienna Locomotive
A user-friendly fuzzing and crash triage tool for Windows
Stars: ✭ 130 (-37.8%)
Mutual labels:  fuzzing, fuzzer
Example Go
Go Fuzzit Example
Stars: ✭ 39 (-81.34%)
Mutual labels:  fuzzing, fuzzer
Clusterfuzz Tools
Bugs are inevitable. Suffering is optional.
Stars: ✭ 111 (-46.89%)
Mutual labels:  fuzzing, fuzzer
Dharma
Generation-based, context-free grammar fuzzer.
Stars: ✭ 416 (+99.04%)
Mutual labels:  fuzzing, fuzzer
Javafuzz
coverage guided fuzz testing for java
Stars: ✭ 193 (-7.66%)
Mutual labels:  fuzzing, fuzzer
Aflplusplus
The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more!
Stars: ✭ 2,319 (+1009.57%)
Mutual labels:  fuzzing, fuzzer
Sharpfuzz
AFL-based fuzz testing for .NET
Stars: ✭ 185 (-11.48%)
Mutual labels:  fuzzing, fuzzer
Grammarinator
ANTLR v4 grammar-based test generator
Stars: ✭ 162 (-22.49%)
Mutual labels:  fuzzing, fuzzer
Angora
Angora is a mutation-based fuzzer. The main goal of Angora is to increase branch coverage by solving path constraints without symbolic execution.
Stars: ✭ 669 (+220.1%)
Mutual labels:  fuzzing, fuzzer
Afl Patches
Patches to afl to fix bugs or add enhancements
Stars: ✭ 76 (-63.64%)
Mutual labels:  fuzzing, fuzzer
Jsfuzz
coverage guided fuzz testing for javascript
Stars: ✭ 532 (+154.55%)
Mutual labels:  fuzzing, fuzzer
Fisy Fuzz
This is the full file system fuzzing framework that I presented at the Hack in the Box 2020 Lockdown Edition conference in April.
Stars: ✭ 110 (-47.37%)
Mutual labels:  fuzzing, fuzzer
Pyjfuzz
PyJFuzz - Python JSON Fuzzer
Stars: ✭ 342 (+63.64%)
Mutual labels:  fuzzing, fuzzer
Afl Utils
Utilities for automated crash sample processing/analysis, easy afl-fuzz job management and corpus optimization
Stars: ✭ 383 (+83.25%)
Mutual labels:  fuzzing, fuzzer
Formatfuzzer
FormatFuzzer is a framework for high-efficiency, high-quality generation and parsing of binary inputs.
Stars: ✭ 117 (-44.02%)
Mutual labels:  parsing, fuzzing
Janus
Janus: a state-of-the-art file system fuzzer on Linux
Stars: ✭ 139 (-33.49%)
Mutual labels:  fuzzing, fuzzer

gramfuzz

Master Build Status PyPI Statistics Latest Release

gramfuzz is a grammar-based fuzzer that lets one define complex grammars to model text and binary data formats.

Contributing

See CONTRIBUTING.md for details. PRs welcome!

Installation

Install via pip:

pip install gramfuzz

Documentation

For detailed documentation, please view the full docs here

TLDR Example

Suppose we define a grammar for generating names and their prefixes and suffixes:

# names_grammar.py
import gramfuzz
from gramfuzz.fields import *

class NRef(Ref):
    cat = "name_def"
class NDef(Def):
    cat = "name_def"


Def("name",
    Opt(NRef("name_title")),
    NRef("personal_part"),
    NRef("last_name"),
    Opt(NRef("name_suffix")),
cat="name", sep=" ")
NDef("personal_part",
    NRef("initial") | NRef("first_name"), Opt(NRef("personal_part")),
sep=" ")
NDef("last_name", Or(
    "Blart", "Tralb"
))
NDef("name_suffix",
    Opt(NRef("seniority")),
    Or("Phd.", "CISSP", "MD.", "MBA", "NBA", "NFL", "WTF", "The Great"),
sep=" ")
NDef("seniority", Or("Sr.", "Jr."))
NDef("name_title", Or(
    "Sir", "Ms.", "Mr.", "Mrs.", "Senator", "Capt.", "Maj.", "Lt.", "President"
))
NDef("first_name", Or("Henry", "Susy"))
NDef("initial",
    String(min=1, max=2, charset=String.charset_alpha_upper), "."
)

We could then use this grammar like so:

import gramfuzz

fuzzer = gramfuzz.GramFuzzer()
fuzzer.load_grammar("names_grammar.py")
names = fuzzer.gen(cat="name", num=10)
print("\n".join(names))

Which would output something like this:

Ms. Susy Henry Tralb
Lt. Henry Henry Tralb
L. Tralb WTF
Maj. L. W. N. Tralb
Z. Tralb
Senator C. K. Henry Blart
Henry Tralb CISSP
Lt. Henry Tralb Jr. NBA
Maj. Susy Tralb Sr. NBA
Henry C. Blart WTF

More Examples

See the examples (and example script) in the examples folder:

 lptp [ tmp ]: git clone https://github.com/d0c-s4vage/gramfuzz
 lptp [ tmp ]: cd gramfuzz/examples
 lptp [ examples ]: ./example.py --help
usage: gramfuzz/examples/example.py [-h] -g GRAMMAR [-n N] [-s RAND_SEED]
                                    [--max-recursion R] [-o OUTPUT]

This script will generate N instances of the specified grammar.

optional arguments:
  -h, --help            show this help message and exit
  -g GRAMMAR, --grammar GRAMMAR
                        The grammar to load. One of: names,python27,roman_numeral,postal
  -n N, --number N      The number of times to generate top-level nodes from the specified grammar(s) (default=1)
  -s RAND_SEED, --seed RAND_SEED
                        The random seed to initialize the PRNG with (default=None)
  --max-recursion R     The maximum reference recursion depth allowed (default=10)
  -o OUTPUT, --output OUTPUT
                        The output file to output the generated data to (default=stdout)
 lptp [ examples ]: ./example.py -g postal -n 10 -s 1337 --max-recursion 5
Z. Tralb
69 Baker Street 8325U 
Malang, IL 64666-4973
Senator Susy Henry Blart WTF
56 Sesame Street 
Yokohama, WV 49471-3667
Henry I. Tralb Jr. CISSP
63 Spooner Street 858H 
Tehran, TX 27259-9556
Capt. Henry Susy Blart Jr. Phd.
65536 Jump Street 
Malang, ID 84108-0969
Susy Blart
0 Rainey Street 
Wuhan, FL 16712-1095
P. Blart NFL
98 Wisteria Lane 
Shenyang, NH 70126
Henry Henry Blart Phd.
30 Rainey Street 
Madras, GA 90915
Senator Henry E. Tralb
38 Spooner Street 
Tianjin, CT 37211
Maj. Henry Tralb
70 Rainey Street 458W 
HongKong, OK 40689
Mrs. Henry Blart
11 Sesame Street 
Beijing, MT 58689-7258

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].