Multi-label Detection Method for Smart Contract Vulnerabilities Based on Expert Knowledge and Pre-training Technology
摘要
Since the establishment of the global decentralized application platform Ethereum in 2015, decentralized applications based on smart contracts have developed rapidly. While smart contracts are widely used in blockchain, they also face more and more security risks, and smart contract vulnerability detection becomes more and more important. Therefore, aiming at the problems that the existing bytecode-based vulnerability multi-label detection methods use a large number of length violence stages, which may lose key vulnerability information and cause misjudgment, resulting in low accuracy of contract vulnerability detection results and lack of multi-label classification, this paper proposes an intelligent contract vulnerability multi-label detection method based on expert knowledge and pre-training technology. This method combines expert knowledge, Bi-LSTM and attention mechanism, and uses smart contract opcode to construct pre-training language model and multi-label classification model. The experimental results show that the accuracy, precision, recall and F1 score of the proposed scheme are improved, and five types of smart contract vulnerabilities can be accurately identified.