Elipmoc: Advanced Decompilation of Ethereum Smart Contracts

被引:13
作者
Grech, Neville [1 ,2 ]
Lagouvardos, Sifis [2 ,3 ]
Tsatiris, Ilias [2 ,3 ]
Smaragdakis, Yannis [2 ,3 ]
机构
[1] Univ Malta, Msida, Malta
[2] Dedaub Ltd, Birkirkara, Malta
[3] Univ Athens, Athens, Greece
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2022年 / 6卷 / OOPSLA期
关键词
Program Analysis; Smart Contracts; Decompilation; Datalog; Security; Ethereum; Blockchain;
D O I
10.1145/3527321
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 stateof-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 decornpilation 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.
引用
收藏
页数:27
相关论文
共 56 条
[1]  
[Anonymous], 1991, CONTROL FLOW ANAL HI
[2]  
[Anonymous], 2018, ONLINE SOLIDITY DECO
[3]  
[Anonymous], 2014, Technical report
[4]   Speculative disassembly of binary code [J].
Ben Khadra, M. Ammar ;
Stoffel, Dominik ;
Kunz, Wolfgang .
2016 INTERNATIONAL CONFERENCE ON COMPILERS, ARCHITECTURE AND SYNTHESIS FOR EMBEDDED SYSTEMS (CASES), 2016,
[5]  
Brent L., 2018, ARXIV180903981
[6]   Ethainter: A Smart Contract Security Analyzer for Composite Vulnerabilities [J].
Brent, Lexi ;
Grech, Neville ;
Lagouvardos, Sifis ;
Scholz, Bernhard ;
Smaragdakis, Yannis .
PROCEEDINGS OF THE 41ST ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '20), 2020, :454-469
[7]   SigRec: Automatic Recovery of Function Signatures in Smart Contracts [J].
Chen, Ting ;
Li, Zihao ;
Luo, Xiapu ;
Wang, Xiaofeng ;
Wang, Ting ;
He, Zheyuan ;
Fang, Kezhao ;
Zhang, Yufei ;
Zhu, Hang ;
Li, Hongwei ;
Cheng, Yan ;
Zhang, Xiaosong .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (08) :3066-3086
[8]  
Cifuentes C., 1994, Reverse compilation techniques
[9]   EtherSolve: Computing an Accurate Control-Flow Graph from Ethereum Bytecode [J].
Contro, Filippo ;
Crosara, Marco ;
Ceccato, Mariano ;
Dalla Preda, Mila .
2021 IEEE/ACM 29TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2021), 2021, :127-137
[10]  
Dedaub, 2021, YIELD SKIMM FORC BAD