Binary Ninja Blog

Introducing Decompiler Explorer

Today, we’re releasing a little side project a few of our developers have been working with the community on: the Decompiler Explorer! This new (free, open source) web service lets you compare the output of different decompilers on small executables. In other words: It’s basically the same thing as Matt Godbolt’s awesome Compiler Explorer, but in reverse.

The Decompiler Explorer

Even more exciting, Ilfak Guilfanov, founder of Hex-Rays, has provided a special decompiler license for use in the Decompiler Explorer! This means that the service offers Hex-Rays decompilation alongside that of Binary Ninja, Ghidra, angr, and more.

We’ve had a prototype of this internally (which we referred to as “Glennbolt”, because Glenn maintained it) for over a year and a half. It was based on some code Dougall Johnson tweeted about (which was, itself, based on Robin Lambertz’s code here) and was mainly used, after our HLIL release, to try and understand where our output could be improved relative to other tools. This prototype operated on source code that would be compiled and then handed to supported backends:

"Glennbolt"

Back in March, while we were discussing internally whether we should release this in some fashion, Matt Borgerson open sourced something similar called mdec. His project worked on supplied binaries instead, which is a lot simpler to work with and host. So, we opted to change our prototype to do the same thing. This is how the current implementation of the Decompiler Explorer works.

The site is structured in a leader/workers model, where the decompilers are each running in their own containers and take requests from the queue on the website. We’re using Django for the backend and hosting it on a couple of DigitalOcean droplets. If you want to run your own copy to contribute patches, you can follow the steps in the README. You’ll need your own Binary Ninja and Hex-Rays licenses if you want to run them locally. You’ll also need Docker to orchestrate the containers and Python to run the setup scripts.

As we mentioned above, the Decompiler Explorer isn’t “ours” - it’s everyone’s! We’ve turned the entire codebase over to the community (some of the angr developers have already contributed) and have released the entire project as open source on GitHub. We’re committed to continuing to host the service and helping the community improve it based on pull requests and feedback. So, please don’t hesitate to fork it and help make the service better!

All currently supported Decompiler Explorer backends