Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 2.11 KB

README.md

File metadata and controls

67 lines (51 loc) · 2.11 KB

Vulnerable contracts

Contracts with several well-known vulnerabilities and their monitors to detect their exploitation.

Reentrancy (SWC-107)

Transaction Order Dependence (SWC-114)

(to be filled in)

Testing the contracts using truffle and ganache

Prerequisites

We need truffle and ganache-cli for testing.

Note that if you have never tested smart contracts on a local Ethereum network, please take a look at this brief memo.

without monitors

$ make ganache-start  
$ make test-solidity
Caveat
When something goes wrong, it is often the case that ganache needs to be *fully* restarted. To do so for sure, try the following.
  • `make ganache-stop`
  • `make clean`
  • `make ganache-start`

with monitors

$ make ganache-start  
$ make test-combined

References

  • SmartContractSecurity, "Smart Contract Weakness Classification and Test Cases". (link)
  • ConsenSys, "Smart contract best practices". (link)
  • hackingdistributed.com, "Analysis of the DAO exploit", 2016. (link)
  • Atzei N., Bartoletti M., Cimoli T., "A Survey of Attacks on Ethereum Smart Contracts", 2017. (link)
  • trufflesuite.com, "Tutorial: exploiting the DAO", 2016. (link)
  • Tim Coulter, "DarkDAO", 2016. (link)