All Projects → ucsb-seclab → sasi

ucsb-seclab / sasi

Licence: MIT license
Signedness-Agnostic Strided-Interval

Programming Languages

C++
36643 projects - #6 most used programming language
shell
77523 projects
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to sasi

clam
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 180 (+462.5%)
Mutual labels:  program-analysis, abstract-interpretation
progge.rs
Program analysis playground for a simple, imperative language
Stars: ✭ 29 (-9.37%)
Mutual labels:  program-analysis, abstract-interpretation
Pyre Check
Performant type-checking for python.
Stars: ✭ 5,716 (+17762.5%)
Mutual labels:  program-analysis, abstract-interpretation
Ikos
Static analyzer for C/C++ based on the theory of Abstract Interpretation.
Stars: ✭ 1,368 (+4175%)
Mutual labels:  program-analysis
Bap
Binary Analysis Platform
Stars: ✭ 1,385 (+4228.13%)
Mutual labels:  program-analysis
Tajs
Type Analyzer for JavaScript
Stars: ✭ 150 (+368.75%)
Mutual labels:  program-analysis
soap
🎯 soap - Structural Optimisation of Arithmetic Programs
Stars: ✭ 21 (-34.37%)
Mutual labels:  abstract-interpretation
Ultimate
Stars: ✭ 95 (+196.88%)
Mutual labels:  program-analysis
Codeql Go
The CodeQL extractor and libraries for Go.
Stars: ✭ 224 (+600%)
Mutual labels:  program-analysis
Crab Llvm
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 143 (+346.88%)
Mutual labels:  program-analysis
Tip
Static program analysis for TIP
Stars: ✭ 140 (+337.5%)
Mutual labels:  program-analysis
Sojobo
A binary analysis framework
Stars: ✭ 116 (+262.5%)
Mutual labels:  program-analysis
Pyt
A Static Analysis Tool for Detecting Security Vulnerabilities in Python Web Applications
Stars: ✭ 2,061 (+6340.63%)
Mutual labels:  program-analysis
Crab
CoRnucopia of ABstractions: a library for building abstract interpretation-based analyses
Stars: ✭ 102 (+218.75%)
Mutual labels:  program-analysis
Dg
[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
Stars: ✭ 242 (+656.25%)
Mutual labels:  program-analysis
Patdroid
A Program Analysis Toolkit for Android
Stars: ✭ 95 (+196.88%)
Mutual labels:  program-analysis
Manticore
Symbolic execution tool
Stars: ✭ 2,599 (+8021.88%)
Mutual labels:  program-analysis
Semgrep Rules
Semgrep rules registry
Stars: ✭ 140 (+337.5%)
Mutual labels:  program-analysis
Mythril
Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
Stars: ✭ 1,968 (+6050%)
Mutual labels:  program-analysis
Triton
Triton is a Dynamic Binary Analysis (DBA) framework. It provides internal components like a Dynamic Symbolic Execution (DSE) engine, a dynamic taint engine, AST representations of the x86, x86-64, ARM32 and AArch64 Instructions Set Architecture (ISA), SMT simplification passes, an SMT solver interface and, the last but not least, Python bindings.
Stars: ✭ 1,934 (+5943.75%)
Mutual labels:  program-analysis

Signedness-Agnostic Strided Interval Analysis

This project provides the implementation of a new interval analysis, called Signed-Agnostic Strided interval analysis. It is implemented in C++ using the LLVM framework, and currently, it has only support for C programs which are translated to LLVM IR (Intermediate Representation) via Clang.

You can find the Signed-Agnostic Strided interval paper at https://seclab.cs.ucsb.edu/media/uploads/papers/bintrimmer.pdf.

This implementation is based on Wrapped Intervals (https://github.com/sav-tools/wrapped-intervals).

Installation

Checkout and installation of LLVM and Clang

  1. Get the required tools

  2. Checkout LLVM:

    • LLVM_ROOT=any_directory_you_like
    • cd $LLVM_ROOT
    • svn co -r 139364 http://llvm.org/svn/llvm-project/llvm/trunk llvm
  3. Checkout Clang (C/C++ frontend):

    • cd $LLVM_ROOT/llvm/tools
    • svn co -r 139290 http://llvm.org/svn/llvm-project/cfe/trunk clang
  4. Build LLVM and Clang:

    • cd $LLVM_ROOT/llvm
    • mkdir build
    • cd build
    • ../configure -enable-optimized=no CC="gcc -m32" CXX="g++ -m32"
    • make This builds both LLVM and Clang for debug mode.

Checkout and installation of the Signed-Agnostic Strided Interval Analysis

  • Be sure LLVM_ROOT is set properly
  • git clone [email protected]:ucsb-seclab/sasi.git
  • cd sasi
  • ./configure --with-llvmsrc=$LLVM_ROOT/llvm --with-llvmobj=$LLVM_ROOT/llvm/build
  • ./make

Usage

tools/run.sh prog[.c|.bc]  Pass [options] 

Pass is the pass that we want to run: 
  -strided-wrapped-range-analysis      Strided Fixed-Width Wrapped Integer Range Analysis (SASI)	
  -wrapped-range-analysis      fixed-width wrapped interval analysis
  -range-analysis                fixed-width classical interval analysis
    options:
      -widening n                n is the widening threshold (0: no widening)
      -narrowing n               n is the number of narrowing iterations (0: no narrowing)
      -alias                     by default, -no-aa which always return maybe. If enabled 
                                 then -basic-aa and -globalsmodref-aa are run to be more precise
                                 with global variables.
      -enable-optimizations      enable LLVM optimizations
      -inline n                  inline function calls whenever possible if the size of 
                                 the function is less than n. (0: no inlining). 
                                 A reasonable threshold n is, e.g., 255.
      -instcombine               remove redundant instructions.
                                 It can improve precision by removing problematic casting 
                                 instructions among many other things.
      -insert-ioc-traps          Compile .c program with -fcatch-undefined-ansic-behavior 
                                 which generates IOC trap blocks.  
                                 Note: clang version must support -fcatch-undefined-ansic-behavior    
                       
  general options:
    -help                          print this message
    -stats                         print stats
    -time                          print LLVM time passes
    -dot-cfg                       print .dot file of the LLVM IR
    -debug                         print debugging messages

Running Benchmarks

  1. Extract all benchmarks in the folder benchmark_evaluation/spec_benchmarks/
  2. For each one fo them run ./configure && make
  3. Run:
cd benchmark_evaluation
python benchmark_config.py
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].