Tongxin xuebao (Sep 2024)

Smart contract vulnerability detection method based on pre-training and novel timing graph neural network

  • ZHUANG Yuan,
  • FAN Zekai,
  • WANG Cheng,
  • SUN Jianguo,
  • LI Yaolin

Journal volume & issue
Vol. 45
pp. 101 – 114

Abstract

Read online

To address the limitations of current deep learning-based methods in extracting contract bytecode features and representing vulnerability semantics, as well as the shortcomings of the traditional graph neural networks in learning temporal information from contract statements, a method for detecting vulnerabilities in contracts was proposed based on pre-trained and temporal graph neural network. Firstly, the pre-trained model was used to transform smart contract bytecode into a vulnerability semantics-aware contract graph structure. Then, combined with a self-attention mechanism, the event-driven temporal graph neural network was designed to extract temporal information during contract execution. Finally, focusing on reentrant vulnerabilities, timestamp dependency vulnerabilities, and Tx.origin authentication vulnerabilities, extensive experiments were conducted on a dataset of 120 932 actual contracts. The results show that the proposed method significantly outperforms existing approaches.

Keywords