Giter Site home page Giter Site logo

anonymous's Introduction

Cross-platform Automatic Exploit Generation for Smart Contracts

This tool contains four main modules.

pre-requisites

> brew install llvm@7
> echo 'export PATH="/usr/local/opt/llvm@7/bin:$PATH"' >> ~/.zshrc
> source ~/.zshrc
> pip3 install llvmlite==0.31.0 solidity_parser==0.0.7

1. sol2ll-frontend-python

A Solidity frontend based on python-solidity-parser, which translates Solidity into LLVM for Ethereum Smart Contracts.

Usage:

> cd anonymous/sol2ll-frontend-python
> python3 sol2ll-frontend-python.py <dataset path> <log file path>

Example:

> cd anonymous/sol2ll-frontend-python
> python3 sol2ll-frontend-python.py ./test/ ./test/frontend.log

There is a sample Solidity file called "simple.sol" and the frontend will output a corresponding LLVM file "simple.ll" in same directory.

2. backward-analyzer

A backward analyzer performing taint analysis and backward control/dataflow tracking, which outputs Partially-ordered Transactional Set (PTS) in JSON format.

Usage:

> cd anonymous/backward-analyzer
> python3 backward-analyzer.py <dataset path> <log file path> <vulnerability type: 1. intflow 2. reentrancy 3. teether>

Example:

> cd anonymous/backward-analyzer
> python3 backward-analyzer.py ../sol2ll-frontend-python/test/ ../sol2ll-frontend-python/test/backward.log intflow

There is a sample LLVM file "simple.ll" (translated from "simple.sol") and the analyzer will output PTSes to a corresponding JSON file "simple.json" in same directory.

3. KleeTool

This tool initializes state variables with values crawled from blockchain.

4. KLEE

A modified symbolic executor based on KLEE v2.1, which symbolically executes smart contracts in LLVM IR to solve the constraints.

anonymous's People

Contributors

here4thee avatar

Watchers

 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.