All Projects → GaloisInc → Reopt

GaloisInc / Reopt

Licence: bsd-3-clause
A tool for analyzing x86-64 binaries.

Labels

Projects that are alternatives of or similar to Reopt

Jitfromscratch
Example project from my talks in the LLVM Social Berlin and C++ User Group
Stars: ✭ 158 (-16.84%)
Mutual labels:  llvm
Play with llvm
A book about LLVM & Clang(中文开源书:玩转 LLVM)
Stars: ✭ 175 (-7.89%)
Mutual labels:  llvm
Yansollvm
Yet Another Not So Obfuscated LLVM
Stars: ✭ 180 (-5.26%)
Mutual labels:  llvm
Compile To Web
Discover what languages can be compiled to Web Assembly
Stars: ✭ 164 (-13.68%)
Mutual labels:  llvm
Emscripten Fastcomp
LLVM plus Emscripten's asm.js backend
Stars: ✭ 174 (-8.42%)
Mutual labels:  llvm
Dstep
A tool for converting C and Objective-C headers to D modules
Stars: ✭ 177 (-6.84%)
Mutual labels:  llvm
Llvm
Fork of the LLVM Compiler Infrastructure
Stars: ✭ 155 (-18.42%)
Mutual labels:  llvm
Fakepdb
Tool for PDB generation from IDA Pro database
Stars: ✭ 186 (-2.11%)
Mutual labels:  llvm
Cheerp Llvm
Legacy repo, migrated to cheerp-compiler monorepo
Stars: ✭ 174 (-8.42%)
Mutual labels:  llvm
Clang Expand
🐉 A clang tool for happy refactoring without source-code gymnastics
Stars: ✭ 182 (-4.21%)
Mutual labels:  llvm
Mcsema
Framework for lifting x86, amd64, aarch64, sparc32, and sparc64 program binaries to LLVM bitcode
Stars: ✭ 2,198 (+1056.84%)
Mutual labels:  llvm
Dagger
Binary Translator to LLVM IR
Stars: ✭ 174 (-8.42%)
Mutual labels:  llvm
Constexpr Everything
Rewrite C++ code to automatically apply `constexpr` where possible
Stars: ✭ 178 (-6.32%)
Mutual labels:  llvm
Cling
The cling C++ interpreter
Stars: ✭ 2,322 (+1122.11%)
Mutual labels:  llvm
Awesome Llvm
A curated list of awesome LLVM related docs, tools, and other resources.
Stars: ✭ 184 (-3.16%)
Mutual labels:  llvm
Rhine
🔬 a C++ compiler middle-end, using an LLVM backend
Stars: ✭ 157 (-17.37%)
Mutual labels:  llvm
Webassembly Examples
From Simple To Complex. A complete collection of webassembly examples.
Stars: ✭ 177 (-6.84%)
Mutual labels:  llvm
Lhc
The LLVM LHC Haskell Optimization System
Stars: ✭ 188 (-1.05%)
Mutual labels:  llvm
Jlang
JLang: Ahead-of-time compilation of Java programs to LLVM
Stars: ✭ 186 (-2.11%)
Mutual labels:  llvm
Llvm Guide Zh
User Guides For those new to the LLVM system.(LLVM系统的新用户指南,中文翻译版)
Stars: ✭ 180 (-5.26%)
Mutual labels:  llvm

reopt

Reopt is a tool under development for decompiling and recompiling code. It works by mapping binaries into LLVM byte code, using the LLVM optimization passes to optimize the LLVM, and then combining the newly generated into the binary to generate a new executable.

Reopt supports the x86_64 instruction set, and is still under active development -- bugs are expected.

We have recently updated Reopt to make it easier to use specific capabilities within the tool. The main capabilities are described below. Additional options can be viewed by running reopt --help.

  • Disassembly. reopt -d <binary> provides a raw disassembler output view of the code in the binary. This is similiar to objdump's disassembly output.

  • Control flow graph construction. reopt --cfg <binary> displays the low level control flow graphs that Reopt has constructed for each discovered function within the binary. This is a low-level IR that maintains machine code's explicit stack and register references, but lifts the machine code instructions into a more architectural neutral register transfer language.

  • Function Recovery reopt --fns <binary> displays the functions that Reopt has generated after performing stack and function argument analysis. This is a higher-level IR in which explicit references to the stack have been replaced with allocations, and functions take arguments.

  • LLVM Generation reopt --llvm <binary> generates LLVM from the binary. This is essentially a version of function recovery rendered in LLVM's format.

  • Object Files reopt --object <binary> generates an object file from the LLVM generated in the previous state. This is essentially the same as generating the LLVM, and then running the LLVM compiler toolchain with the selected options. The output file should be specified with the -o flag as object files cannot be written to standard out.

  • Recompilation reopt <binary> runs the full recompilation toolchain and produces a new binary equialent to the original.

The are additional options that can be viewed by running reopt --help. More documentation will be provided once the tool is in a more mature state.

Installation

Reopt is currently in development and installation is tuned towards supporting developers. Building requires Haskell and cabal installed, and uses submodules that expect users to have Github accounts. We only test building Reopt on Linux, but OSX should work as well. To download and install Reopt, we recommend that users first make sure GHC 8.8.3 and cabal are installed, then perform the following steps:

git clone https://github.com/GaloisInc/reopt.git

cd reopt
sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
git submodule update --init --remote
cabal install exe:reopt

This will leave reopt installed at $HOME/.cabal/bin/reopt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].