Gigahorse: Thorough, Declarative Decompilation of Smart Contracts

Neville Grech, Lexi Brent, Bernhard Scholz, Y. Smaragdakis
{"title":"Gigahorse: Thorough, Declarative Decompilation of Smart Contracts","authors":"Neville Grech, Lexi Brent, Bernhard Scholz, Y. Smaragdakis","doi":"10.1109/ICSE.2019.00120","DOIUrl":null,"url":null,"abstract":"The rise of smart contractsThe rise of smart contracts–autonomous applications running on blockchains–has led to a growing number of threats, necessitating sophisticated program analysis. However, smart contracts, which transact valuable tokens and cryptocurrencies, are compiled to very low-level bytecode. This bytecode is the ultimate semantics and means of enforcement of the contract. We present the Gigahorse toolchain. At its core is a reverse compiler (i.e., a decompiler) that decompiles smart contracts from Ethereum Virtual Machine (EVM) bytecode into a highlevel 3-address code representation. The new intermediate representation of smart contracts makes implicit data- and controlflow dependencies of the EVM bytecode explicit. Decompilation obviates the need for a contract’s source and allows the analysis of both new and deployed contracts. Gigahorse advances the state of the art on several fronts. It gives the highest analysis precision and completeness among decompilers for Ethereum smart contracts–e.g., Gigahorse can decompile over 99.98% of deployed contracts, compared to 88% for the recently-published Vandal decompiler and under 50% for the state-of-the-practice Porosity decompiler. Importantly, Gigahorse offers a full-featured toolchain for further analyses (and a \"batteries included\" approach, with multiple clients already implemented), together with the highest performance and scalability. Key to these improvements is Gigahorse’s use of a declarative, logic-based specification, which allows high-level insights to inform low-level decompilation.autonomous applications running on blockchains---has led to a growing number of threats, necessitating sophisticated program analysis. However, smart contracts, which transact valuable tokens and cryptocurrencies, are compiled to very low-level bytecode. This bytecode is the ultimate semantics and means of enforcement of the contract. We present the Gigahorse toolchain. At its core is a reverse compiler (i.e., a decompiler) that decompiles smart contracts from Ethereum Virtual Machine (EVM) bytecode into a high-level 3-address code representation. The new intermediate representation of smart contracts makes implicit data- and control-flow dependencies of the EVM bytecode explicit. Decompilation obviates the need for a contract's source and allows the analysis of both new and deployed contracts. Gigahorse advances the state of the art on several fronts. It gives the highest analysis precision and completeness among decompilers for Ethereum smart contracts---e.g., Gigahorse can decompile over 99.98\\% of deployed contracts, compared to 88\\% for the recently-published Vandal decompiler and under 50\\% for the state-of-the-practice Porosity decompiler. Importantly, Gigahorse offers a full-featured toolchain for further analyses (and a ``batteries included'' approach, with multiple clients already implemented), together with the highest performance and scalability. Key to these improvements is Gigahorse's use of a declarative, logic-based specification, which allows high-level insights to inform low-level decompilation.","PeriodicalId":6736,"journal":{"name":"2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)","volume":"20 1","pages":"1176-1186"},"PeriodicalIF":0.0000,"publicationDate":"2019-05-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"72","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSE.2019.00120","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 72

Abstract

The rise of smart contractsThe rise of smart contracts–autonomous applications running on blockchains–has led to a growing number of threats, necessitating sophisticated program analysis. However, smart contracts, which transact valuable tokens and cryptocurrencies, are compiled to very low-level bytecode. This bytecode is the ultimate semantics and means of enforcement of the contract. We present the Gigahorse toolchain. At its core is a reverse compiler (i.e., a decompiler) that decompiles smart contracts from Ethereum Virtual Machine (EVM) bytecode into a highlevel 3-address code representation. The new intermediate representation of smart contracts makes implicit data- and controlflow dependencies of the EVM bytecode explicit. Decompilation obviates the need for a contract’s source and allows the analysis of both new and deployed contracts. Gigahorse advances the state of the art on several fronts. It gives the highest analysis precision and completeness among decompilers for Ethereum smart contracts–e.g., Gigahorse can decompile over 99.98% of deployed contracts, compared to 88% for the recently-published Vandal decompiler and under 50% for the state-of-the-practice Porosity decompiler. Importantly, Gigahorse offers a full-featured toolchain for further analyses (and a "batteries included" approach, with multiple clients already implemented), together with the highest performance and scalability. Key to these improvements is Gigahorse’s use of a declarative, logic-based specification, which allows high-level insights to inform low-level decompilation.autonomous applications running on blockchains---has led to a growing number of threats, necessitating sophisticated program analysis. However, smart contracts, which transact valuable tokens and cryptocurrencies, are compiled to very low-level bytecode. This bytecode is the ultimate semantics and means of enforcement of the contract. We present the Gigahorse toolchain. At its core is a reverse compiler (i.e., a decompiler) that decompiles smart contracts from Ethereum Virtual Machine (EVM) bytecode into a high-level 3-address code representation. The new intermediate representation of smart contracts makes implicit data- and control-flow dependencies of the EVM bytecode explicit. Decompilation obviates the need for a contract's source and allows the analysis of both new and deployed contracts. Gigahorse advances the state of the art on several fronts. It gives the highest analysis precision and completeness among decompilers for Ethereum smart contracts---e.g., Gigahorse can decompile over 99.98\% of deployed contracts, compared to 88\% for the recently-published Vandal decompiler and under 50\% for the state-of-the-practice Porosity decompiler. Importantly, Gigahorse offers a full-featured toolchain for further analyses (and a ``batteries included'' approach, with multiple clients already implemented), together with the highest performance and scalability. Key to these improvements is Gigahorse's use of a declarative, logic-based specification, which allows high-level insights to inform low-level decompilation.
Gigahorse:对智能合约进行彻底的声明式反编译
智能合约的兴起——在区块链上运行的自主应用程序——导致了越来越多的威胁,需要复杂的程序分析。然而,交易有价值的令牌和加密货币的智能合约被编译为非常低级的字节码。这个字节码是契约的最终语义和执行方式。我们展示了Gigahorse工具链。其核心是一个反向编译器(即反编译器),它将智能合约从以太坊虚拟机(EVM)字节码反编译为高级3地址代码表示。智能合约的新中间表示使EVM字节码的隐式数据和控制流依赖关系显式化。反编译消除了对契约源的需要,并允许分析新的和已部署的契约。Gigahorse在几个方面推进了最先进的技术。它在以太坊智能合约的反编译器中提供了最高的分析精度和完整性。, Gigahorse可以反编译超过99.98%的已部署契约,而最近发布的Vandal反编译器的反编译率为88%,而最实用的孔隙度反编译器的反编译率不到50%。重要的是,Gigahorse为进一步分析提供了一个全功能的工具链(以及一个“包含电池”的方法,已经实现了多个客户端),以及最高的性能和可扩展性。这些改进的关键是Gigahorse使用了声明性的、基于逻辑的规范,它允许高级洞察通知低级反编译。在区块链上运行的自主应用程序导致了越来越多的威胁,需要复杂的程序分析。然而,交易有价值的令牌和加密货币的智能合约被编译为非常低级的字节码。这个字节码是契约的最终语义和执行方式。我们展示了Gigahorse工具链。其核心是一个反向编译器(即反编译器),它将智能合约从以太坊虚拟机(EVM)字节码反编译为高级的3地址代码表示。智能合约的新中间表示使EVM字节码的隐式数据和控制流依赖关系显式化。反编译消除了对契约源的需要,并允许分析新的和已部署的契约。Gigahorse在几个方面推进了最先进的技术。它在以太坊智能合约的反编译器中提供了最高的分析精度和完整性。, Gigahorse可以反编译超过99.98%的已部署契约,而最近发布的Vandal反编译器的反编译率为88%,而最实用的孔隙度反编译器的反编译率不到50%。重要的是,Gigahorse为进一步分析提供了一个全功能的工具链(以及一个“包含电池”的方法,已经实现了多个客户端),以及最高的性能和可扩展性。这些改进的关键是Gigahorse使用了声明性的、基于逻辑的规范,它允许高级洞察通知低级反编译。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信