论文标题
通过静态分析寻找以太坊智能合约中的重新进入攻击
Hunting for Re-Entrancy Attacks in Ethereum Smart Contracts via Static Analysis
论文作者
论文摘要
Ethereum Smart合同是在由点对点网络管理的基于共识的区块链中部署和执行的程序。近年来,已经发现了几次旨在窃取以太坊的加密货币的弹药攻击,这些攻击已在以太坊中使用的智能合同中存储。与此类攻击的对策是基于动态分析,该分析本身会执行智能合约,但它需要以太和攻击模式知识的支出,以提前分析。在本文中,我们提出了一个静态分析工具,名为\ textIt {Ra(重新输入分析仪)}},这是通过满足性模型理论求解器的符号执行和等价检查的组合,以分析智能合约脆弱性以重新进入攻击。与现有工具相反,RA仅通过仅使用目标智能合约的Etherum Virtual Machine字节码来支持合同间行为,即即使没有先验的攻击模式,并且没有支出,也没有支出。此外,RA可以在不执行智能合约的情况下验证重新进入攻击的脆弱性,并且不提供误报和假否定性。我们还提出了RA的实施,以评估其在分析部署的智能合约以重新进入攻击的脆弱性时的性能,并表明RA可以精确确定哪些智能合约是脆弱的。
Ethereum smart contracts are programs that are deployed and executed in a consensus-based blockchain managed by a peer-to-peer network. Several re-entrancy attacks that aim to steal Ether, the cryptocurrency used in Ethereum, stored in deployed smart contracts have been found in the recent years. A countermeasure to such attacks is based on dynamic analysis that executes the smart contracts themselves, but it requires the spending of Ether and knowledge of attack patterns for analysis in advance. In this paper, we present a static analysis tool named \textit{RA (Re-entrancy Analyzer)}, a combination of symbolic execution and equivalence checking by a satisfiability modulo theories solver to analyze smart contract vulnerabilities to re-entrancy attacks. In contrast to existing tools, RA supports analysis of inter-contract behaviors by using only the Etherum Virtual Machine bytecodes of target smart contracts, i.e., even without prior knowledge of attack patterns and without spending Ether. Furthermore, RA can verify existence of vulnerabilities to re-entrancy attacks without execution of smart contracts and it does not provide false positives and false negatives. We also present an implementation of RA to evaluate its performance in analyzing the vulnerability of deployed smart contracts to re-entrancy attacks and show that RA can precisely determine which smart contracts are vulnerable.