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 条
  • [1] 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
  • [2] Combine sliced joint graph with graph neural networks for smart contract vulnerability detection?
    Cai, Jie
    Li, Bin
    Zhang, Jiale
    Sun, Xiaobing
    Chen, Bing
    JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 195
  • [3] Extended Abstract of Combine Sliced Joint Graph with Graph Neural Networks for Smart Contract Vulnerability Detection
    Cai, Jie
    Li, Bin
    Zhang, Jiale
    Sun, Xiaobing
    Chen, Bing
    2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING, SANER, 2023, : 851 - 852
  • [4] ContractGNN: Ethereum Smart Contract Vulnerability Detection Based on Vulnerability Sub-Graphs and Graph Neural Networks
    Wang, Yichen
    Zhao, Xiangfu
    He, Long
    Zhen, Zixian
    Chen, Haiyue
    IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING, 2024, 11 (06): : 6382 - 6395
  • [5] Smart Contract Vulnerability Detection: From Pure Neural Network to Interpretable Graph Feature and Expert Pattern Fusion
    Liu, Zhenguang
    Qian, Peng
    Wang, Xiang
    Zhu, Lei
    He, Qinming
    Ji, Shouling
    PROCEEDINGS OF THE THIRTIETH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2021, 2021, : 2751 - 2759
  • [6] 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
  • [7] An Expert Knowledge Generation Model in Smart Contract Vulnerability Fuzzing
    Li, Xing
    2023 IEEE 9TH INTL CONFERENCE ON BIG DATA SECURITY ON CLOUD, BIGDATASECURITY, IEEE INTL CONFERENCE ON HIGH PERFORMANCE AND SMART COMPUTING, HPSC AND IEEE INTL CONFERENCE ON INTELLIGENT DATA AND SECURITY, IDS, 2023, : 51 - 56
  • [8] 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
  • [9] 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
  • [10] 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