Optimizing smart contract vulnerability detection via multi-modality code and entropy embedding

源代码 嵌入 编译程序 计算机科学 编码器 变压器 编码(集合论) 计算机工程 理论计算机科学 人工智能 程序设计语言 工程类 操作系统 电气工程 电压 集合(抽象数据类型)
作者
Dawei Yuan,Xiaohui Wang,Yao Li,Tao Zhang
出处
期刊:Journal of Systems and Software [Elsevier BV]
卷期号:202: 111699-111699 被引量:6
标识
DOI:10.1016/j.jss.2023.111699
摘要

Smart contracts have been widely used in the blockchain world these years, and simultaneously vulnerability detection has gained more and more attention due to the staggering economic losses caused by the attacker. Existing tools that analyze vulnerabilities for smart contracts heavily rely on rules predefined by experts, which are labour-intense and require domain knowledge. Moreover, predefined rules tend to be misconceptions and increase the risk of crafty potential back-doors in the future. Recently, researchers mainly used static and dynamic execution analysis to detect the vulnerabilities of smart contracts and have achieved acceptable results. However, the dynamic method cannot cover all the program inputs and execution paths, which leads to some vulnerabilities that are hard to detect. The static analysis method commonly includes symbolic execution and theorem proving, which requires using constraints to detect vulnerability. These shortcomings show that traditional methods are challenging to apply and expand on a large scale. This paper aims to detect vulnerabilities via the Bug Injection framework and transfer learning techniques. First, we train a Transformer encoder using multi-modality code, which contains source code, intermediate representation, and assembly code. The input code consists separately of Solidity source code, intermediate representation, and assembly code. Specifically, we translate source code into the intermediate representation and decompile the byte code into assembly code by the EVM compiler. Then, we propose a novel entropy embedding technique, which combines token embedding, segment embedding, and positional embedding of the Transformer encoder in our approach. After that, we utilize the Bug Injection framework to automatically generate specific types of buggy code for fine-tuning and evaluating the performance of vulnerability detection. The experimental results show that our proposed approach improves the performance in detecting reentrancy vulnerabilities and timestamp dependence. Moreover, our approach is more flexible and scalable than static and dynamic analysis approaches in detecting smart contract vulnerabilities. Our approach improves the baseline approaches by an average of 11.89% in term of F1 score.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
思源应助如意的泥猴桃采纳,获得10
刚刚
冷艳惜梦发布了新的文献求助10
3秒前
3秒前
ding应助真源莫方采纳,获得10
3秒前
liu关闭了liu文献求助
4秒前
4秒前
5eV完成签到,获得积分10
5秒前
7秒前
8秒前
IF发布了新的文献求助10
9秒前
litdoc完成签到,获得积分10
9秒前
oushichan完成签到,获得积分10
11秒前
冷艳惜梦完成签到,获得积分10
11秒前
zly完成签到,获得积分10
12秒前
12秒前
那种发布了新的文献求助10
12秒前
小火车完成签到,获得积分20
14秒前
英姑应助z610938841采纳,获得10
15秒前
16秒前
DyG完成签到,获得积分10
17秒前
17秒前
bc发布了新的文献求助10
18秒前
18秒前
英姑应助litdoc采纳,获得10
18秒前
打打应助风趣的傲之采纳,获得10
18秒前
IF完成签到,获得积分20
19秒前
20秒前
如意的泥猴桃完成签到,获得积分10
20秒前
Miao发布了新的文献求助50
22秒前
22秒前
菜菜完成签到 ,获得积分10
23秒前
淡淡的香发布了新的文献求助80
23秒前
23秒前
tingtingzhang完成签到 ,获得积分10
23秒前
25秒前
26秒前
verbal2005发布了新的文献求助10
27秒前
28秒前
杨纨成发布了新的文献求助10
30秒前
30秒前
高分求助中
The Mother of All Tableaux: Order, Equivalence, and Geometry in the Large-scale Structure of Optimality Theory 3000
A new approach to the extrapolation of accelerated life test data 1000
Problems of point-blast theory 400
北师大毕业论文 基于可调谐半导体激光吸收光谱技术泄漏气体检测系统的研究 390
Phylogenetic study of the order Polydesmida (Myriapoda: Diplopoda) 370
Robot-supported joining of reinforcement textiles with one-sided sewing heads 320
Novel Preparation of Chitin Nanocrystals by H2SO4 and H3PO4 Hydrolysis Followed by High-Pressure Water Jet Treatments 300
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 3998235
求助须知:如何正确求助?哪些是违规求助? 3537729
关于积分的说明 11272361
捐赠科研通 3276854
什么是DOI,文献DOI怎么找? 1807154
邀请新用户注册赠送积分活动 883757
科研通“疑难数据库(出版商)”最低求助积分说明 810014