药膏中的苍蝇:以太坊智能合约代码弱点和漏洞特征的实证研究
A Fly in the Ointment: An Empirical Study on the Characteristics of Ethereum Smart Contracts Code Weaknesses and Vulnerabilities
摘要:
背景:智能合约是在区块链上自动执行的计算机程序。其实施中的漏洞导致了加密货币的严重损失。智能合约在部署到以太坊区块链时变得不可变。因此,必须了解以太坊智能合约中漏洞的性质,以便在未来防止它们。现有的分类是存在的,但在几个方面受到限制。目标:我们的目标是描述用Solidity编写的以太坊智能合约中的漏洞,并统一现有的分类方案。方法:我们从公共编码平台和流行的漏洞数据库中提取了2143个漏洞,并使用卡片排序方法对其进行分类。我们在本文中针对以太坊区块链,因为它是第一个也是最受欢迎的支持智能合约部署的区块链,而Solidity是实现智能合约最广泛使用的语言。我们根据错误来源和影响设计了智能合约漏洞的分类方案。然后,我们将现有的分类方案映射到我们的分类。结果如下:由此产生的分类包括描述脆弱性误差来源的11个类别和描述潜在影响的13个类别。我们的研究结果表明,语言特定的编码和结构的数据流类别是占主导地位的类别,但发生的频率之间的数据源有很大的不同。结论:我们的研究结果使研究人员能够通过定义问题的各个维度来更好地理解智能合约漏洞,并通过基于文献的分类和定义类别的频率分布来支持我们的分类。
英文摘要:
Context: Smart contracts are computer programs that are automatically executed on the blockchain. Vulnerabilities in their implementation have led to severe loss of cryptocurrency. Smart contracts become immutable when deployed to the Ethereum blockchain. Therefore, it is essential to understand the nature of vulnerabilities in Ethereum smart contracts to prevent them in the future. Existing classifications exist, but are limited in several ways. Objective: We aim to characterize vulnerabilities in Ethereum smart contracts written in Solidity, and unify existing classifications schemes. Method: We extracted 2143 vulnerabilities from public coding platforms and popular vulnerability databases and categorized them using a card sorting approach. We targeted the Ethereum blockchain in this paper, as it is the first and most popular blockchain to support the deployment of smart contracts, and Solidity as the most widely used language to implement smart contracts. We devised a classification scheme of smart contract vulnerabilities according to their error source and impact. Afterwards, we mapped existing classification schemes to our classification. Results: The resulting classification consists of 11 categories describing the error source of a vulnerability and 13 categories describing potential impacts. Our findings show that the language specific coding and the structural data flow categories are the dominant categories, but that the frequency of occurrence differs substantially between the data sources. Conclusions: Our findings enable researchers to better understand smart contract vulnerabilities by defining various dimensions of the problem and supporting our classification with mappings with literature-based classifications and frequency distributions of the defined categories.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。