arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.18186cs.SE
收藏

面向智能合约的静态应用安全测试(SAST)工具:我们离目标还有多远?

Static Application Security Testing (SAST) Tools for Smart Contracts: How Far Are We?

Kaixuan Li, Yue Xue, Sen Chen, Han Liu, Kairan Sun, Ming Hu, Haijun Wang, Yang Liu, Yixiang Chen

AI总结:

本文提出包含45种漏洞类型的细粒度智能合约漏洞分类体系,并构建覆盖40种类型、含788个文件和10,394个漏洞的基准,评估8种SAST工具后发现其漏报约50%、精确率不足10%,同时揭示多工具组合可降低漏报但增加误报,为工具改进与选择提供指导。

摘要:

近年来,针对智能合约的攻击数量不断增加,智能合约安全的重要性日益凸显。为解决这一问题,已有大量静态应用安全测试(SAST)工具被提出用于检测智能合约中的漏洞。然而,客观比较这些工具以确定其有效性仍然具有挑战性。现有研究往往存在不足,因为其分类体系和基准仅覆盖粗糙且可能过时的漏洞类型集合,导致评估不够全面,并可能表现出偏差。在本文中,我们通过提出一个最新且细粒度的分类体系来填补这一空白,该体系包含45种独特的智能合约漏洞类型。以此为基础,我们开发了一个广泛的基准,覆盖40种不同类型,并包含多样化的代码特征、漏洞模式和应用场景。基于这些工作,我们使用该基准评估了8种SAST工具,该基准包含788个智能合约文件和10,394个漏洞。我们的结果表明,现有SAST工具未能检测出基准中约50%的漏洞,并且存在较高的误报率,精确率不超过10%。我们还发现,通过组合多个工具的结果,可以有效降低漏报率,但代价是多标记36.77个百分点以上的函数。尽管如此,许多漏洞,尤其是访问控制(Access Control)和重入(Reentrancy)漏洞之外的漏洞,仍然未被检测到。最后,我们强调了本研究中有价值的见解,希望为开发者、研究人员和实践者在工具开发、增强、评估和选择方面提供指导。

英文摘要:

In recent years, the importance of smart contract security has been heightened by the increasing number of attacks against them. To address this issue, a multitude of static application security testing (SAST) tools have been proposed for detecting vulnerabilities in smart contracts. However, objectively comparing these tools to determine their effectiveness remains challenging. Existing studies often fall short due to the taxonomies and benchmarks only covering a coarse and potentially outdated set of vulnerability types, which leads to evaluations that are not entirely comprehensive and may display bias. In this paper, we fill this gap by proposing an up-to-date and fine-grained taxonomy that includes 45 unique vulnerability types for smart contracts. Taking it as a baseline, we develop an extensive benchmark that covers 40 distinct types and includes a diverse range of code characteristics, vulnerability patterns, and application scenarios. Based on them, we evaluated 8 SAST tools using this benchmark, which comprises 788 smart contract files and 10,394 vulnerabilities. Our results reveal that the existing SAST tools fail to detect around 50% of vulnerabilities in our benchmark and suffer from high false positives, with precision not surpassing 10%. We also discover that by combining the results of multiple tools, the false negative rate can be reduced effectively, at the expense of flagging 36.77 percentage points more functions. Nevertheless, many vulnerabilities, especially those beyond Access Control and Reentrancy vulnerabilities, remain undetected. We finally highlight the valuable insights from our study, hoping to provide guidance on tool development, enhancement, evaluation, and selection for developers, researchers, and practitioners.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑