Skip to main content
QUICK REVIEW

[论文解读] An Empirical Study of Blockchain System Vulnerabilities: Modules, Types, and Patterns

Xiao Yi, Daoyuan Wu|arXiv (Cornell University)|Oct 23, 2021
Blockchain Technology Applications and Security参考文献 71被引用 4
一句话总结

本论文基于来自四个主要区块链(比特币、以太坊、门罗币、Stellar)的1,037个漏洞和2,317个补丁的数据集,首次对区块链系统漏洞进行了实证研究。通过在文件、文本和代码三个层面应用聚类、相关性分析及代码签名技术,作者识别出高风险模块,发现了四种新的区块链特异性漏洞类型,并提取出21个可复用的检测模式,可用于检测其他区块链(如狗狗币和Zcash)中的类似缺陷。

ABSTRACT

Blockchain, as a distributed ledger technology, becomes increasingly popular, especially for enabling valuable cryptocurrencies and smart contracts. However, the blockchain software systems inevitably have many bugs. Although bugs in smart contracts have been extensively investigated, security bugs of the underlying blockchain systems are much less explored. In this paper, we conduct an empirical study on blockchain's system vulnerabilities from four representative blockchains, Bitcoin, Ethereum, Monero, and Stellar. Specifically, we first design a systematic filtering process to effectively identify 1,037 vulnerabilities and their 2,317 patches from 34,245 issues/PRs (pull requests) and 85,164 commits on GitHub. We thus build the first blockchain vulnerability dataset. We then perform unique analyses of this dataset at three levels, including (i) file-level vulnerable module categorization by identifying and correlating module paths across projects, (ii) text-level vulnerability type clustering by natural language processing and similarity-based sentence clustering, and (iii) code-level vulnerability pattern analysis by generating and clustering code change signatures that capture both syntactic and semantic information of patch code fragments. Our analyses reveal three key findings: (i) some blockchain modules are more susceptible than the others; notably, each of the modules related to consensus, wallet, and networking has over 200 issues; (ii) about 70% of blockchain vulnerabilities are of traditional types, but we also identify four new types specific to blockchains; and (iii) we obtain 21 blockchain-specific vulnerability patterns that capture unique blockchain attributes and statuses, and demonstrate that they can be used to detect similar vulnerabilities in other popular blockchains, such as Dogecoin, Bitcoin SV, and Zcash.

研究动机与目标

  • 系统理解低层区块链软件系统中的安全漏洞,这些漏洞相较于智能合约漏洞仍处于研究不足状态。
  • 通过筛选和提取来自GitHub问题和拉取请求的1,037个漏洞和2,317个补丁,构建首个全面的区块链漏洞数据集。
  • 在三个层次上分析漏洞:文件级模块分类、文本级类型聚类,以及使用自然语言处理和代码签名技术的代码级模式挖掘。
  • 发现可复用于其他主流区块链的区块链特异性漏洞模式,以检测类似缺陷。
  • 通过负责任披露20个漏洞至主要区块链项目并获得确认回复,验证研究的实际影响。

提出的方法

  • 设计了一套系统化的筛选框架,从四个区块链的34,245个GitHub问题/拉取请求和85,164个提交中提取漏洞和补丁。
  • 通过跨项目关联模块路径进行文件级分析,识别出共识、钱包和网络模块等脆弱组件。
  • 应用自然语言处理和基于相似性的句子聚类技术,将漏洞描述分类为11种类型,其中包括4种新型区块链特异性类型。
  • 利用语法和语义分析生成代码变更签名,对补丁进行聚类并提取出21个可复用的区块链特异性漏洞模式。
  • 通过在其他区块链(如狗狗币、比特币SV和Zcash)中检测到类似漏洞,验证了这些模式的有效性。
  • 通过电子邮件、GitHub、Discord和漏洞赏金计划向所有项目方报告了20个发现的漏洞,其中狗狗币、Zcash、Horizen、Ravencoin和Dash已确认回复。

实验结果

研究问题

  • RQ1哪些区块链系统模块最容易出现漏洞,其脆弱性的根本原因是什么?
  • RQ2区块链系统中占主导地位的漏洞类型是什么,是否存在由区块链特有属性带来的新型漏洞类型?
  • RQ3我们能否从补丁代码片段中自动提取出可复用的、区块链特异性的漏洞模式,以同时捕捉语法和语义特征?
  • RQ4所识别出的模式在多大程度上能检测到除研究对象外其他主要区块链中的类似漏洞?
  • RQ5所发现的模式在识别真实世界漏洞方面的有效性如何,区块链维护者对负责任披露的响应率是多少?

主要发现

  • 共识、钱包和网络模块最为脆弱,各自报告的漏洞超过200个,表明它们是区块链系统中的高风险组件。
  • 约70%的已识别漏洞属于传统类型(如缓冲区溢出、竞争条件),而4种新类型(如“共识操纵”和“状态不一致”)则特有于区块链语义和架构。
  • 本研究提取出21个区块链特异性漏洞模式,这些模式刻画了区块链特有的属性,如区块验证顺序、交易可变性以及状态转换逻辑。
  • 这些模式成功检测到其他区块链(如狗狗币、比特币SV和Zcash)中的类似漏洞,证明了其泛化能力和实际应用价值。
  • 向主要项目方披露漏洞后,6个中5个确认了回复,其中狗狗币承诺在后续版本中修复全部五个报告的问题。
  • 本研究首次公开发布了区块链漏洞数据集(https://github.com/VPRLab/BlkVulnDataset),为未来区块链安全研究提供了支持。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。