All Projects → trailofbits → Protofuzz

trailofbits / Protofuzz

Licence: mit
Google Protocol Buffers message generator

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Protofuzz

Sbt Protobuf
sbt plugin for compiling protobuf files
Stars: ✭ 163 (-4.68%)
Mutual labels:  protobuf, protocol-buffers
Twirp
PHP port of Twitch's Twirp RPC framework
Stars: ✭ 108 (-36.84%)
Mutual labels:  protobuf, protocol-buffers
Protoc Gen Struct Transformer
Transformation functions generator for Protocol Buffers.
Stars: ✭ 105 (-38.6%)
Mutual labels:  protobuf, protocol-buffers
Pufferdb
🐡 An Android & JVM key-value storage powered by Protobuf and Coroutines
Stars: ✭ 91 (-46.78%)
Mutual labels:  protobuf, protocol-buffers
Protobuf Java Format
Provide serialization and de-serialization of different formats based on Google’s protobuf Message. Enables overriding the default (byte array) output to text based formats such as XML, JSON and HTML.
Stars: ✭ 134 (-21.64%)
Mutual labels:  protobuf, protocol-buffers
Protobuf
Python implementation of Protocol Buffers data types with dataclasses support
Stars: ✭ 101 (-40.94%)
Mutual labels:  protobuf, protocol-buffers
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (-37.43%)
Mutual labels:  protobuf, protocol-buffers
Protobuf
Go support for Google's protocol buffers
Stars: ✭ 8,111 (+4643.27%)
Mutual labels:  protobuf, protocol-buffers
Libprotobuf Mutator fuzzing learning
Learn how to combine libprotobuf-mutator with libfuzzer & AFL++
Stars: ✭ 134 (-21.64%)
Mutual labels:  protobuf, fuzzer
Protoeasy Go
Simpler usage of protoc. Deprecated.
Stars: ✭ 129 (-24.56%)
Mutual labels:  protobuf, protocol-buffers
Protobuf Nim
Protobuf implementation in pure Nim that leverages the power of the macro system to not depend on any external tools
Stars: ✭ 90 (-47.37%)
Mutual labels:  protobuf, protocol-buffers
Protolint
A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
Stars: ✭ 142 (-16.96%)
Mutual labels:  protobuf, protocol-buffers
Protocol Buffers Language Server
[WIP] Protocol Buffers Language Server
Stars: ✭ 44 (-74.27%)
Mutual labels:  protobuf, protocol-buffers
Protoc Jar
Protocol Buffers protobuf compiler - multi-platform executable protoc JAR and API
Stars: ✭ 103 (-39.77%)
Mutual labels:  protobuf, protocol-buffers
Samay
Command line Time tracking and reporting. Built using Go(programming language) and protocol buffers.
Stars: ✭ 37 (-78.36%)
Mutual labels:  protobuf, protocol-buffers
Protobuf
Protocol Buffers - Google's data interchange format
Stars: ✭ 52,305 (+30487.72%)
Mutual labels:  protobuf, protocol-buffers
Go Proto Validators
Generate message validators from .proto annotations.
Stars: ✭ 713 (+316.96%)
Mutual labels:  protobuf, protocol-buffers
Protobuf Swift
Google ProtocolBuffers for Apple Swift
Stars: ✭ 925 (+440.94%)
Mutual labels:  protobuf, protocol-buffers
Protobuf.jl
Julia protobuf implementation
Stars: ✭ 127 (-25.73%)
Mutual labels:  protobuf, protocol-buffers
Pb And K
Kotlin Code Generator and Runtime for Protocol Buffers
Stars: ✭ 137 (-19.88%)
Mutual labels:  protobuf, protocol-buffers

ProtoFuzz

Build Status Test Coverage Issue Count PyPI version

ProtoFuzz is a generic fuzzer for Google’s Protocol Buffers format. Instead of defining a new fuzzer generator for custom binary formats, protofuzz automatically creates a fuzzer based on the same format definition that programs use. ProtoFuzz is implemented as a stand-alone Python3 program.

Installation

Make sure you have protobuf package installed and protoc is accessible from $PATH, and that protoc can generate Python3-compatible code.

$ git clone --recursive [email protected]:trailofbits/protofuzz.git
$ cd protofuzz
$ python3 setup.py install

Usage

>>> from protofuzz import protofuzz
>>> message_fuzzers = protofuzz.from_description_string("""
...     message Address {
...      required int32 house = 1;
...      required string street = 2;
...     }
... """)
>>> for obj in message_fuzzers['Address'].permute():
...     print("Generated object: {}".format(obj))
...
Generated object: house: -1
street: "!"

Generated object: house: 0
street: "!"

Generated object: house: 256
street: "!"
...

You can also create dependencies between arbitrary fields that are resolved with any callable object:

>>> message_fuzzers = protofuzz.from_description_string("""
...     message Address {
...      required int32 house = 1;
...      required string street = 2;
...     }
...     message Other {
...       required Address addr = 1;
...       required uint32 foo = 2;
...     }
... """)
>>> fuzzer = message_fuzzers['Other']
>>> # The following creates a dependency that ensures Other.foo is always set
>>> # to 1 greater than Other.addr.house
>>> fuzzer.add_dependency('foo', 'addr.house', lambda x: x+1)
>>> for obj in fuzzer.permute():
...     print("Generated object: {}".format(obj))

Note however, the values your lambda creates must be conformant to the destination type.

Caveats

Currently, we use fuzzdb for values. This might not be complete or appropriate for your use. Consider swapping it for your own values.

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].