Files
lifting-bits-remill/README.md
T
Peter Goodman e1bdbdba9e Alessandro/refactor/llvmmultiversion cmake (#111)
* Change copyright notice in all the places. Trying to get cmake to download all the things

* CMake refactor

* Added the lib repository installer

* Fixed a couple of paths in library repository scripts

* Spelling and a missing .gitignore file.

* The google test library was not correctly linked

* Removed the pre-compiled XED library

* Removed unused files; fixed the INSTALL directives. Added automatic protobuf generation.

* Added a package generator script for ArchLinux

* Merged in Alessandro's cmake magic

* Cleanups, compatibility changes

* CMake cleanup.

 o Removed the cmake folder as it is no longer used.
 o Removed the library_repository_installer directory and
   replaced it with a submodule to the newly introduced
   cxx_common repository.
 o Added the 'use_remill_semantics' branch of mcsema as a
   submodule under tools/cmake.
 o Updated the README instructions (added --recursive to the
   git clone command).

Warning: the mcsema submodule is pointing to my fork of the
repository!

* CMake: avoid re-defining the C/CXX/ASM compiler.

This will prevent CMake from looping forever when using submodules.

* The tools/mcsema submodule now points to the official repository.

* mcsema submodule update

* Updated the mcsema git submodule to track the newest changes.

* Various CMake fixes (see details).

 o External include headers were not correctly marked
   as SYSTEM. This caused them to output warnings and
   break the build.
 o The PROJECT_SOURCE CMake variable has been replaced
   with CMAKE_SOURCE_DIR.
 o Updated the mcsema submodule to point to the latest
   CMake fixes.

* Getting closer to having the test case runner work again without using the CFG protobufs.

* Trying to make things use ubuntu clang/llvm packages

* Update to the mcsema submodule.

* Minor changes for llvm version compatibility

* Test cases should run now. Had to compile the lifted testcases to a .S file, as with the .bc file, they were being optimized away.. I think. The compilation to assembly seems unusually slow, though.

* Minor change

* Some stuff for llvm 4.0 support

* Remove mcsema sub-module

* Remove cxx-common submodule

* First steps toward getting travis working again

* Attempt at getting travis working again

* Using https for cloning instead of ssh

* Minor build script update

* Added ISEL_ prefix to isels to make it easier for ForEachISel to find them. Commented out the defer_inlining intrinsics.

* Changes related to mcsema2

* Simplify runtime targets generation. (#110)

* CMake refactor: Added a new language 'BC' for the bitcode (see details).

The language is used to generate the runtimes used by the architecture
modules. The required executables (clang++ and llvm-link) are
automatically detected in the same way as other compilers are.

A new CMake function has been added and it can be used to easily
generate runtime targets in a way similar to add_executable:

    add_runtime(<name> SOURCE <source list> ADDRESS_SIZE <n>
        DEFINITIONS <definition list>)

Additionally, all files ending with the *.bcpp extensions will
automatically invoke the bitcode compiler when listed in an
active target.

This should open support for parallel compilation! You just have to
list all your .cpp files when calling add_runtime.

* CMake: Fixes to the BC language handler.

* CMake/BC: Use '.bo' for object files. X86 runtime: Add -g/-O flags.
2017-05-15 13:00:33 -04:00

3.4 KiB

Remill

Remill is a static binary translator that translates machine code into LLVM bitcode. It translates x86 and amd64 machine code (including AVX and AVX512) into LLVM bitcode.

Remill focuses on accurately lifting instructions. It is meant to be used as a library for other tools, e.g. McSema.

Build Status

master
Linux Build Status
macOS Build Status

Additional Documentation

Getting Help

If you are experiencing undocumented problems with Remill then ask for help in the #binary-lifting channel of the Empire Hacking Slack.

Supported Platforms

Remill is supported on Linux platforms and has been tested on Ubuntu 14.04 and 16.04.

We are actively working on porting Remill to macOS.

Dependencies

Name Version
Git Latest
CMake 3.2+
Google Flags 2.2.0
Google Log 0.3.4
Google Test 1.8.0
LLVM 3.5+
Clang 3.5+
Intel XED 2016-02-02
Python 2.7
Unzip Latest

Getting and Building the Code

Step 1: Install dependencies

On Linux

Install Dependencies
sudo apt-get update
sudo apt-get upgrade

sudo apt-get install \
     git \
     cmake \
     python2.7 python-pip \
     build-essential \
     unzip \
     software-properties-common \
     realpath
Upgrade CMake (Ubuntu 14.04)

Users wishing to run Remill on Ubuntu 14.04 should upgrade their version of CMake.

sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install cmake

On OS X

Install Dependencies
brew install glog

Step 2: Clone and Enter the Repository

Clone the repository

This will also clone the cxx_common module (used to generate a library repository) and mcsema.
git clone --resursive git@github.com:trailofbits/remill.git

Enter the repository

cd remill

Build the code.

./build.sh

Building and Running the Test Suite

Build Google Test

On Linux

This script will build and install the Google Test framework. It will request administrator permissions.

./scripts/unix/install_gtest.sh

Generate and Run the Test Cases

sudo make build_x86_tests
ctest

Try it Out

Remill is a library, and so there is no single way to try it. However, you can head on over to the McSema repository and try that!