reopt

A tool for analyzing x86-64 binaries.

  • Owner: GaloisInc/reopt
  • Platform:
  • License:: BSD 3-Clause "New" or "Revised" License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

If you have git and Haskell stack, you should be able to install
with:

git submodule update --init
stack install reopt

Main metrics

Overview
Name With OwnerGaloisInc/reopt
Primary LanguageLLVM
Program languageShell (Language Count: 12)
Platform
License:BSD 3-Clause "New" or "Revised" License
所有者活动
Created At2015-06-08 22:01:42
Pushed At2024-10-18 15:42:39
Last Commit At
Release Count3
Last Release Namerelease-2021-09-20 (Posted on )
First Release Namereopt_extra_cfar_tools (Posted on 2017-12-14 10:51:09)
用户参与
Stargazers Count320
Watchers Count27
Fork Count28
Commits Count1.7k
Has Issues Enabled
Issues Count48
Issue Open Count19
Pull Requests Count247
Pull Requests Open Count4
Pull Requests Close Count24
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private