Git Product home page Git Product logo

mufuzz's Introduction

MuFuzz

MuFuzz: Sequence-Aware Mutation and Seed Mask Guidance for Blockchain Smart Contract Fuzzing

Requirements

MuFuzz is executed on Linux (ideally Ubuntu 18.04).

Dependencies:

Architecture

$(MuFuzz)
├── sFuzz
│   ├── fuzzer
│   ├── libfuzzer
│   ├── liboracle
│   └── ...
├── bran
│   └── ...
├── tools
│   ├── requirements.txt
│   └── ...
├── assets
│   ├── ReentrancyAttacker_model.sol
│   ├── ReentrancyAttacker.sol
│   └── ...
├── source_code
│   └── ...
├── clean_source_code
│   └── ...
├── contracts
│   └── ...
├── branch_msg
│   └── ...
├── logs
│   └── ...
├── fuzz
├── initial_.sh
├── rename_src.sh
├── run.sh
└── README.md
  • sFuzz: The basic fuzzing module of MuFuzz
  • bran: The abstract interpreter for path analysis
  • tools: The static analysis tools for extracting vulnerability-specific patterns
    • requirements.txt:Required python dependencies
  • assets:
    • ReentrancyAttacker_model.sol: The template for constructing an attacker contract
    • ReentrancyAttacker.sol: The attacker contract generated based on the template
  • source_code: Store the source code (.sol) of a contract
  • clean_source_code: Store the clean source code (.sol) of a contract
  • contracts/example1: Store the compiled results of a contract
  • branch_msg: Store the intermediate representations of a contract
  • logs: Store the execution report during fuzzing
  • fuzz: The complied executable fuzzer file (if you want to re-compile a fuzz file, you can refer to the following complete execution)

Quick Start

Rename contract under test

./rename_src.sh

Execute the fuzzer

./run.sh

Complete Execution

  • Initialization and Install system dependencies (This step will consume a lot of time.)
./initial_.sh
  • Make workspace for the contract in directory source_code and clean_source_code
./rename_src.sh
  • Run MuFuzz
./run.sh
  • Note: if you download the boost version >= 1.7.0, you may need to update the ".get_io_service()" (in sFuzz/libp2p/RLPxHandshake.h) to ".get_executor()".

Parameters Illustration

  • -p: prefuzz (path searching)
  • -r: report
  • -d: duration (fuzzing time)
  • -m: mode (1: mask, 0: default)
  • -o: order (1: new sequence, 0: default)

Dataset

We make all three datasets used in our paper publicly available. Download

mufuzz's People

Contributors

messi-q avatar papercodebase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mufuzz's Issues

chmod: cannot access 'fuzzMe': No such file or directory

chmod: cannot access 'fuzzMe': No such file or directory
./contracts/example/GuessNum.sol:21:37: Error: Expected ';' but got '{'
address(msg.sender).call{value: userBalance[msg.sender]}("");
^
GuessNum
./run.sh: line 19: evm: command not found
empty json file!
sudo: ./analyse_prefix_linuxarm64: command not found
chmod: cannot access 'fuzzMe': No such file or directory
empty json file!
我在执行./run.sh的时候总是提示一些环境未安装好,请问可以提供一个docker之类的环境么

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.