Combining Graph Neural Networks With Expert Knowledge for Smart Contract Vulnerability Detection

被引:134
|
作者
Liu, Zhenguang [1 ,2 ]
Qian, Peng [1 ,2 ]
Wang, Xiaoyang
Zhuang, Yuan [3 ]
Qiu, Lin [4 ]
Wang, Xun [1 ,5 ]
机构
[1] Zhejiang Gongshang Univ, Sch Comp & Informat Engn, Hangzhou 310018, Peoples R China
[2] Zhejiang Univ, Hangzhou 310027, Peoples R China
[3] Natl Univ Singapore, Singapore 119077, Singapore
[4] Southern Univ Sci & Technol, Shenzhen 518055, Peoples R China
[5] Zhejiang Lab, Hangzhou 311121, Peoples R China
基金
中国国家自然科学基金;
关键词
Smart contracts; Feature extraction; Blockchain; Security; Semantics; Computer bugs; Knowledge engineering; Deep learning; blockchain; smart contract; vulnerability detection; expert knowledge; BLOCKCHAIN;
D O I
10.1109/TKDE.2021.3095196
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Smart contract vulnerability detection draws extensive attention in recent years due to the substantial losses caused by hacker attacks. Existing efforts for contract security analysis heavily rely on rigid rules defined by experts, which are labor-intensive and non-scalable. More importantly, expert-defined rules tend to be error-prone and suffer the inherent risk of being cheated by crafty attackers. Recent researches focus on the symbolic execution and formal analysis of smart contracts for vulnerability detection, yet to achieve a precise and scalable solution. Although several methods have been proposed to detect vulnerabilities in smart contracts, there is still a lack of effort that considers combining expert-defined security patterns with deep neural networks. In this paper, we explore using graph neural networks and expert knowledge for smart contract vulnerability detection. Specifically, we cast the rich control- and data- flow semantics of the source code into a contract graph. To highlight the critical nodes in the graph, we further design a node elimination phase to normalize the graph. Then, we propose a novel temporal message propagation network to extract the graph feature from the normalized graph, and combine the graph feature with designed expert patterns to yield a final detection system. Extensive experiments are conducted on all the smart contracts that have source code in Ethereum and VNT Chain platforms. Empirical results show significant accuracy improvements over the state-of-the-art methods on three types of vulnerabilities, where the detection accuracy of our method reaches 89.15, 89.02, and 83.21 percent for reentrancy, timestamp dependence, and infinite loop vulnerabilities, respectively.
引用
收藏
页码:1296 / 1310
页数:15
相关论文
共 50 条
  • [41] CodeNet: Code-Targeted Convolutional Neural Network Architecture for Smart Contract Vulnerability Detection
    Hwang, Seon-Jin
    Choi, Seok-Hwan
    Shin, Jinmyeong
    Choi, Yoon-Ho
    IEEE ACCESS, 2022, 10 : 32595 - 32607
  • [42] LineVD: Statement-level Vulnerability Detection using Graph Neural Networks
    Hin, David
    Kan, Andrey
    Chen, Huaming
    Babar, M. Ali
    2022 MINING SOFTWARE REPOSITORIES CONFERENCE (MSR 2022), 2022, : 596 - 607
  • [43] Neural networks in generalizing expert knowledge
    Wang, SH
    COMPUTERS & INDUSTRIAL ENGINEERING, 1997, 32 (01) : 67 - 76
  • [44] Smart contract vulnerability detection combined with multi-objective detection
    Zhang, Lejun
    Wang, Jinlong
    Wang, Weizheng
    Jin, Zilong
    Su, Yansen
    Chen, Huiling
    COMPUTER NETWORKS, 2022, 217
  • [45] Combining Large Model Fine-Tuning and Graph Neural Networks for Knowledge Graph Question Answering
    Chen, Junzhen
    Wang, Shuying
    Luo, Haoran
    Computer Engineering and Applications, 2024, 60 (24) : 166 - 176
  • [46] Detect Defects of Solidity Smart Contract Based on the Knowledge Graph
    Hu, Tianyuan
    Li, Bixin
    Pan, Zhenyu
    Qian, Chen
    IEEE TRANSACTIONS ON RELIABILITY, 2024, 73 (01) : 186 - 202
  • [47] Reentrancy vulnerability detection based on graph convolutional networks and expert patterns under subspace mapping
    Guo, Longtao
    Huang, Huakun
    Zhao, Lingjun
    Wang, Peiliang
    Jiang, Shan
    Su, Chunhua
    COMPUTERS & SECURITY, 2024, 142
  • [48] 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
  • [49] 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
  • [50] 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