ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detection
Decentralized cryptocurrencies feature the use of blockchain technology to transfer value among peers on the network without central agency. Smart contracts are programs running on top of the blockchain consensus protocol to enable people make agreement via blockchain while minimizing trust. While millions of smart contracts exists to help build decentralized applications, the security vulnerabilities within the smart contracts pose big threat to their applications. Indeed, many critical security vulnerabilities within smart contracts on Ethereum platform have caused huge financial loss to its users. In this work, we build a fuzzing framework to test Ethereum smart contracts for security vulnerabilities. We propose test oracles for detecting security vulnerabilities, generate fuzzing input based on the ABI specifications of the smart contracts, instrument the EVM to collect executions logs characterizing smart contracts runtime behavior and analyze the logs to report vulnerabilities. Our fuzzing on 6991 smart contracts has flagged more than 459 vulnerabilities with high precision. In particular, our fuzzing tool can detect the vulnerability of the DAO contract that leads to 60 million US loss and the vulnerabilities of Parity Wallet that has lead to the loss of 30 million USD and the freezing of 150 million USD worth of Ether.
READ FULL TEXT