Block-gram:Mining knowledgeable features for efficiently smart contract vulnerability detection  

作  者:Xueshuo Xie Haolong Wang Zhaolong Jian Yaozheng Fang Zichun Wang Tao Li 

机构地区:[1]Tianjin Key Laboratory of Network and Data Security Technology,Tianjin,China [2]College of Computer Science,Nankai University,Tianjin,China [3]Key Laboratory of Blockchain and Cyberspace Governance of Zhejiang Province,China [4]State Key Laboratory of Computer Architecture,Institute of Computing Technology,Chinese Academy of Sciences,China

出  处:《Digital Communications and Networks》2025年第1期1-12,共12页数字通信与网络(英文版)

基  金:partially supported by the National Natural Science Foundation (62272248);the Open Project Fund of State Key Laboratory of Computer Architecture,Institute of Computing Technology,Chinese Academy of Sciences (CARCHA202108,CARCH201905);the Natural Science Foundation of Tianjin (20JCZDJC00610);Sponsored by Zhejiang Lab (2021KF0AB04)。

摘  要: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 25×to 650×,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 

分 类 号:TP3[自动化与计算机技术—计算机科学与技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象