SVScanner: Detecting smart contract vulnerabilities via deep semantic extraction

被引:12
作者
Zhang, Hengyan [1 ]
Zhang, Weizhe [1 ,2 ,3 ]
Feng, Yuming [1 ,2 ]
Liu, Yang [1 ,2 ]
机构
[1] Harbin Inst Technol, Sch Comp Sci & Technol, Shenzhen 518055, Guangdong, Peoples R China
[2] Peng Cheng Lab, Dept New Networks, Shenzhen 518055, Guangdong, Peoples R China
[3] Guangdong Prov Key Lab Novel Secur Intelligence Te, Shenzhen 518055, Guangdong, Peoples R China
基金
中国国家自然科学基金;
关键词
Blockchain; Smart contract; Vulnerability detection; Deep learning; Deep semantic extraction; CYBERSECURITY;
D O I
10.1016/j.jisa.2023.103484
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Blockchain is a significant advancement in technology recently, transforming the traditional centralized system into a decentralized one. Smart contracts, as one of the best applications of blockchain, show great potential in various fields, such as finance, supply chain, and the Internet of Things (IoT). As the world's first blockchain platform to support turing complete smart contracts, Ethereum has become the most critical infrastructure for the digital world. However, with the vigorous development of smart contracts, malicious attacks against smart contracts have frequently occurred in recent years. The issue of smart contract security has attracted widespread attention due to the huge financial losses caused by smart contract vulnerabilities. Although researchers have made some progress in detecting smart contract vulnerabilities through symbolic execution and fuzzing-based methods, existing methods mainly rely on expert knowledge and hand-crafted features, leading to many detection errors. Even worse, existing methods take tens of seconds or even minutes to detect each smart contract on average, which is extremely time-consuming. In this work, we present SVScanner, the new method combining two features of heterogeneous patterns to detect smart contract vulnerabilities in the blockchain. Specifically, we first extract global semantic features from the sequence of contract code tokens. Then we further use the attention mechanism to capture deep structural semantics from the Abstract Syntax Tree (AST) of smart contracts. Finally, we combine these two features from different patterns and use a text convolutional neural network (TextCNN) to detect contract bugs. Experimental results show that SVScanner has the ability to detect vulnerabilities effectively in real-world smart contract datasets. SVScanner achieves a 7.33% improvement in accuracy compared with other traditional methods. Moreover, our method requires significantly less detection time.
引用
收藏
页数:12
相关论文
共 51 条
[1]  
[Anonymous], 2022, SOL PARS ANTLR SOL P
[2]  
[Anonymous], 2022, DAO CONTR
[3]  
[Anonymous], 2022, COMM VULN EXP
[4]  
Ashizawa N., 2021, P 3 ACM INT S BLOCKC, P47
[5]   DefectChecker: Automated Smart Contract Defect Detection by Analyzing EVM Bytecode [J].
Chen, Jiachi ;
Xia, Xin ;
Lo, David ;
Grundy, John ;
Luo, Xiapu ;
Chen, Ting .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 48 (07) :2189-2207
[6]   Android HIV: A Study of Repackaging Malware for Evading Machine-Learning Detection [J].
Chen, Xiao ;
Li, Chaoran ;
Wang, Derui ;
Wen, Sheng ;
Zhang, Jun ;
Nepal, Surya ;
Xiang, Yang ;
Ren, Kui .
IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY, 2020, 15 :987-1001
[7]  
ConsenSys, 2022, THOUGHTS DEFI SEC
[8]   Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contracts [J].
Durieux, Thomas ;
Ferreira, Joao F. ;
Abreu, Rui ;
Cruz, Pedro .
2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, :530-541
[9]  
Ethereum, 2022, About us
[10]   Slither: A Static Analysis Framework For Smart Contracts [J].
Feist, Josselin ;
Greico, Gustavo ;
Groce, Alex .
2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, :8-15