电子科技 ›› 2024, Vol. 37 ›› Issue (9): 64-71.doi: 10.16180/j.cnki.issn1007-7820.2024.09.010

• • 上一篇    下一篇

基于元操作的智能合约漏洞检测方法

王顺, 徐向华, 王然   

  1. 杭州电子科技大学 计算机学院,浙江 杭州 310018
  • 收稿日期:2023-04-07 出版日期:2024-09-15 发布日期:2024-09-20
  • 作者简介:王顺(1996-),男,硕士研究生。研究方向:区块链安全、智能合约漏洞检测。
    徐向华(1965-),男,博士,教授。研究方向:区块链安全、大数据处理、数据挖掘、无线传感网络、工业网络安全等。
    王然(1983-),男,博士,讲师。研究方向:区块链安全、机器学习、社交网络安全、无线传感器网络等。
  • 基金资助:
    浙江省重点研发计划(2017C01065)

Smart Contract Vulnerability Detection Method Based on Meta-Operation

WANG Shun, XU Xianghua, WANG Ran   

  1. School of Computer,Hangzhou Dianzi University,Hangzhou 310018,China
  • Received:2023-04-07 Online:2024-09-15 Published:2024-09-20
  • Supported by:
    The Key R&D Project of Zhejiang(2017C01065)

摘要:

针对静态分析工具由于漏洞扫描流程代码强耦合于工具代码中导致其扩展漏洞成本较高的问题,文中提出了基于元操作的智能合约漏洞检测方法。该方法将工具中的基本检测流程转换为元操作抽象形式,通过不同元操作和逻辑运算符组合来自定义漏洞扫描流程,以达到通过编写少量漏洞扫描流程语法就可以实现检测不同漏洞,提高工具对智能合约新型漏洞的扩展能力。实验结果证明,根据文中方法所需编写的漏洞描述字符量仅为Slither工具漏洞检测逻辑字符量的8.9%~12.7%,假阳率相比Slither工具降低2%。证明了所提方法可以在保证工具检测可靠性的基础上提供了更强的扩展性和灵活性。

关键词: 静态分析工具, 耦合, 漏洞检测, 漏洞扫描流程, 元操作, 逻辑运算符, 扩展, 新型漏洞

Abstract:

In view of the problem that the static analysis tool has a high cost of expanding the vulnerability due to the strong coupling of the vulnerability scanning process code in the tool code, a smart contract vulnerability detection method based on meta-operations is proposed. This method can convert the most basic detection process in the tool into an abstract form of meta-operation and customize the vulnerability scanning process through the combination of different meta-operations and logical operators, so as to realize the detection of different vulnerabilities by writing a small amount of vulnerability scanning process syntax. The detection can improve the ability of the tool to expand the new vulnerabilities of smart contracts. The experiment results prove that the number of characters of the vulnerability description required to be written according to this method is only 8.9%~12.7% of the logic characters of the Slither tool vulnerability detection, and the false positive rate is 2% lower than that of the Slither tool. It is proved that this method can provide stronger scalability and flexibility based on ensuring the reliability of tool detection.

Key words: static analysis tool, coupling, vulnerability detection, vulnerability scanning process, meta-operation, logical operators, scalability, new vulnerabilities

中图分类号: 

  • TP393