arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2103.09113cs.SEcs.CR
收藏

EtherSolve:从以太坊字节码计算精确的控制流图

EtherSolve: Computing an Accurate Control-Flow Graph from Ethereum Bytecode

Filippo Contro, Marco Crosara, Mariano Ceccato, Mila Dalla Preda

摘要:

由于以太坊智能合约及其交易的不可变性,已经提出了很多方法来检测缺陷和安全问题,然后智能合约在区块链中变得持久,并被授予对大量财务价值的控制权。由于智能合约源代码可能不可用,静态分析方法主要面临分析编译的以太坊字节码的挑战,这些字节码可直接从官方区块链获得。然而,由于以太坊字节码的内在复杂性(特别是在跳转解析方面),静态分析遇到了重大障碍,降低了现有自动化工具的准确性。本文提出了一种新的基于以太坊操作数堆栈的符号执行的静态分析算法,该算法允许我们解决以太坊字节码中的跳转,并构建编译智能合约的精确控制流图(CFG)。EtherSolve是我们方法的原型实现。在一组重要的现实世界以太坊智能合约上的实验结果表明,EtherSolve相对于最先进的可用方法提高了被执行的CFG的准确性。许多静态分析技术基于代码的CFG表示,因此将受益于CFG的准确提取。例如,我们实现了EtherSolve的一个简单扩展,允许检测重入漏洞的实例。

英文摘要:

Motivated by the immutable nature of Ethereum smart contracts and of their transactions, quite many approaches have been proposed to detect defects and security problems before smart contracts become persistent in the blockchain and they are granted control on substantial financial value. Because smart contracts source code might not be available, static analysis approaches mostly face the challenge of analysing compiled Ethereum bytecode, that is available directly from the official blockchain. However, due to the intrinsic complexity of Ethereum bytecode (especially in jump resolution), static analysis encounters significant obstacles that reduce the accuracy of exiting automated tools. This paper presents a novel static analysis algorithm based on the symbolic execution of the Ethereum operand stack that allows us to resolve jumps in Ethereum bytecode and to construct an accurate control-flow graph (CFG) of the compiled smart contracts. EtherSolve is a prototype implementation of our approach. Experimental results on a significant set of real world Ethereum smart contracts show that EtherSolve improves the accuracy of the execrated CFGs with respect to the state of the art available approaches. Many static analysis techniques are based on the CFG representation of the code and would therefore benefit from the accurate extraction of the CFG. For example, we implemented a simple extension of EtherSolve that allows to detect instances of the re-entrancy vulnerability.

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

↑