Skip to content

v-p-b/reshare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REshare - A Reverse Engineering Exchange Format

A human- and machine-readable schema to represent knowledge obtained during reverse engineering.Inspired by Travis Goodspeed - Some Thoughts on Literate Disassembly and Symbol Porting.

With an exchange format we only have to implement a single importer/exporter pair for each tool we want to support to be able to transfer data between all tools.

Implementing import/export for each tool-pair has quadratic complexity. Implementing a REshare for each tool is linear.

The repo contains a JSON Type Definition that can be automatically converted to serializers/deserializers in multiple languages using jtd-convert.

With serializers we can build source-specific exporters to generate JSON representation of program information from arbitrary sources. We are currently aware of the following exporters:

With deserializers we can build target-specific importers to provide the information in the REshare JSON representation to arbitrary tools. We are currently aware of the following importers:

The type definition is currently highly unstable. Expect breaking changes and always pin exact library versions in your tools!

Principles of the data model

  • Embrace redundancy - Redundant data can be used by importers for error recovery.
  • Flexibility - Export what you can. Most properties are optional, while extra information can be embedded in the output. (Note: we will enable JTD's additionalProperties once the code is somewhat stabilized and we ahve enough tests)
  • Reasonable abstractions - We aim to support common architectures and formats. If you need something special, feel free to create a variant!

Building

Use the provided Makefile - we assume ./jtd-codegen to be present in the current directory, but you can override that:

$ make java
$ JTD=/path/to/jtd-codegen make python

Currently Python and Java generation are implemented. make format formats the JTD definition with jq.

Java

Gradle configuration is provided to build a library from the generated code:

java/ $ ./gradlew jar # builds simple Jar 
java/ $ ./gradlew shadowJar # builds fat Jar with dependencies included

Contributing

Please use the make format command before sending patches!

JTD generated code should not appear in the repo.

About

Reverse engineering exchange format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published