大规模地发现贪婪、挥霍和自杀的合同
Finding The Greedy, Prodigal, and Suicidal Contracts at Scale
摘要:
智能合约--托管在以太坊等区块链上的有状态可执行对象--携带价值数十亿美元的硬币,一旦部署就无法更新。我们提出了一个新的系统的一类跟踪漏洞,这是由于在其生命周期内分析多次调用的合同的特性。我们把注意力集中在三个这样的跟踪漏洞的示例属性:找到合同,要么无限期锁定资金,不小心泄漏给任意用户,或者可以被任何人杀死。我们实现了MAIAN,第一个工具,用于精确指定和推理的跟踪属性,它采用了过程间的符号分析和具体的验证器来展示真正的漏洞。我们对近100万份合约的分析显示,34,200份(2,365份不同的)合约易受攻击,每份合约10秒。在我们抽样进行具体验证和手动分析的3,759份合同的子集上,我们以89%的真阳性率再现了真正的漏洞,产生了3,686份合同的漏洞。我们的工具发现了臭名昭著的Parity漏洞的漏洞,该漏洞间接锁定了价值2亿美元的以太币,而之前的分析未能捕捉到这一点。
英文摘要:
Smart contracts---stateful executable objects hosted on blockchains like Ethereum---carry billions of dollars worth of coins and cannot be updated once deployed. We present a new systematic characterization of a class of trace vulnerabilities, which result from analyzing multiple invocations of a contract over its lifetime. We focus attention on three example properties of such trace vulnerabilities: finding contracts that either lock funds indefinitely, leak them carelessly to arbitrary users, or can be killed by anyone. We implemented MAIAN, the first tool for precisely specifying and reasoning about trace properties, which employs inter-procedural symbolic analysis and concrete validator for exhibiting real exploits. Our analysis of nearly one million contracts flags 34,200 (2,365 distinct) contracts vulnerable, in 10 seconds per contract. On a subset of3,759 contracts which we sampled for concrete validation and manual analysis, we reproduce real exploits at a true positive rate of 89%, yielding exploits for3,686 contracts. Our tool finds exploits for the infamous Parity bug that indirectly locked 200 million dollars worth in Ether, which previous analyses failed to capture.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。