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
1秒前
斯文败类应助Robinli采纳,获得10
1秒前
1秒前
彩虹猫完成签到 ,获得积分10
2秒前
2秒前
2秒前
NexusExplorer应助xiaozhang采纳,获得10
3秒前
香蕉觅云应助猫猫陈采纳,获得10
3秒前
英俊梦槐完成签到,获得积分10
4秒前
一个好人发布了新的文献求助10
4秒前
研友_VZG7GZ应助蓬莱海獭采纳,获得200
4秒前
5秒前
5秒前
量子星尘发布了新的文献求助10
5秒前
Lee完成签到,获得积分10
5秒前
小二郎应助eternity136采纳,获得10
6秒前
6秒前
张国柱发布了新的文献求助10
6秒前
6秒前
7秒前
孤独的涔完成签到,获得积分10
7秒前
7秒前
凯凯完成签到,获得积分10
7秒前
朴素雪碧完成签到,获得积分10
7秒前
斯文败类应助小熊炸毛采纳,获得10
8秒前
情怀应助Cici采纳,获得10
9秒前
9秒前
vv发布了新的文献求助10
9秒前
9秒前
9秒前
9秒前
11秒前
秦磊发布了新的文献求助10
11秒前
淮安石河子发布了新的文献求助100
12秒前
orixero应助喔喔采纳,获得10
12秒前
嗯嗯嗯完成签到,获得积分10
12秒前
研友_VZG7GZ应助Lillian采纳,获得10
12秒前
懦弱的鞅完成签到,获得积分20
12秒前
sen123发布了新的文献求助10
12秒前
WN发布了新的文献求助10
13秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Einführung in die Rechtsphilosophie und Rechtstheorie der Gegenwart 1500
NMR in Plants and Soils: New Developments in Time-domain NMR and Imaging 600
Electrochemistry: Volume 17 600
La cage des méridiens. La littérature et l’art contemporain face à la globalisation 577
Practical Invisalign Mechanics: Crowding 500
Practical Invisalign Mechanics: Deep Bite and Class II Correction 500
热门求助领域 (近24小时)
化学 医学 生物 材料科学 工程类 有机化学 内科学 生物化学 物理 计算机科学 纳米技术 遗传学 基因 复合材料 化学工程 物理化学 病理 催化作用 免疫学 量子力学
热门帖子
关注 科研通微信公众号,转发送积分 4954553
求助须知:如何正确求助?哪些是违规求助? 4216890
关于积分的说明 13121171
捐赠科研通 3999023
什么是DOI,文献DOI怎么找? 2188625
邀请新用户注册赠送积分活动 1203758
关于科研通互助平台的介绍 1116092