错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A Smart Contract Vulnerability Detection System Based on BERT Model and Fuzz Testing

  • Zhehao Liang,
  • Baojiang Cui,
  • Dongbin Wang,
  • Jie Xu,
  • Huipeng Liu

摘要

Smart contracts have experienced wide and rapid development across various fields due to their decentralization, immutability, and automation advantages. However, vulnerabilities in smart contract have also caused significant losses for contract users and developers. To enhance the accuracy of smart contract vulnerability detection, we combine machine learning pre-training model BERT with improved fuzz testing. We employ the AST tree algorithm to extract crucial information from contracts, converting them into data flow graphs. Then the pre-trained model BERT is utilized to filter contract vulnerabilities. After that fuzz testing is adopted to further classify contracts. Experimental results demonstrate the algorithm's outstanding performance in detecting reentrancy, tx.origin, and timestamp vulnerabilities, with a precision rate of 95.93%, a recall rate of 87.25%, and an F1 score of 91.01% in detecting reentrancy vulnerabilities specifically. Comparison with other vulnerability detection tools confirms the superiority of the proposed scheme.