Giter Club home page Giter Club logo

bap-pintraces's Introduction

Overview

Pin tracer - a tracer based on Pin: Intel’s Dynamic Binary Instrumentation Engine. It executes a binary executable and saves trace data using Protocol Buffer format. The contents of the trace data is defined in bap-frames project.

Preparing to build

Note: building instructions assume that you're using Ubuntu, but it may work on other systems, that uses apt-get.

Before build tracer, you need download and install

  • pin
  • autoconf, libtool, protobuf-compiler, libboost-dev, libboost-filesystem-dev, libcrypto++-dev
  • piqi library

Here are installation example.

Download pin library:

$ wget http://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz

Suppose you want install pin to $(HOME)/opt directory then:

$ tar xvzf pin-2.14-71313-gcc.4.4.7-linux.tar.gz -C $HOME/opt

To let Pin's makefiles know where Pin is installed, set the PIN_ROOT environment variable with a command like:

$ export PIN_ROOT=$HOME/opt/pin-2.14-71313-gcc.4.4.7-linux

To let bash know where pin executable is installed add the PIN_ROOT to PATH environment variable with a command like:

$ export PATH=$PATH:$PIN_ROOT

It is probably a good idea to put this command in a startup script like .bashrc, so that you don't need to set the variable every time you log in:

$ echo 'export PIN_ROOT=$HOME/opt/pin-2.14-71313-gcc.4.4.7-linux' >>$HOME/.bashrc
$ echo 'export PATH=$PATH:$PIN_ROOT' >>$HOME/.bashrc

To install apt depends, use the following command

$ sudo apt-get install autoconf libtool protobuf-compiler libprotobuf-dev libboost-filesystem-dev libcrypto++-dev 

To install piqi library with opam, use the following command

$ opam install piqi

Build process

Download bap-frames with following command

$ git clone https://github.com/BinaryAnalysisPlatform/bap-frames.git

Change folder to bap-frames/libtrace. Build and install library with following command

$ ./autogen.sh 
$ ./configure 
$ make
$ make install

Download bap-pintraces with following command

$ git clone https://github.com/BinaryAnalysisPlatform/bap-pintraces.git

Change folder to bap-pintraces and build tracer with command

$ make

To run executable exec and to save taint infromation to <process id>-exec.frames, use

$ pin -injection child -t obj-intel64/gentrace.so -o exec.frames -logall_before 1 -- exec [exec args]

To run executable exec and to save the trace data to exec.frames, use

$ pin -injection child -t obj-intel64/bpt.so -o exec.frames -- exec [exec args]

bap-pintraces's People

Contributors

feseal avatar ivg avatar phasip avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.