Git Product home page Git Product logo

bppb's Introduction

bppb

A bplist-protobuf polyglot creator. Example output found here. image

How To

  1. Clone the repo
  2. run bppb.py <bplist_file_path> <protobuf_file_path> <output_file_path>

Parsing the polyglot

The bplist input stays logically the same in the output file.
Use any bplist parser the same way as you'd do with the input.

The protobuf input is embedded into another "wrapper" type.
You can see the Wrapper's definition in wrapper.proto.
Here are two choices of getting the original payload:

  1. (Python only) Use wrapper_pb2.py from this repo and the Wrapper class from it.
    Read the Wrapper.Payload bytes field and pass its value to your own message parser.
  2. Modify wrapper.proto and edit the Payload field's type to your own, like this:
syntax = "proto3";

message MyComplexProtobufMessage {
string SomeField = 1;
bytes SomeOtherField = 2;
}

message Wrapper {
bytes HeaderPadding = 12;
string Magic = 1;
MyComplexProtobufMessage Payload = 2; // <-- Changed the type to my custom payload type
bytes FooterPadding = 3;
}

then compile a new parser with protoc and use it to read Wrapper.Payload.
This time the result will already be the same as the one you encoded in the input.

๐Ÿ‘จโ€๐Ÿณ CyberChef Recipe

Use this recipe to test the protobuf interpertation of the bppb output: Click

bppb's People

Contributors

thexappy avatar

Stargazers

 avatar Suha Sabi Hussain avatar Austin Wise avatar

Watchers

 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.