Detecting Reentrancy Vulnerabilities for Solidity Smart Contracts With Contract Standards-Based Rules

IF 8 1区 计算机科学 Q1 COMPUTER SCIENCE, THEORY & METHODS IEEE Transactions on Information Forensics and Security Pub Date : 2025-03-14 DOI:10.1109/TIFS.2025.3551535
Jie Cai;Jiachi Chen;Tao Zhang;Xiapu Luo;Xiaobing Sun;Bin Li
{"title":"Detecting Reentrancy Vulnerabilities for Solidity Smart Contracts With Contract Standards-Based Rules","authors":"Jie Cai;Jiachi Chen;Tao Zhang;Xiapu Luo;Xiaobing Sun;Bin Li","doi":"10.1109/TIFS.2025.3551535","DOIUrl":null,"url":null,"abstract":"The reentrancy vulnerability is one of the most notorious vulnerabilities of smart contracts. It enables attackers to hijack the control flow of a smart contract by invoking a function as the entry point and then re-invoking a function as the reentry point before the execution of the entry point ends. Although several approaches have been proposed to detect this vulnerability, they still face two main limitations. Firstly, existing approaches oversimplify the rules for identifying entry and reentry points, and many even neglect reentry point identification during vulnerability detection. Secondly, most existing approaches overlook the flow of state variables that are not promptly updated, a critical aspect of the reentrancy vulnerability. To address the limitations mentioned above, this article proposes a novel static analysis framework for reentry vulnerability detection. We formulate the reentrancy vulnerability detection as entry and reentry point identification with the state variable flow tracking. Based on the insight that most smart contracts are implemented following various technical standards, we utilize static analysis with standard-based rules to identify potential entry and reentry points. This is achieved by detecting the presence of hijackable and exploitable operations inside the smart contract. Meanwhile, we also conduct state variable flow tracking by the static taint analysis. To verify the effectiveness of our proposed approach, we construct three different datasets. Then We compare our approach with eight state-of-the-art smart contract vulnerability detectors, and our tool outperforms these baselines in detecting more vulnerable samples with fewer false positive samples. Meanwhile, our approach achieves a relatively shorter detection time with better detection results, striking a trade-off between effectiveness and efficiency.","PeriodicalId":13492,"journal":{"name":"IEEE Transactions on Information Forensics and Security","volume":"20 ","pages":"3662-3676"},"PeriodicalIF":8.0000,"publicationDate":"2025-03-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Information Forensics and Security","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/10926491/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

The reentrancy vulnerability is one of the most notorious vulnerabilities of smart contracts. It enables attackers to hijack the control flow of a smart contract by invoking a function as the entry point and then re-invoking a function as the reentry point before the execution of the entry point ends. Although several approaches have been proposed to detect this vulnerability, they still face two main limitations. Firstly, existing approaches oversimplify the rules for identifying entry and reentry points, and many even neglect reentry point identification during vulnerability detection. Secondly, most existing approaches overlook the flow of state variables that are not promptly updated, a critical aspect of the reentrancy vulnerability. To address the limitations mentioned above, this article proposes a novel static analysis framework for reentry vulnerability detection. We formulate the reentrancy vulnerability detection as entry and reentry point identification with the state variable flow tracking. Based on the insight that most smart contracts are implemented following various technical standards, we utilize static analysis with standard-based rules to identify potential entry and reentry points. This is achieved by detecting the presence of hijackable and exploitable operations inside the smart contract. Meanwhile, we also conduct state variable flow tracking by the static taint analysis. To verify the effectiveness of our proposed approach, we construct three different datasets. Then We compare our approach with eight state-of-the-art smart contract vulnerability detectors, and our tool outperforms these baselines in detecting more vulnerable samples with fewer false positive samples. Meanwhile, our approach achieves a relatively shorter detection time with better detection results, striking a trade-off between effectiveness and efficiency.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
利用基于合约标准的规则检测 Solidity 智能合约的重入漏洞
重入漏洞是智能合约中最臭名昭著的漏洞之一。它允许攻击者通过调用函数作为入口点,然后在入口点执行结束之前重新调用函数作为再入口点来劫持智能合约的控制流。尽管已经提出了几种检测此漏洞的方法,但它们仍然面临两个主要限制。首先,现有方法过于简化了识别进入点和再进入点的规则,许多方法甚至在漏洞检测过程中忽略了再进入点的识别。其次,大多数现有的方法都忽略了没有及时更新的状态变量流,这是可重入性漏洞的一个关键方面。为了解决上述局限性,本文提出了一种用于再入漏洞检测的新型静态分析框架。我们将可重入漏洞检测表述为状态变量流跟踪下的入口和再入点识别。基于大多数智能合约遵循各种技术标准实现的洞察力,我们利用基于标准的规则的静态分析来识别潜在的进入和再进入点。这是通过检测智能合约中是否存在可劫持和可利用的操作来实现的。同时,我们还通过静态污染分析进行状态变量流量跟踪。为了验证我们提出的方法的有效性,我们构建了三个不同的数据集。然后,我们将我们的方法与八个最先进的智能合约漏洞检测器进行比较,我们的工具在检测更多易受攻击的样本和更少的误报样本方面优于这些基线。同时,我们的方法实现了相对较短的检测时间和较好的检测结果,在有效性和效率之间取得了折衷。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
IEEE Transactions on Information Forensics and Security
IEEE Transactions on Information Forensics and Security 工程技术-工程:电子与电气
CiteScore
14.40
自引率
7.40%
发文量
234
审稿时长
6.5 months
期刊介绍: The IEEE Transactions on Information Forensics and Security covers the sciences, technologies, and applications relating to information forensics, information security, biometrics, surveillance and systems applications that incorporate these features
期刊最新文献
A Comprehensive Framework for Palm Vein Anti-Spoofing with Preprocessing Pipeline, Dataset and Benchmark MsgFilter: Proactive Anti-Harassment Sender-Anonymous Messaging System Outsourced Cloud Storage and Dynamic Sharing: Efficient Time-Bound Access Control Secure Rational Delegation Federated Learning A Fast Jamming Strategy Optimization Method with Imperfect Experience
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1