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

Smart Contract Vulnerability Detection Based on Generative Adversarial Networks and Graph Matching Networks

  • Hao Li,
  • Xu Wang,
  • Guangsheng Yu,
  • Wei Ni,
  • Ren Ping Liu,
  • Nektarios Georgalas,
  • Andrew Reeves

摘要

With Blockchain technology’s tamper-proof and decentralized characteristics, smart contracts have been developed rapidly for wide application in critical areas, e.g., the Internet of Things, digital management, healthcare and finance. However, the security vulnerabilities of smart contracts have led to significant economic losses. Once deployed on the blockchain, smart contracts cannot be modified, making pre-deployment vulnerability detection crucial. We focus on Ethereum-based smart contracts and innovatively propose a detection method based on Generative Adversarial Networks (GAN) and Graph Matching Networks (GMN) to uncover vulnerabilities, which greatly impact the security of smart contracts. The GAN will be used to solve the data starvation in training, which is one of the serious obstacles in building the deep learning model. Specifically, we convert smart contracts’ Solidity code into graphs that contain semantic and structural information. Based on this, we use GAN based on graph representation to augment the small-sample training set into a large-sample training set. The augmented training set will be used to train GMN, which is an extension of Graph Neural Networks. The novel GMN model uses a cross-graph attention mechanism to calculate the feature similarity between the target and vulnerable contracts. The experimental results show that our model has high accuracy and efficiency in detecting reentrancy and integer overflow.