一句话:提出面向下一代合约分析的以太坊反编译器 Elipmoc,以事务敏感性、路径敏感参数推断等技术大幅提升精度与可扩展性。
以太坊区块链上的智能合约分析极具价值,但已部署合约的极低层表示带来巨大挑战。本文提出 Elipmoc,作为顶级研究反编译器 Gigahorse 的演进版本,通过若干高精度且可扩展的技术显著超越前代与现有工具。具体包括:新的事务敏感性(transactional sensitivity)上下文抽象,更有效地区分不同动态执行;路径敏感但借助路径合并保持可扩展的函数参数与返回值推断算法;以及完全上下文敏感的私有函数重建过程。基于 Elipmoc 构建的安全分析与逆向工程工具因此获得高可扩展性、精度与完备性。评估表明,Elipmoc 反编译合约的操作数完全解析率达 99.5%(Gigahorse 为 62.8%),外部调用覆盖相比工业工具 Panoramix 最多提升 67%,且速度超过 5 倍。该工具还促成了多个热门协议上可获利数百万美元漏洞的独立发现。
Smart contracts on the Ethereum blockchain greatly benefit from cutting-edge analysis techniques and pose significant challenges. A primary challenge is the extremely low-level representation of deployed contracts. We present Elipmoc, a decompiler for the next generation of smart contract analyses. Elipmoc is an evolution of Gigahorse, the top research decompiler, dramatically improving over it and over other state-of-the-art tools, by employing several high-precision techniques and making them scalable. Among these techniques are a new kind of context sensitivity (termed “transactional sensitivity”) that provides a more effective static abstraction of distinct dynamic executions; a path-sensitive (yet scalable, through path merging) algorithm for inference of function arguments and returns; and a fully context sensitive private function reconstruction process. As a result, smart contract security analyses and reverse-engineering tools built on top of Elipmoc achieve high scalability, precision and completeness. Elipmoc improves over all notable past decompilers, including its predecessor, Gigahorse, and the state-of-the-art industrial tool, Panoramix, integrated into the primary Ethereum blockchain explorer, Etherscan. Elipmoc produces decompiled contracts with fully resolved operands at a rate of 99.5% (compared to 62.8% for Gigahorse), and achieves much higher completeness in code decompilation than Panoramix—e.g., up to 67% more coverage of external call statements—while being over 5x faster. Elipmoc has been the enabler for recent (independent) discoveries of several exploitable vulnerabilities on popular protocols, over funds in the many millions of dollars.
@article{paperbot1513,
title = {Elipmoc: advanced decompilation of Ethereum smart contracts},
author = {Neville Grech and Sifis Lagouvardos and Ilias Tsatiris and Yannis Smaragdakis},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {OOPSLA1},
year = {2022},
doi = {10.1145/3527321}
}