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 条
  • [1] Smart Contract Vulnerability Detection Method Based on Feature Graph and Multiple Attention Mechanisms
    He, Zhenxiang
    Zhao, Zhenyu
    Chen, Ke
    Liu, Yanlin
    CMC-COMPUTERS MATERIALS & CONTINUA, 2024, 79 (02): : 3023 - 3045
  • [2] HGAT: smart contract vulnerability detection method based on hierarchical graph attention network
    Chuang Ma
    Shuaiwu Liu
    Guangxia Xu
    Journal of Cloud Computing, 12
  • [3] Smart contract vulnerability detection based on semantic graph and residual graph convolutional networks with edge attention
    Chen, Da
    Feng, Lin
    Fan, Yuqi
    Shang, Siyuan
    Wei, Zhenchun
    JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 202
  • [4] HGAT: smart contract vulnerability detection method based on hierarchical graph attention network
    Ma, Chuang
    Liu, Shuaiwu
    Xu, Guangxia
    JOURNAL OF CLOUD COMPUTING-ADVANCES SYSTEMS AND APPLICATIONS, 2023, 12 (01):
  • [5] Smart Contract Vulnerability Detection Based on Multi Graph Convolutional Neural Networks with Self-attention
    Li, Jiale
    Yu, Xiao
    Yu, Jie
    Sun, Haoxin
    Sun, Mengdi
    ADVANCED INTELLIGENT COMPUTING TECHNOLOGY AND APPLICATIONS, PT III, ICIC 2024, 2024, 14864 : 319 - 330
  • [6] Smart Contract Vulnerability Detection Using Graph Neural Networks
    Zhuang, Yuan
    Liu, Zhenguang
    Qian, Peng
    Liu, Qi
    Wang, Xiang
    He, Qinming
    PROCEEDINGS OF THE TWENTY-NINTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2020, : 3283 - 3290
  • [7] DA-GNN: A smart contract vulnerability detection method based on Dual Attention Graph Neural Network
    Zhen, Zixian
    Zhao, Xiangfu
    Zhang, Jinkai
    Wang, Yichen
    Chen, Haiyue
    COMPUTER NETWORKS, 2024, 242
  • [8] Smart Contract Vulnerability Detection Method Based on Capsule Network and Attention Mechanism
    Lu L.
    Lai J.
    Huanan Ligong Daxue Xuebao/Journal of South China University of Technology (Natural Science), 2023, 51 (05): : 36 - 44
  • [9] GRATDet: Smart Contract Vulnerability Detector Based on Graph Representation and Transformer
    Gong, Peng
    Yang, Wenzhong
    Wang, Liejun
    Wei, Fuyuan
    HaiLaTi, KeZiErBieKe
    Liao, Yuanyuan
    CMC-COMPUTERS MATERIALS & CONTINUA, 2023, 76 (02): : 1439 - 1462
  • [10] A Novel Smart Contract Vulnerability Detection Method Based on Information Graph and Ensemble Learning
    Zhang, Lejun
    Wang, Jinlong
    Wang, Weizheng
    Jin, Zilong
    Zhao, Chunhui
    Cai, Zhennao
    Chen, Huiling
    SENSORS, 2022, 22 (09)