Font Size: a A A

Application Research Of Smart Contract Vulnerability Detection Based On Deep Learning

Posted on:2024-02-29Degree:MasterType:Thesis
Country:ChinaCandidate:Y ZhengFull Text:PDF
GTID:2568307172971579Subject:Electronic information
Abstract/Summary:PDF Full Text Request
As a new technology,blockchain has brought new growth points to the development of society.As an important part of blockchain technology,smart contracts provide important technical support for the development of blockchain.But at the same time,the development of blockchain also has a lot of security problems,especially the security problems in smart contracts.While smart contracts provide security for the development of blockchain,they also bring security risks to the development of blockchain.Therefore,the detection of smart contract vulnerabilities has become a hot topic of current research.On the basis of detailed investigation and analysis of smart contract vulnerabilities,this study conducted in-depth research on smart contract vulnerability detection methods,and comprehensively investigated the research status of various tools and methods for smart contract vulnerability detection,and found out various problems in current research.Aiming at these problems,a smart contract vulnerability detection method based on deep learning is proposed,and the effectiveness of the proposed method is verified by experiments.The main work of this paper is as follows:Firstly,a complete smart contract vulnerability dataset was constructed for the lack of publicly available smart contract vulnerability detection dataset.The paper uses web crawler technology to crawl 38487 smart contracts through Etherscan.io and Google database.Four tools,Oyente,Slither,Contract Fuzzer,and Vaas,were used to detect and label the collected smart contract dataset,and the Remix IDE tool was used for manual review to ensure the accuracy of the data.Secondly,a smart contract vulnerability detection method based on graph neural networks is proposed,which is a vulnerability detection method based on time sequence and graph(BTAG).The method includes four stages: expert pattern extraction,contract graph construction,contract graph normalization,and vulnerability detection.In the expert pattern extraction stage,analyze the causes of vulnerabilities and extract key function calls and variables that affect the generation of vulnerabilities.During the contract graph construction phase,a contract graph is generated based on the data and control dependencies in the source code.In the contract graph normalization stage,a method for eliminating nodes and edges is designed,which involves removing secondary nodes and aggregating their features onto their nearest primary node.In the vulnerability detection phase,graph features are extracted from a normalized reduced graph through a message propagation network,and combined with the designed expert pattern to produce the final detection result.The construction of expert mode effectively improves the accuracy of smart contract vulnerability detection.Through the construction and normalization of contract graphs,the smart contract code is successfully converted into graph data that can be used for training.The extracted features are filtered using convolutional layers and maximum pooling layers,and the filtered features are connected.The fusion of expert mode features and graph features greatly improves the accuracy of vulnerability detection.Finally,the paper conducted parameter optimization experiments,comparison experiments,ablation experiments,convolution layer and classifier layer experiments,and other related experiments.The experimental results show that the smart contract vulnerability detection method based on graph neural network proposed in the paper can effectively improve the accuracy of smart contract vulnerability detection compared to other methods,with detection accuracy rates of 90.58% for reentrant attacks and 90.24% for predictable variable dependent vulnerabilities,respectively.
Keywords/Search Tags:Smart contract vulnerability detection, Graph convolution neural network, Web crawler technology, Contract graph construction, Contract graph normalization
PDF Full Text Request
Related items