A smart contract vulnerability detection method based on deep learning with opcode sequences

被引:0
|
作者
Li, Peiqiang [1 ]
Wang, Guojun [1 ]
Xing, Xiaofei [1 ]
Zhu, Jinyao [1 ]
Gu, Wanyi [1 ]
Zhai, Guangxin [1 ]
机构
[1] Guangzhou Univ, Sch Comp Sci & Cyber Engn, Guangzhou 510006, Peoples R China
基金
中国国家自然科学基金;
关键词
Smart contracts; Vulnerabilities detection; Opcode sequences; Deep learning; LSTM;
D O I
10.1007/s12083-024-01750-7
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Ethereum is a blockchain network that allows developers to create smart contracts and programs that run on the blockchain. Smart contracts contain logic to transfer assets based on pre-defined conditions. With over 100,000 new smart contracts being deployed every day, the potential for coding errors is high, making the contracts vulnerable to exploits. A key limitation is that once deployed, smart contracts are immutable and cannot be updated, even if flaws are found. This inflexibility puts funds at risk of theft and loss. The rapid pace of deployment outpaces security audits, increasing vulnerabilities that put users' cryptocurrency at risk. To reduce the risk caused by smart contract vulnerabilities, we applied deep learning techniques. To develop a deep learning model capable of detecting vulnerabilities, we first created a dataset by replaying real transactions on the Ethereum Mainnet, collecting opcode sequences from real Ethereum contracts, and labeling them using the SODA plugin. We pre-processed this opcode data by removing duplicates, normalizing sequence lengths, simplifying opcodes into representative groups, and converting sequences into numerical vectors to ultimately obtain an optimal representation of the data. We then trained and evaluated three different neural network architectures on this dataset. Our best-performing model achieved an average accuracy of 88% in detecting seven types of vulnerabilities. Further analysis showed that the model was effective at identifying potential problems in smart contracts, which was an important capability for securing funds and executing logic in live contracts.
引用
收藏
页数:17
相关论文
共 50 条
  • [1] Opcode Sequences-Based Smart Contract Vulnerabilities Detection Using Deep Learning
    Zhu, Jinyao
    Xing, Xiaofei
    Wang, Guojun
    Li, Peiqiang
    [J]. 2023 IEEE 22ND INTERNATIONAL CONFERENCE ON TRUST, SECURITY AND PRIVACY IN COMPUTING AND COMMUNICATIONS, TRUSTCOM, BIGDATASE, CSE, EUC, ISCI 2023, 2024, : 284 - 291
  • [2] A Smart Contract Vulnerability Detection Method Based on Multimodal Feature Fusion and Deep Learning
    Li, Jinggang
    Lu, Gehao
    Gao, Yulian
    Gao, Feng
    [J]. MATHEMATICS, 2023, 11 (23)
  • [3] A Smart Contract Vulnerability Detection Mechanism Based on Deep Learning and Expert Rules
    Liu, Zhenpeng
    Jiang, Mingxiao
    Zhang, Shengcong
    Zhang, Jialiang
    Liu, Yi
    [J]. IEEE ACCESS, 2023, 11 : 77990 - 77999
  • [4] DeeSCVHunter: A Deep Learning-Based Framework for Smart Contract Vulnerability Detection
    Yu, Xingxin
    Zhao, Haoyue
    Hou, Botao
    Ying, Zonghao
    Wu, Bin
    [J]. 2021 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN), 2021,
  • [5] Smart Contract Vulnerability Detection Based on Deep Learning and Multimodal Decision Fusion
    Deng, Weichu
    Wei, Huanchun
    Huang, Teng
    Cao, Cong
    Peng, Yun
    Hu, Xuan
    [J]. SENSORS, 2023, 23 (16)
  • [6] An Opcode-Based Vulnerability Detection of Smart Contracts
    Sui, Jia
    Chu, Lili
    Bao, Han
    [J]. APPLIED SCIENCES-BASEL, 2023, 13 (13):
  • [7] An integrated deep learning model for Ethereum smart contract vulnerability detection
    Jain, Vikas Kumar
    Tripathi, Meenakshi
    [J]. INTERNATIONAL JOURNAL OF INFORMATION SECURITY, 2024, 23 (01) : 557 - 575
  • [8] An integrated deep learning model for Ethereum smart contract vulnerability detection
    Vikas Kumar Jain
    Meenakshi Tripathi
    [J]. International Journal of Information Security, 2024, 23 : 557 - 575
  • [9] A Novel Smart Contract Vulnerability Detection Method Based on Information Graph and Ensemble Learning
    Zhang, Lejun
    Wang, Jinlong
    Wang, Weizheng
    Jin, Zilong
    Zhao, Chunhui
    Cai, Zhennao
    Chen, Huiling
    [J]. SENSORS, 2022, 22 (09)
  • [10] Smart Contract Vulnerability Detection Using Deep Learning Algorithms on EVM bytecode
    Prifti, Lejdi
    Cico, Betim
    Karras, Dimitrios
    [J]. 2024 13TH MEDITERRANEAN CONFERENCE ON EMBEDDED COMPUTING, MECO 2024, 2024, : 223 - 229