Giter Club home page Giter Club logo

dyninst-tools's Introduction

dyninst-tools

A collection of command-line tools based on Dyninst (https://github.com/dyninst/dyninst).

These tools can be used as examples of showing how to use Dyninst and as testing and debugging tools for Dyninst.

Shadow Stack

SimpleShadowStack.cpp: A mutator for implementing a shadow stack. It illustrates the basic usage of using Dyninst to rewrite an executable

MemoryAccessShadowStack.cpp: A mutator that analyze each function to decide whether or not to insert instrumentation. It represents a more advanced use of Dyninst by combining static binary analysis with instrumentation

shadowstack.c: A shared library for shadow stack instrumentation

Insert a code buffer as instrumentation

The BPatch interface in Dyninst provides a snippet based interface to construct instrumentation via a set of BPatch_snippet classes. However, when the user wants to experiment with new instructions in a new ISA, the BPatch interface does not provide a way to do that.

In this example, we use PatchAPI, a component library in Dyninst to show how to insert a code buffer as instrumentation. The user will be responsible to emit machine instructions to the code buffer. Two useful software tools for encoding instructions are asmjit (https://github.com/asmjit/asmjit) and Intel Xed (https://github.com/intelxed/xed).

ParseAPI tools

CFGConsistency: This tool checks whether the blocks acquired through traversing the CFG match the ones acquired through looking up by addresses

CodeDump: This tool iterates every function and basic block and prints the instructions in each basic block. This tool can be used to check whether there are missing entries in instruction decoding tables inside Dyninst.

dyninst-tools's People

Contributors

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