libTriton  version 0.6 build 1389
Triton: Dynamic Binary Analysis Framework

Table of Contents

Description

Triton is a dynamic binary analysis (DBA) framework. It provides internal components like a Dynamic Symbolic Execution (DSE) engine, a Taint engine, AST representations of the x86 and the x86-64 instructions set semantics, SMT simplification passes, an SMT Solver Interface and, the last but not least, Python bindings.



Presentations and Publications



Installation

To be able to compile Triton, you must install these libraries before:

lib name version
libboost >= 1.55
libpython 2.7.x
libz3 >= 4.6.0
libcapstone >= 3.0
Pin (optional) 71313

Linux Installation

Once the libraries are installed, you can use cmake and make to build the libTriton.

$ git clone https://github.com/JonathanSalwan/Triton.git
$ cd Triton
$ mkdir build
$ cd build
$ cmake ..
$ sudo make -j install

OSX Installation

On OSX cmake might have some difficulties finding the correct python include/library paths. You can run the following to build indenpendent of your python version:

$ brew install boost capstone z3
$ git clone https://github.com/JonathanSalwan/Triton.git
$ cd Triton
$ mkdir build
$ cd build
$ cmake $(echo 'from os.path import abspath, join; from distutils.sysconfig import get_python_inc, get_python_lib; print "-DPYTHON_INCLUDE_DIR=%s -DPYTHON_LIBRARY=%s" % (get_python_inc(), abspath(join(get_python_lib(), "../../libpython2.7.dylib")))' | python) ..
$ sudo make -j install

Windows Installation

Once libraries installed, you can use cmake to generate the .sln file of the libTriton.

> git clone https://github.com/JonathanSalwan/Triton.git
> cd Triton
> mkdir build
> cd build
> cmake -G "Visual Studio 14 2015 Win64" \
-DBOOST_ROOT="C:/Users/jonathan/Works/Tools/boost_1_61_0" \
-DPYTHON_INCLUDE_DIRS="C:/Python27/include" \
-DPYTHON_LIBRARIES="C:/Python27/libs/python27.lib" \
-DZ3_INCLUDE_DIRS="C:/Users/jonathan/Works/Tools/z3-4.4.1-x64-win/include" \
-DZ3_LIBRARIES="C:/Users/jonathan/Works/Tools/z3-4.4.1-x64-win/bin/libz3.lib" \
-DCAPSTONE_INCLUDE_DIRS="C:/Users/jonathan/Works/Tools/capstone-3.0.4-win64/include" \
-DCAPSTONE_LIBRARIES="C:/Users/jonathan/Works/Tools/capstone-3.0.4-win64/capstone.lib" ..

However, if you prefer to directly download precompiled libraries, check out our AppVeyor's artefacts. Note that if you use AppVeyor's artefacts, you probably have to install the Visual C++ Redistributable packages for Visual Studio 2012.


Pintool for Linux users

This project is also shipped with a Pintool tracer and may be compiled with these following commands:

$ cd pin-2.14-71313-gcc.4.4.7-linux/source/tools/
$ git clone https://github.com/JonathanSalwan/Triton.git
$ cd Triton
$ mkdir build
$ cd build
$ cmake -DPINTOOL=on ..
$ make
$ cd ..
$ ./build/triton ./src/examples/pin/ir.py /usr/bin/id

It's not recommended to use the pintool on a kernel 4.x. The version 71313 of Pin doesn't support very well this branch (4.x). Anyway, if you feel lucky, you can compile the Triton pintool with the -DKERNEL4=on flag.

$ cmake -DPINTOOL=on -DKERNEL4=on ..
$ make

Note that only the version 71313 of Pin is supported.