GithubHelp home page GithubHelp logo

llvm-ir-taint's Introduction

llvm-ir-taint: Taint tracking for LLVM IR

crates.io License

This crate provides static taint-tracking for LLVM IR.

Getting started

llvm-ir-taint is on crates.io, so you can simply add it as a dependency in your Cargo.toml, selecting the feature corresponding to the LLVM version you want:

[dependencies]
llvm-ir-taint = { version = "0.1.1", features = ["llvm-13"] }

Currently, the supported LLVM versions are llvm-8, llvm-9, llvm-10, llvm-11, llvm-12, and llvm-13. The corresponding LLVM library must be available on your system; see the llvm-sys README for more details and instructions.

You'll also need some LLVM IR to analyze, in the form of one or more llvm-ir Modules. This can be easily generated from an LLVM bitcode file; for more detailed instructions, see llvm-ir's README.

Once you have one or more Modules, you can call do_taint_analysis_on_function() to analyze a single function (and all functions it calls, including transitively), or do_taint_analysis_on_module() to analyze all the functions in an LLVM module.

let module = Module::from_bc_path(...)?;
let taint_result = do_taint_analysis_on_function(&[module], ...);

Either of these functions return a TaintResult, from which you can get information about the result of an analysis, such as which variables are tainted.

For more details, see the docs.

llvm-ir-taint's People

Contributors

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