Giter Club home page Giter Club logo

bbtrace's Introduction

Basic Block Trace: DynamoRIO client

This clients will record the code flow by basic block address.

How to build:

If you have Visual Studio 15 (2017), open the x86 Native Tools Command Prompt. Set the environment variable DYNAMORIO_HOME into dynamorio (eg. C:\Workspace\dynamorio\exports).

See build.cmd to create build dir and prepare cmake.

build

Then see make.cmd to run compile.

make

Or

make bbtrace
make parselog

How to test:

See test.cmd:

test

How to run:

See run.cmd, to run instrumentation for example:

run bbtrace -- %windir%\system32\calc.exe

By default the CONFIG is relase or called RelWithDebInfo, so the output will be at bin\RelWithDebInfo including the bbtrace trace output which is placed on same directory as the client dll.

The trace file will have name bbtrace.dll.calc.exe.yyyymmdd-hhiiss.ext with the ext:

  • txt -> info or log
  • bin -> main thread trace
  • bin.%id% -> per thread trace

How to parse log:

If the executable name calc.exe then:

run parselog -j bin\RelWithDebInfo\bbtrace.dll.calc.exe.yyyymmdd-hhiiss.bin`

Option -j to enable multithread. The parselog actually doing nothing.

If you want to dump the list of basic block executed use grapher

run grapher -j bin\RelWithDebInfo\bbtrace.dll.calc.exe.yyyymmdd-hhiiss.bin`

The output csv will be: bin\RelWithDebInfo\bbtrace.dll.calc.exe.yyyymmdd-hhiiss.csv

bbtrace's People

Contributors

firodj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bbtrace's Issues

cool project!

this looks like a cool project! any more documentation on what it does, how it works, etc?

keep it up, cheers.

Issues compiling

Hello,

First thank you so much for making bbtrace, however, I am having issues with compiling it as I am getting the following:

Screenshot 2023-06-26 at 10 27 53 PM

I did set DynamoRIO env variable, I am using DynamoRIO-8.0.0-1 with VS 2019 (I adjusted build.cmd to "cmake -G "Visual Studio 16"")

CMakeOutput.log

Thank you!

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.