Skip to content

Shorshaa/hello-smart-contract-security-tools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 76.8%
  • Python 23.2%