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]
卷期号: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.

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

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
科研通AI2S应助554515541采纳,获得10
刚刚
Uber完成签到 ,获得积分10
刚刚
老马发布了新的文献求助30
1秒前
大个应助悲凉的孤萍采纳,获得10
1秒前
2秒前
打打应助管敬军采纳,获得10
3秒前
科研通AI6应助板凳采纳,获得10
3秒前
量子星尘发布了新的文献求助10
4秒前
Windycityguy发布了新的文献求助10
4秒前
amin发布了新的文献求助10
4秒前
意义完成签到,获得积分10
5秒前
小面脑袋完成签到,获得积分20
5秒前
5秒前
沉醉的中国钵完成签到 ,获得积分10
6秒前
共享精神应助玲℃采纳,获得10
6秒前
幸运星完成签到 ,获得积分10
6秒前
7秒前
7秒前
8秒前
领导范儿应助高兴晓丝采纳,获得10
8秒前
33333发布了新的文献求助10
8秒前
BowieHuang应助科研通管家采纳,获得10
8秒前
Mic应助科研通管家采纳,获得10
9秒前
zho应助科研通管家采纳,获得10
9秒前
JamesPei应助科研通管家采纳,获得30
9秒前
隐形曼青应助科研通管家采纳,获得10
9秒前
爆米花应助科研通管家采纳,获得10
9秒前
9秒前
科研通AI6应助科研通管家采纳,获得10
9秒前
9秒前
9秒前
完美世界应助科研通管家采纳,获得10
9秒前
科研通AI6应助科研通管家采纳,获得10
9秒前
9秒前
汉堡包应助科研通管家采纳,获得30
9秒前
LaTeXer应助科研通管家采纳,获得200
9秒前
在水一方应助科研通管家采纳,获得10
9秒前
JamesPei应助科研通管家采纳,获得10
9秒前
英俊的铭应助科研通管家采纳,获得10
9秒前
李爱国应助科研通管家采纳,获得10
10秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Mechanics of Solids with Applications to Thin Bodies 5000
Encyclopedia of Agriculture and Food Systems Third Edition 2000
Clinical Microbiology Procedures Handbook, Multi-Volume, 5th Edition 临床微生物学程序手册,多卷,第5版 2000
人脑智能与人工智能 1000
King Tyrant 720
Principles of Plasma Discharges and Materials Processing, 3rd Edition 400
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5599307
求助须知:如何正确求助?哪些是违规求助? 4684893
关于积分的说明 14836988
捐赠科研通 4667699
什么是DOI,文献DOI怎么找? 2537887
邀请新用户注册赠送积分活动 1505378
关于科研通互助平台的介绍 1470783