Git Product home page Git Product logo

functrace's Introduction

functrace - A function tracer

functrace is a tool that helps to analyze a binary file with dynamic instrumentation using DynamoRIO (http://dynamorio.org/).

These are some implemented features (based on DynamoRIO):

  • disassemble all the executed code
  • disassemble a specific function (dump if these are addresses)
  • get arguments of a specific function (dump if these are addresses)
  • get return value of a specific function (dump if this is an address)
  • monitors application signals
  • generate a report file
  • ghidra(https://ghidra-sre.org/) coverage script (based on the functrace report file)

Setup

$ wget https://github.com/DynamoRIO/dynamorio/releases/download/release_7_0_0_rc1/DynamoRIO-Linux-7.0.0-RC1.tar.gz
$ tar xvzf DynamoRIO-Linux-7.0.0-RC1.tar.gz
$ git clone https://github.com/invictus1306/functrace
$ mkdir -p functrace/build
$ cd functrace/build
$ cmake .. -DDynamoRIO_DIR=/full_DR_path/DynamoRIO-Linux-7.0.0-RC1/cmake/
$ make -j4

Simple DEMO

functrace

Using functrace

$ drrun -c libfunctrace.so -report_file report -- target_program [args]

Options

The following [functrace](https://github.com/invictus1306/functrace) options are supported:

-disassembly                    -> disassemble all the functions 
-disas_func function_name       -> disassemble only the function function_name	
-wrap_function function_name    -> wrap the function function_name				
-wrap_function_args num_args    -> number of arguments of the wrapped function
-cbr                            -> remove the bb from the cache (in case of conditional jump)
-report_file file_name          -> report file name (required)
-verbose                        -> verbose

Simple usage

Option -verbose

$ drrun -c libfunctrace.so -report_file report -verbose -- target_program [args]

Option -disassemby

$ drrun -c libfunctrace.so -report_file report -disassembly -- target_program [args]

Option -disas_func

$ drrun -c libfunctrace.so -report_file report -disas_func name_function -- target_program [args]

Option -wrap_function and -wrap_function_args

$ drrun -c libfunctrace.so -report_file report -wrap_function name_function -wrap_function_args num_args -- target_program [args]

Option -cbr

$ drrun -c libfunctrace.so -report_file report -cbr -- target_program [args]

CVE-2018-4013 - Vulnerability Analysis

A vulnerability on the LIVE555 RTSP server library. This is the description.

vulnanalysis

Working enviroment

Tested on Ubuntu 16.04.5 LTS 64 bit

Future features

  • Ghidra plugin
  • Visual setup interface
  • Store and compare different coverage analysis
  • Run DR directy
  • Add more functionality to functrace
  • Support for Android

functrace's People

Contributors

invictus1306 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.