Institute of Computing Technology, Chinese Academy IR
Block-gram: Mining knowledgeable features for efficiently smart contract vulnerability detection | |
Xie, Xueshuo2,3,4; Wang, Haolong2; Jian, Zhaolong2; Fang, Yaozheng2; Wang, Zichun2; Li, Tao1,2,3,4 | |
2025-02-01 | |
发表期刊 | DIGITAL COMMUNICATIONS AND NETWORKS
![]() |
ISSN | 2468-5925 |
卷号 | 11期号:1页码:1-12 |
摘要 | Smart contracts are widely used on the blockchain to implement complex transactions, such as decentralized applications on Ethereum. Effective vulnerability detection of large-scale smart contracts is critical, as attacks on smart contracts often cause huge economic losses. Since it is difficult to repair and update smart contracts, it is necessary to find the vulnerabilities before they are deployed. However, code analysis, which requires traversal paths, and learning methods, which require many features to be trained, are too time-consuming to detect large-scale on-chain contracts. Learning-based methods will obtain detection models from a feature space compared to code analysis methods such as symbol execution. But the existing features lack the interpretability of the detection results and training model, even worse, the large-scale feature space also affects the efficiency of detection. This paper focuses on improving the detection efficiency by reducing the dimension of the features, combined with expert knowledge. In this paper, a feature extraction model Block-gram is proposed to form low- dimensional knowledge-based features from bytecode. First, the metadata is separated and the runtime code is converted into a sequence of opcodes, which are divided into segments based on some instructions (jumps, etc.). Then, scalable Block-gram features, including 4-dimensional block features and 8-dimensional attribute features, are mined for the learning-based model training. Finally, feature contributions are calculated from SHAP values to measure the relationship between our features and the results of the detection model. In addition, six types of vulnerability labels are made on a dataset containing 33, 885 contracts, and these knowledge-based features are evaluated using seven state-of-the-art learning algorithms, which show that the average detection latency speeds up 25x to 650x, compared with the features extracted by N-gram, and also can enhance the interpretability of the detection model. |
关键词 | Smart contract Bytecode & opcode Knowledgeable features Vulnerability detection Feature contribution |
DOI | 10.1016/j.dcan.2023.07.009 |
收录类别 | SCI |
语种 | 英语 |
资助项目 | National Natural Science Foundation[62272248] ; Open Project Fund of State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences[CARCHA202108] ; Open Project Fund of State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences[CARCH201905] ; Natural Science Foundation of Tianjin[20JCZDJC00610] ; Natural Science Foundation of Tianjin[2021KF0AB04] |
WOS研究方向 | Telecommunications |
WOS类目 | Telecommunications |
WOS记录号 | WOS:001447736200001 |
出版者 | KEAI PUBLISHING LTD |
引用统计 | |
文献类型 | 期刊论文 |
条目标识符 | http://119.78.100.204/handle/2XEOYT63/40691 |
专题 | 中国科学院计算技术研究所期刊论文_英文 |
通讯作者 | Li, Tao |
作者单位 | 1.Tianjin Key Lab Network & Data Secur Technol, Tianjin, Peoples R China 2.Nankai Univ, Coll Comp Sci, Tianjin, Peoples R China 3.Key Lab Blockchain & Cyberspace Governance Zhejian, Hangzhou, Peoples R China 4.Chinese Acad Sci, State Key Lab Comp Architecture, Inst Comp Technol, Beijing, Peoples R China |
推荐引用方式 GB/T 7714 | Xie, Xueshuo,Wang, Haolong,Jian, Zhaolong,et al. Block-gram: Mining knowledgeable features for efficiently smart contract vulnerability detection[J]. DIGITAL COMMUNICATIONS AND NETWORKS,2025,11(1):1-12. |
APA | Xie, Xueshuo,Wang, Haolong,Jian, Zhaolong,Fang, Yaozheng,Wang, Zichun,&Li, Tao.(2025).Block-gram: Mining knowledgeable features for efficiently smart contract vulnerability detection.DIGITAL COMMUNICATIONS AND NETWORKS,11(1),1-12. |
MLA | Xie, Xueshuo,et al."Block-gram: Mining knowledgeable features for efficiently smart contract vulnerability detection".DIGITAL COMMUNICATIONS AND NETWORKS 11.1(2025):1-12. |
条目包含的文件 | 条目无相关文件。 |
除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。
修改评论