Block-gram: Mining Knowledgeable Features for Smart Contract Vulnerability Detection
Abstract
Effective vulnerability detection of large-scale smart contracts is critical because smart contract attacks frequently bring about tremendous economic loss. However, code analysis requiring traversal paths and learning methods requiring many features training is too time-consuming to detect large-scale on-chain contracts. This paper focuses on improving detection efficiency by reducing the dimension of the features, combined with expert knowledge. We propose a feature extraction method Block-gram to form low-dimensional knowledgeable features from the bytecode. We first separate the metadata and convert the runtime code to opcode sequence, dividing the opcode sequence into segments according to some instructions (jump, etc.). Then, we mine extensible Block-gram features for learning-based model training, consisting of 4-dimensional block features and 8-dimensional attribute features. We evaluate these knowledge-based features using seven state-of-the-art learning algorithms to show that the average detection latency speeds up 25 to 650 times, compared with the features extracted by N-gram.
BibTeX
@inproceedings{li2022block,
author = {Tao Li and Haolong Wang and Yaozheng Fang and Zhaolong Jian and Zichun Wang and Xueshuo Xie},
title = {{Block-gram: Mining Knowledgeable Features for Smart Contract Vulnerability Detection}},
booktitle = {SmartCom},
year = {2022},
doi = {10.1007/978-3-031-28124-2\_52},
}Ask Althea to put this paper to the test.
Loading related content...