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 条
  • [31] Vulnerability Detection of Ethereum Smart Contract Based on SolBERT-BiGRU-Attention Hybrid Neural Model
    Xu, Guangxia
    Liu, Lei
    Dong, Jingnan
    CMES-COMPUTER MODELING IN ENGINEERING & SCIENCES, 2023, 137 (01): : 903 - 922
  • [32] A Smart Contract Vulnerability Detection Method Based on Heterogeneous Contract Semantic Graphs and Pre-Training Techniques
    Zhang, Jie
    Lu, Gehao
    Yu, Jia
    ELECTRONICS, 2024, 13 (18)
  • [33] Smart Contract Vulnerability Detection Based on Multimodal Feature Fusion
    Yu, Jie
    Yu, Xiao
    Li, Jiale
    Sun, Haoxin
    Sun, Mengdi
    ADVANCED INTELLIGENT COMPUTING TECHNOLOGY AND APPLICATIONS, PT III, ICIC 2024, 2024, 14864 : 344 - 355
  • [34] Smart Contract Vulnerability Detection Based on Symbolic Execution Technology
    Liu, Yiping
    Xu, Jie
    Cui, Baojiang
    CYBER SECURITY, CNCERT 2021, 2022, 1506 : 193 - 207
  • [35] Smart contract vulnerability detection based on a bytecode critical path
    Yin, Guisheng
    Gao, Le
    Zhuang, Yuan
    Li, Jun
    Harbin Gongcheng Daxue Xuebao/Journal of Harbin Engineering University, 2022, 43 (02): : 255 - 261
  • [36] Smart Contract Timestamp Vulnerability Detection Based on Code Homogeneity
    Wang, Weizhi
    Xia, Lei
    Zhang, Zhuo
    Meng, Xiankai
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2024, E107D (10) : 1362 - 1366
  • [37] SCcheck: A Novel Graph-Driven and Attention- Enabled Smart Contract Vulnerability Detection Framework for Web 3.0 Ecosystem
    Cao, Yuanlong
    Jiang, Fan
    Xiao, Jianmao
    Chen, Shaolong
    Shao, Xun
    Wu, Celimuge
    IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING, 2024, 11 (05): : 4007 - 4019
  • [38] SCVD-SA: A Smart Contract Vulnerability Detection Method based on Hybrid Deep Learning Model and Self-attention Mechanism
    Wang, Dongjie
    Chen, Jinfu
    Cai, Saihua
    Feng, Qiaowei
    Chen, Yuhao
    Hu, Xinyi
    2024 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING-COMPANION, SANER-C 2024, 2024, : 207 - 214
  • [39] Semantic-aware Graph Neural Network for Smart Contract Bytecode Vulnerability Detection
    Zhao B.
    Shangguan C.
    Peng X.
    An Y.
    Tong J.
    Yuan A.
    Gongcheng Kexue Yu Jishu/Advanced Engineering Sciences, 2022, 54 (02): : 49 - 55
  • [40] MVD-HG: multigranularity smart contract vulnerability detection method based on heterogeneous graphs
    Xu, Jingjie
    Wang, Ting
    Lv, Mingqi
    Chen, Tieming
    Zhu, Tiantian
    Ji, Baiyang
    CYBERSECURITY, 2024, 7 (01):