错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Efficient Vulnerability Detection for Smart Contracts Using Gated Graph Neural Network

  • Yiwen Zhai,
  • Jia Yang,
  • Mingwu Zhang

摘要

The amount involved in vulnerability issues on smart contracts is approximately 2.4 billion dollars in 2022. Such security incidents have raised great concerns about the vulnerabilities of smart contracts in blockchains. Traditional detection techniques mainly rely on rigid, inflexible filter rules which lead to somewhat ineffective. To implelemt the detection for multiple vulnerabilities from the source code in smart contracts, in this work, we build a vulnerability detection model based on the gated graph neural network (GGNN) that can provide the detection for five kinds of vulnerabilities in smart contracts. Firstly, we extract the critical source code for each vulnerability and represent it as a contract graph with syntactic and semantic features, in which an adjacency matrix and one-hot encoding will be used to represent the nodes and edges of the contract graph, respectively. Secondly, we give the GGNN model for deep learning to identify the vulnerabilities. Thirdly, we label nearly 40,000 smart contracts deploying multiple tools to construct the dataset. Compared to the most advanced vulnerability detection methods, our model provide a better detection results and performance, which provides a guarantee to detect the tx.origin vulnerability and the self-destruct vulnerability with over 95% accuracy. The integer overflow and integer underflow vulnerabilities, the assert violation vulnerability, and the unchecked call return value vulnerability are detected with an average accuracy of approximately 90%.