DeepFusion: Smart Contract Vulnerability Detection Via Deep Learning and Data Fusion

被引:0
作者
Chu, Hanting [1 ]
Zhang, Pengcheng [1 ]
Dong, Hai [2 ]
Xiao, Yan [3 ]
Ji, Shunhui [1 ]
机构
[1] Hohai Univ, Coll Comp Sci & Software Engn, Nanjing 211100, Peoples R China
[2] RMIT Univ, Sch Comp Technol, Melbourne, Vic 3000, Australia
[3] NUS Univ, Sch Comp, Singapore 119077, Singapore
基金
中国国家自然科学基金;
关键词
Smart contracts; Data mining; Security; Codes; Predictive models; Syntactics; Computer languages; Arithmetic; Accuracy; Training; Abstraction syntax tree (AST); data fusion; program slicing; smart contract; vulnerability detection; ATTACKS;
D O I
10.1109/TR.2024.3480010
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Given that smart contracts execute transactions worth hundreds of millions of dollars daily, the issue of smart contract security has attracted considerable attention over the past few years. Traditional methods for detecting vulnerabilities heavily rely on manually developed rules and features, leading to the problems of low accuracy, high false positives, and poor scalability. Although deep learning-inspired approaches were designed to alleviate the problem, most of them rely on monothetic features, which may result in information incompetence during the learning process. Furthermore, the lack of available labeled vulnerability datasets is also a major limitation. To address these issues, we collect and construct a dataset of five labeled smart contract vulnerabilities, and propose DeepFusion, a vulnerability detection method that fuses code representation information, including program slice information and abstraction syntax tree (AST) structured information. First, we develop automated tools to extract contract vulnerability slicing information from source code, and extract structured information from source code-converted AST. Second, code features and global structured features are fused into the data. Finally, the fused data are input into the Bidirectional Long Short-Term Memory+ Attention (BiLSTM+ATT) model for smart contract vulnerability detection. The BiLSTM model can capture long-term dependencies in both directions and is more suitable for processing serialized information generated by DeepFusion, while the attention mechanism can highlight the characteristic information of vulnerabilities. We conducted experiments via collecting a real smart contract dataset. The experimental results show that our method significantly outperforms the existing methods in detecting the vulnerabilities of reentrancy, timestamp dependence, integer overflow and underflow, Use tx.origin for authentication, and Unprotected Self-destruct Instruction by 6.36%, 6.42%, 16.5%, 21.29%, and 25.05%, respectively. To the best of our knowledge, the latter two vulnerabilities are the first to be detected using deep learning methods.
引用
收藏
页数:15
相关论文
共 59 条
  • [1] A Survey of Attacks on Ethereum Smart Contracts (SoK)
    Atzei, Nicola
    Bartoletti, Massimo
    Cimoli, Tiziana
    [J]. PRINCIPLES OF SECURITY AND TRUST (POST 2017), 2017, 10204 : 164 - 186
  • [2] Buterin Vitalik, 2014, white paper, V3, P2
  • [3] Combine sliced joint graph with graph neural networks for smart contract vulnerability detection?
    Cai, Jie
    Li, Bin
    Zhang, Jiale
    Sun, Xiaobing
    Chen, Bing
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 195
  • [4] A Survey on Ethereum Systems Security: Vulnerabilities, Attacks, and Defenses
    Chen, Huashan
    Pendleton, Marcus
    Njilla, Laurent
    Xu, Shouhuai
    [J]. ACM COMPUTING SURVEYS, 2020, 53 (03)
  • [5] Why Do Smart Contracts Self-Destruct? Investigating the Selfdestruct Function on Ethereum
    Chen, Jiachi
    Xia, Xin
    Lo, David
    Grundy, John
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2022, 31 (02)
  • [6] DefectChecker: Automated Smart Contract Defect Detection by Analyzing EVM Bytecode
    Chen, Jiachi
    Xia, Xin
    Lo, David
    Grundy, John
    Luo, Xiapu
    Chen, Ting
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 48 (07) : 2189 - 2207
  • [7] Defining Smart Contract Defects on Ethereum
    Chen, Jiachi
    Xia, Xin
    Lo, David
    Grundy, John
    Luo, Xiapu
    Chen, Ting
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (01) : 327 - 345
  • [8] Chen JY, 2021, ENVIRON HEALTH PREV, V26, DOI 10.1186/s12199-020-00925-x
  • [9] Towards Saving Money in Using Smart Contracts
    Chen, Ting
    Li, Zihao
    Zhou, Hao
    Chen, Jiachi
    Luo, Xiapu
    Li, Xiaoqi
    Zhang, Xiaosong
    [J]. 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: NEW IDEAS AND EMERGING TECHNOLOGIES RESULTS (ICSE-NIER), 2018, : 81 - 84
  • [10] Chen Yizhou, 2024, P IEEE ACM 46 INT C