arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1902.06067cs.CR
收藏

针对智能合约的精确攻击合成

Precise Attack Synthesis for Smart Contracts

Yu Feng, Emina Torlak, Rastislav Bodik

摘要:

智能合约是在区块链平台上运行的程序。它们通过定义良好的接口相互交互,在没有可信第三方的分布式系统中执行金融交易。但这些接口也为攻击者提供了有利的环境,他们可以利用智能合约中的安全漏洞来获取经济利益。本文介绍了SmartScopy,这是一个自动合成对抗性合同的系统,可以识别和利用受害者智能合同中的漏洞。我们的工具基于以太坊生态系统中受害者智能合约的应用程序二进制接口(ABI)规范探索了\emph{attack programs}的空间。为了使合成易于处理,我们引入了\emph{summary-based symbolic evaluation},这大大减少了我们的合成器需要象征性地评估的指令的数量,而不影响漏洞查询的精度。在基于摘要的符号评估的基础上,SmartScopy进一步引入了一种新的方法,用于划分合成搜索空间进行并行探索,以及一种轻量级的演绎技术,可以更早地修剪不可行的候选人。我们在我们的查询语言中编码了智能合约的常见漏洞,并使用$>$ 25K智能合约对来自etherscan的整个数据集进行了SmartScopy评估。我们的实验证明了基于摘要的符号评估的好处,并表明SmartScopy在运行时间,精度和可靠性方面优于两个最先进的智能合约分析器Oyente和Contractfuzz。此外,在最近流行的智能合约上运行,SmartScopy发现了20个易受攻击的智能合约,这些智能合约包含最近的BatchOverflow漏洞,并且无法被现有工具精确检测到。

英文摘要:

Smart contracts are programs running on top of blockchain platforms. They interact with each other through well-defined interfaces to perform financial transactions in a distributed system with no trusted third parties. But these interfaces also provide a favorable setting for attackers, who can exploit security vulnerabilities in smart contracts to achieve financial gain. This paper presents SmartScopy, a system for automatic synthesis of adversarial contracts that identify and exploit vulnerabilities in a victim smart contract. Our tool explores the space of \emph{attack programs} based on the Application Binary Interface (ABI) specification of a victim smart contract in the Ethereum ecosystem. To make the synthesis tractable, we introduce \emph{summary-based symbolic evaluation}, which significantly reduces the number of instructions that our synthesizer needs to evaluate symbolically, without compromising the precision of the vulnerability query. Building on the summary-based symbolic evaluation, SmartScopy further introduces a novel approach for partitioning the synthesis search space for parallel exploration, as well as a lightweight deduction technique that can prune infeasible candidates earlier. We encoded common vulnerabilities of smart contracts in our query language, and evaluated SmartScopy on the entire data set from etherscan with $>$25K smart contracts. Our experiments demonstrate the benefits of summary-based symbolic evaluation and show that SmartScopy outperforms two state-of-the-art smart contracts analyzers, Oyente and Contractfuzz, in terms of running time, precision, and soundness. Furthermore, running on recent popular smart contracts, SmartScopy uncovers 20 vulnerable smart contracts that contain the recent BatchOverflow vulnerability and cannot be precisely detected by existing tools.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑