ExGen: Cross-platform, Automated Exploit Generation for Smart Contract Vulnerabilities
Abstract
Smart contracts, just like other computer programs, are prone to a variety of vulnerabilities, which lead to severe consequences including massive token and coin losses. Prior works have explored automated exploit generation for vulnerable Ethereum contracts. However, the scopes of prior works are limited in both vulnerability types and contract platforms. In this paper, we propose a cross-platform framework, calledExGen, to generate multiple transactions as exploits to given vulnerable smart contracts.ExGenfirst translates either Ethereum or EOS contracts to an intermediate representation (IR). Then,ExGengenerates symbolic attack contracts with transactions in a partial order and then symbolically executes the attack contracts together with the target to find and solve all the constraints. Lastly,ExGenconcretizes all the symbols, generates attack contracts with multiple transactions, and verifies the generated contractsâ exploitability on a private chain with values crawled from the public chain. We implemented a prototype ofExGenand evaluated it on Ethereum and EOS benchmarks.ExGensuccessfully exploits 1,258/1,399 (89.9%) Ethereum and 126/130 (96.9%) EOS vulnerabilities.ExGenis also able to exploit zero-day vulnerabilities on EOS.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.