Giter VIP home page Giter VIP logo

hello-smart-contract-security-tools's Introduction

hello-smart-contract-security-tools

docker pull trailofbits/eth-security-toolbox
docker run -it --rm -v $PWD:/code trailofbits/eth-security-toolbox

solc-select 0.5.11
cd /code

Install Vyper

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip install vyper

Slither

# slither analysis
slither --exclude-dependencies .

# save warnings / erros to ignore
slither . --triage

# reset Slither
rm slither.db.json

# quick review
slither . --print human-summary

slither . --print inheritance-graph
xdot contracts.dot

slither . --print contract-summary

# in-depth review
slither . --print call-graph
slither . --print cfg
slither . --print function-summary
slither . --print vars-and-auth

# tools
## check ERC
slither-check-erc contract.sol contractName
## auto generate Echinda tests for ERC20 contract
slither-prop contract.sol --contract contractName

Echidna

echidna-test contracts/echidna/TestToken.sol
# if multiple contracts inside a file
echidna-test contracts/echidna/TestToken.sol --contract TestToken

# filter functions
echidna-test contracts/echidna/Filter.sol --config config/echidna/filter.yaml

# test asserts
echidna-test contracts/echidna/Assert.sol --config config/echidna/assert.yaml

# output corpus
echidna-test contracts/echidna/Corpus.sol --config config/echidna/corpus.yaml

# find high gas consumption
echidna-test contracts/echidna/Gas.sol --config config/echidna/gas.yaml

Manticore

# install

virtualenv -p python3 venv
source venv/bin/activate
pip3 install -r requirements.txt
# cli
manticore <folder or file>
manticore contract.sol --quick-mode --contract MyContract

# python
cd contracts/manticore
python3 example_run.py

Manticore Verifier

manticore-verifier contracts/manticore-verifier/TestToken.sol --contract TestToken

TODO

  • echidna openzeppelin
  • echidna vyper

hello-smart-contract-security-tools's People

Contributors

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