Git Product home page Git Product logo

mborgerson / mdec Goto Github PK

View Code? Open in Web Editor NEW
452.0 13.0 28.0 221 KB

Decompilation as a Service. Explore multiple decompilers and compare their output with minimal effort. Upload binary, get decompilation.

Home Page: http://decompilerexplorer.org

License: Other

Dockerfile 15.82% Python 60.28% HTML 22.98% C 0.92%
decompilation ghidra angr ida binary-ninja reko retdec snowman decompiler jeb

mdec's Introduction

Update: mdec is now deprecated in favor of the community maintained decompiler-explorer project!

mdec

Explore multiple decompilers and compare their output with minimal effort. Upload binary, get decompilation.

Supported Decompilers

Notes:

  1. Hex-Rays and Binary Ninja require license and binaries; other decompilers will be downloaded automatically.
  2. JEB CE requires a license code. It's free. More info here.

Components

  • Each decompiler is a service that runs in its own container
  • A frontend web service proxies requests to backend service

Install

You'll need to add your proprietary packages in backend/*/private. Then just:

COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build

Tip: If you want to build only a few services, append the service names to the above command. For example, to build only the free/open source decompilers you can specify:

COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build \
  frontend \
  angr \
  ghidra \
  r2dec \
  reko \
  retdec \
  snowman

Run

docker compose up

Point your browser at http://127.0.0.1.

Tip: If you want to start only a few services, append the service names to the above command (e.g. frontend, angr, etc.)

API

You can also request decomp like:

curl -F '[email protected]' http://127.0.0.1/hexrays/decompile

mdec's People

Contributors

couleeapps avatar mborgerson avatar n01e0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mdec's Issues

Stand up publicly accessible service

  • Eventually this project will run publicly for people to use (like compiler explorer)
  • Some improvements need to be made first for scalability and platform abuse mitigation
  • Will continue to support local hosting

Show decompiler version

For ease of comparison, it would be great if the decompiler release/version was shown alongside the results. Then you could also compare different versions of the same decompiler and see the improvements over time.

IDA also has 2 versions: IDA version and Hex-Rays version, so you should show both.

Make API better

  • Return JSON data with more info if available
    • Version
    • Configured settings
    • Log #12
    • List of functions/symbols/types recovered
    • Source
    • Duration of time taken to decomp
  • Support decomp options
    • #9
    • #3
    • Support other representations (Pythonish, Disassembly, LLIL, HLIL)
    • Have universal options, and binary-specific options
    • Return available options via query, or along with decomp

Make frontend smarter:

  • Have central upload spot (clients upload same binary for each decompiler)
  • Rate limit + captcha for public use
  • Request which decomps you want, then return a series of JSON objects containing response from each decompiler
  • Support multi part decomp updates
    • Each service returns at different times, while servicing a request
  • Query backend status
  • Handle work queuing
  • Handle compiling for round trip decomp #2

Add decomp options

Thought: A little gear icon next to each decompiler. Click it to open a popup with options published by the service, such as:

  • Output representation
  • Simplifiers
  • Style preferences

Ghidra decomp is very slow

Ghidra decompilation is much slower than other tools. I'm sure startup costs can be brought down here.

Add a License

Currently the sources in the repo are unlicensed and therefore it's not (legally) possible to fork or contribute changes. You should pick a license!

Remote decompiler service

Some people may have computer-specific licenses of IDA / BN and are unable to run the decompilers on other machines. There should be a way to host a decompilation service on a remote machine and have the web server contact it for results.

Support Non-Linux IDA

Currently the IDA script creates a linux docker container and expects the linux version of IDA. Not everyone has a copy of the linux version of IDA, so it would be beneficial to support other platforms. May depend on #17 unless people are willing to run windows docker containers on windows hosts, and I'm not sure how macOS support would work.

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.