SCG-Detector: A Smart Contract Vulnerability Detection Method Based on Graph Attention Networks

被引:0
|
作者
Gu, Xi-Guo [1 ]
Wang, Zhi-Wei [2 ]
Chen, Xiang [3 ]
He, Qi-Fan [1 ]
Cui, Zhan-Qi [1 ]
机构
[1] School of Computer Science, Beijing Information Science and Technology University, Beijing,100101, China
[2] Data and Technical Support Center, Cyberspace Administration of China, Beijing,100048, China
[3] School of Information Science and Technology, Nantong University, Jiangsu, Nantong,226019, China
来源
Tien Tzu Hsueh Pao/Acta Electronica Sinica | 2024年 / 52卷 / 12期
基金
中国国家自然科学基金;
关键词
Network security - Network theory (graphs) - Syntactics - Trees (mathematics);
D O I
10.12263/DZXB.20231187
中图分类号
学科分类号
摘要
With the widespread of smart contracts, the business logic has become more complex, causing a large number of security vulnerabilities. In order to avoid huge losses caused by potential vulnerabilities, a series of smart contract vulnerability detection methods were proposed. However, existing methods cannot comprehensively represent semantic and structural features of the contract, making it difficult to accurately detect potential vulnerabilities and security risks in smart contracts. To address this issue, this paper proposes a smart contract vulnerability detection method based on graph attention networks, named SCG-Detector (Smart Contract Graph Detector). Firstly, an abstract syntax tree (AST) is constructed by parsing the contract source code to represent the contract’s syntactic structure information. Data dependency relationships and control dependency relationships, which represent semantic information, are added to the AST to construct a smart contract graph (SCG) that characterizes the contract’s syntactic structure and semantic information. Secondly, using the SCG as input, the graph attention network model is trained with an attention mechanism to learn the features of vulnerabilities in the contract. Finally, the trained graph attention network model is used to detect whether there are vulnerabilities in the contract and the types of vulnerabilities present. Experiments are conducted on 12 616 smart contracts to compare with 8 widely used methods, including sFuzz, Conkas, ConFuzzius, Mythril, Osiris, Slither, Oyente, and MANDO-GURU. The experimental results shows that the Precision of SCG-Detector is improved by up to 26.46%,recall is improved by up to 69.64%, and F1 is improved by up to 59.57%. © 2024 Chinese Institute of Electronics. All rights reserved.
引用
收藏
页码:4101 / 4112
相关论文
共 50 条
  • [41] Peculiar: Smart Contract Vulnerability Detection Based on Crucial Data Flow Graph and Pre-training Techniques
    Wu, Hongjun
    Zhang, Zhuo
    Wang, Shangwen
    Lei, Yan
    Lin, Bo
    Qin, Yihao
    Zhang, Haoyu
    Mao, Xiaoguang
    2021 IEEE 32ND INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE 2021), 2021, : 378 - 389
  • [42] Towards Auto Contract Generation and Ensemble-based Smart Contract Vulnerability Detection
    Puducherry, K. Lakshminarayana
    Puducherry, K. Sathiyamurthy
    INTERNATIONAL JOURNAL OF ELECTRICAL AND COMPUTER ENGINEERING SYSTEMS, 2022, 13 (09) : 747 - 757
  • [43] A vulnerability detection algorithm based on residual graph attention networks for source code imbalance (RGAN)
    Tang, Mingwei
    Tang, Wei
    Gui, Qingchi
    Hu, Jie
    Zhao, Mingfeng
    EXPERT SYSTEMS WITH APPLICATIONS, 2024, 238
  • [44] Smart Contract Vulnerability Detection Technique: A Survey
    Qian P.
    Liu Z.-G.
    He Q.-M.
    Huang B.-T.
    Tian D.-Z.
    Wang X.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (08): : 3059 - 3085
  • [45] Honeypot contract detection method for Ethereum based on source code structure and graph attention network
    Wang Y.
    Hou Y.
    Feng L.
    Tongxin Xuebao/Journal on Communications, 2023, 44 (09): : 161 - 172
  • [46] Smart Contract Vulnerability Detection Based on Multi-Scale Encoders
    Guo, Junjun
    Lu, Long
    Li, Jingkui
    ELECTRONICS, 2024, 13 (03)
  • [47] SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
    Zaazaa, Oualid
    El Bakkali, Hanan
    JOURNAL OF METAVERSE, 2024, 4 (02): : 126 - 137
  • [48] A Novel Smart Contract Reentrancy Vulnerability Detection Model based on BiGAS
    Zhang, Lejun
    Li, Yuan
    Guo, Ran
    Wang, Guopeng
    Qiu, Jing
    Su, Shen
    Liu, Yuan
    Xu, Guangxia
    Chen, Huiling
    Tian, Zhihong
    JOURNAL OF SIGNAL PROCESSING SYSTEMS FOR SIGNAL IMAGE AND VIDEO TECHNOLOGY, 2024, 96 (03): : 215 - 237
  • [49] Smart Contract Vulnerability Detection Based on Prompt-guided ChatGPT
    Ma, Jiarun
    Feng, Shiling
    Zeng, Jiahao
    Lu, Jia
    Chen, Jie
    2024 INTERNATIONAL CONFERENCE ON NETWORKING AND NETWORK APPLICATIONS, NANA 2024, 2024, : 321 - 326
  • [50] Two-Stage Smart Contract Vulnerability Detection Combining Semantic Features and Graph Features
    Luo, Zhenkun
    Chen, Shuhong
    Wang, Guojun
    Li, Hanjun
    2023 IEEE 22ND INTERNATIONAL CONFERENCE ON TRUST, SECURITY AND PRIVACY IN COMPUTING AND COMMUNICATIONS, TRUSTCOM, BIGDATASE, CSE, EUC, ISCI 2023, 2024, : 257 - 264