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
来源
基金
中国国家自然科学基金;
关键词
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 条
  • [21] Research on smart contract vulnerability detection method based on domain features of solidity contracts and attention mechanism
    Wang, Changjing
    Jiang, Huiwen
    Wang, Yuxin
    Huang, Qing
    Zuo, Zhengkang
    JOURNAL OF INTELLIGENT & FUZZY SYSTEMS, 2023, 45 (01) : 1513 - 1525
  • [22] RTMS: A Smart Contract Vulnerability Detection Method Based on Feature Fusion and Vulnerability Correlations
    Gao, Gaimei
    Li, Zilu
    Jin, Lizhong
    Liu, Chunxia
    Li, Junji
    Meng, Xiangqi
    ELECTRONICS, 2025, 14 (04):
  • [23] CBGRU: A Detection Method of Smart Contract Vulnerability Based on a Hybrid Model
    Zhang, Lejun
    Chen, Weijie
    Wang, Weizheng
    Jin, Zilong
    Zhao, Chunhui
    Cai, Zhennao
    Chen, Huiling
    SENSORS, 2022, 22 (09)
  • [24] Smart contract vulnerability detection method based on pre-training and novel timing graph neural network
    Zhuang, Yuan
    Fan, Zekai
    Wang, Cheng
    Sun, Jianguo
    Li, Yaolin
    Tongxin Xuebao/Journal on Communications, 2024, 45 (09): : 101 - 114
  • [25] Smart Contract Source Code Vulnerability Detection of Graph Isomorphism Network with Multi-Head Attention Mechanism
    Shi, Zitong
    Shi, Zhibin
    Liu, Dongming
    Lei, Haiwei
    Gong, Xiaoyuan
    Computer Engineering and Applications, 2024, 60 (07) : 258 - 265
  • [26] A smart contract vulnerability detection method based on deep learning with opcode sequences
    Li, Peiqiang
    Wang, Guojun
    Xing, Xiaofei
    Zhu, Jinyao
    Gu, Wanyi
    Zhai, Guangxin
    PEER-TO-PEER NETWORKING AND APPLICATIONS, 2024, 17 (05) : 3222 - 3238
  • [27] MANDO-HGT: Heterogeneous Graph Transformers for Smart Contract Vulnerability Detection
    Nguyen, Hoang H.
    Nhat-Minh Nguyen
    Xie, Chunyao
    Ahmadi, Zahra
    Kudendo, Daniel
    Thanh-Nam Doan
    Jiang, Lingxiao
    2023 IEEE/ACM 20TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2023, : 334 - 346
  • [28] Smart contract reentrancy vulnerability detection method based on manifold pigeon optimization algorithm
    Liu F.
    Huang H.
    Xiang Y.
    Hao Z.
    Zhongguo Kexue Jishu Kexue/Scientia Sinica Technologica, 2023, 53 (11): : 1922 - 1938
  • [29] Smart Contract Symbol Execution Vulnerability Detection Method Based on CFG Path Pruning
    Wang, Yichuan
    Zhao, Jingjing
    Zhang, Yaling
    Hei, Xinhong
    Zhu, Lei
    PROCEEDINGS OF THE 5TH ACM INTERNATIONAL SYMPOSIUM ON BLOCKCHAIN AND SECURE CRITICAL INFRASTRUCTURE, ACM BSCI 2023, 2023, : 132 - 139
  • [30] A Smart Contract Vulnerability Detection Method Based on Multimodal Feature Fusion and Deep Learning
    Li, Jinggang
    Lu, Gehao
    Gao, Yulian
    Gao, Feng
    MATHEMATICS, 2023, 11 (23)