论文标题

区块景观:检测和调查分叉区块链项目中的传播漏洞

BlockScope: Detecting and Investigating Propagated Vulnerabilities in Forked Blockchain Projects

论文作者

Yi, Xiao, Fang, Yuzhou, Wu, Daoyuan, Jiang, Lingxiao

论文摘要

由于区块链生态系统的开源性质,新的区块链通常要分叉或部分重用经典区块链的代码。例如,受欢迎的狗狗币,莱特币,binance bsc和多边形都是比特币/以太坊的变体。因此,这些“分叉”的区块链可能会遇到类似的漏洞,这些漏洞在分叉期间从比特币/以太坊传播,或者随后提出提取。在本文中,我们进行了一项系统的研究,以检测和研究分叉区块链项目中的传播漏洞。为了促进这项研究,我们提出了BlockScope,这是一种新颖的工具,可以有效,有效地检测到多种类型的克隆脆弱性,并在现有的比特币/以太坊安全贴片的输入下。具体而言,BlockScope采用基于相似性的代码匹配并设计了一种计算代码相似性的新方法,以涵盖所有语法范围的变体(即Type-1,Type-2,2,Type-2和Type-3)克隆。此外,BlockScope会自动提取和利用补丁代码的上下文来缩小搜索范围,并仅找到可能相关的代码进行比较。我们的评估表明,BlockScope的精度和高回忆都为91.8%(比重卷中的召回率高1.8倍)。 BlockScope使我们能够在比特币和以太坊的16个分叉项目中发现101个以前未知的漏洞,其中包括Dogecoin的16个,Litecoin的6个,Binance的1个,来自Binance的1个和4个。我们向开发人员报告了所有漏洞。其中有40人被修补或接受,有66人被承认或在待处理下,只有4人被拒绝。我们进一步研究了发现的漏洞的传播和修补过程,并揭示了从源到分叉项目的三种类型的漏洞传播,以及在比特币叉中释放补丁的长延迟(超过200天)。

Due to the open-source nature of the blockchain ecosystem, it is common for new blockchains to fork or partially reuse the code of classic blockchains. For example, the popular Dogecoin, Litecoin, Binance BSC, and Polygon are all variants of Bitcoin/Ethereum. These "forked" blockchains thus could encounter similar vulnerabilities that are propagated from Bitcoin/Ethereum during forking or subsequently commit fetching. In this paper, we conduct a systematic study of detecting and investigating the propagated vulnerabilities in forked blockchain projects. To facilitate this study, we propose BlockScope, a novel tool that can effectively and efficiently detect multiple types of cloned vulnerabilities given an input of existing Bitcoin/Ethereum security patches. Specifically, BlockScope adopts similarity-based code match and designs a new way of calculating code similarity to cover all the syntax-wide variant (i.e., Type-1, Type-2, and Type-3) clones. Moreover, BlockScope automatically extracts and leverages the contexts of patch code to narrow down the search scope and locate only potentially relevant code for comparison. Our evaluation shows that BlockScope achieves good precision and high recall both at 91.8% (1.8 times higher recall than that in ReDeBug). BlockScope allows us to discover 101 previously unknown vulnerabilities in 13 out of the 16 forked projects of Bitcoin and Ethereum, including 16 from Dogecoin, 6 from Litecoin, 1 from Binance, and 4 from Optimism. We have reported all the vulnerabilities to their developers; 40 of them have been patched or accepted, 66 were acknowledged or under pending, and only 4 were rejected. We further investigate the propagation and patching processes of discovered vulnerabilities, and reveal three types of vulnerability propagation from source to forked projects, as well as the long delay (over 200 days) for releasing patches in Bitcoin forks.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源