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 条
  • [31] Smart Contract Vulnerability Detection Technique: A Survey
    Qian P.
    Liu Z.-G.
    He Q.-M.
    Huang B.-T.
    Tian D.-Z.
    Wang X.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (08): : 3059 - 3085
  • [32] MANDO-GURU: Vulnerability Detection for Smart Contract Source Code by Heterogeneous Graph Embeddings
    Nguyen, Hoang H.
    Nhat-Minh Nguyen
    Hong-Phuc Doan
    Ahmadi, Zahra
    Thanh-Nam Doan
    Jiang, Lingxiao
    PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 1736 - 1740
  • [33] Efficient Vulnerability Detection for Smart Contracts Using Gated Graph Neural Network
    Zhai, Yiwen
    Yang, Jia
    Zhang, Mingwu
    INFORMATION SECURITY AND PRIVACY, PT III, ACISP 2024, 2024, 14897 : 44 - 63
  • [34] CrossFuzz: Cross-contract fuzzing for smart contract vulnerability detection
    Yang, Huiwen
    Gu, Xiguo
    Chen, Xiang
    Zheng, Liwei
    Cui, Zhanqi
    SCIENCE OF COMPUTER PROGRAMMING, 2024, 234
  • [35] Smart Contract Vulnerability Detection Techniques for Hyperledger Fabric
    Centre for Development of Advanced Computing, Applied Artificial Intelligence Group, Maharashtra, Pune, India
    IEEE Int. Conf. Converg. Technol., I2CT, 2023,
  • [36] Knowledge Distillation with Graph Neural Networks for Epileptic Seizure Detection
    Zheng, Qinyue
    Venkitaraman, Arun
    Petravic, Simona
    Frossard, Pascal
    MACHINE LEARNING AND KNOWLEDGE DISCOVERY IN DATABASES: APPLIED DATA SCIENCE AND DEMO TRACK, ECML PKDD 2023, PT VI, 2023, 14174 : 547 - 563
  • [37] A Survey of Vulnerability Detection Techniques by Smart Contract Tools
    Khan, Zulfiqar Ali
    Namin, Akbar Siami
    IEEE ACCESS, 2024, 12 : 70870 - 70910
  • [38] Combining Graph Neural Networks and Sentence Encoders for Knowledge-aware Recommendations
    Spillo, Giuseppe
    Musto, Cataldo
    Polignano, Marco
    Lops, Pasquale
    de Gemmis, Marco
    Semeraro, Giovanni
    2023 PROCEEDINGS OF THE 31ST ACM CONFERENCE ON USER MODELING, ADAPTATION AND PERSONALIZATION, UMAP 2023, 2023, : 1 - 12
  • [39] 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
  • [40] A dual graph neural networks model using sequence embedding as graph nodes for vulnerability detection
    Ling, Miaogui
    Tang, Mingwei
    Bian, Deng
    Lv, Shixuan
    Tang, Qi
    INFORMATION AND SOFTWARE TECHNOLOGY, 2025, 177