skillfed

bbpb

Library for working with protobuf messages without a protobuf type definition.

bbpb v1.4.2 188.2K downloads/30d#9,950 on PyPI731
Permissive license MIT Active released

What it is and what it does

bbpb is a Python library for working with Protocol Buffer messages when you don't have the original .proto schema file. It decodes binary protobuf data by inferring field types from wire-type metadata and field content, then returns both the decoded message as a Python dictionary and a generated type definition. You can modify the decoded message and re-encode it back to binary using the type definition.

The library is designed for penetration testing and security research scenarios where protobuf messages need to be inspected and modified without access to the schema. It provides both a Python API and a command-line tool. The type inference is best-effort—most common fields parse correctly, but you can also supply custom type definitions to override guesses or name fields for readability. It includes convenience functions for JSON encoding/decoding and .proto file import/export, though the latter has known limitations with certain proto syntax.

Use it for:

  • Penetration testing: intercept and modify protobuf messages in transit when schema is unavailable
  • Reverse engineering: decode and understand protobuf message structure from binary samples alone
  • Security research: analyze and fuzz protobuf-based protocols without access to source definitions
  • Message inspection: examine and transform protobuf payloads in debugging or forensic workflows
  • Protocol analysis: extract and manipulate protobuf fields for API testing or integration work

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Decode and re-encode Protocol Buffer messages without access to the source .proto descriptor file, making educated guesses about field types based on wire-type metadata.

Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and fills a genuine gap in protobuf tooling for scenarios where the schema is unavailable. MIT licensing removes legal friction. Install it if you work with protobuf-based systems in security, testing, or reverse-engineering contexts.

Install

bbpb on PyPI

pip

pip install bbpb

uv

uv add bbpb

poetry

poetry add bbpb

Installing bbpb

Before you install

Low friction: pure Python wheel with a single dependency (six). Actively maintained with recent commits and no known vulnerabilities.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install bbpb

import base64

data = base64.b64decode('KglNb2RpZnkgTWU=')
message, typedef = bbpb.decode_message(data)
message[5] = 'Modified Me'
encoded = bbpb.encode_message(message, typedef)

Verify before relying

  • Accuracy of type inference for complex or ambiguous wire-type scenarios
  • Performance characteristics when handling large or deeply nested messages
  • Completeness of .proto file round-trip conversion (documentation notes limitations)

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — six
Maintenance actively maintained — 518 days since the last release
Last repo commit
First released
Downloads 188,177/month — #9,950 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: bbpb-1.4.2-py3-none-any.whl

Keywords: protobuf

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

protobuf decode without schemareverse engineer protobuf messagesprotobuf manipulation without descriptorblackbox protobuf parsingmodify protobuf messages blindprotobuf type inferenceprotobuf security testing
protobufreverse-engineeringsecurity-testing

More Security packages