arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.18468cs.SE
收藏

SmartReco:通过细粒度跨去中心化应用(DApp)分析检测只读重入漏洞

SmartReco: Detecting Read-Only Reentrancy via Fine-Grained Cross-DApp Analysis

Jingwen Zhang, Zibin Zheng, Yuhong Nan, Mingxi Ye, Kaiwen Ning, Yu Zhang, Weizhe Zhang

AI总结:

针对现有智能合约漏洞检测技术难以追踪多DApp交互、无法有效检测只读重入漏洞的问题,本文提出结合静动态分析的SmartReco框架,通过跨DApp边界识别、细粒度静态定位、多功能模糊测试检测漏洞,实测准确率与召回率较高,还发现了多个新漏洞。

摘要:

尽管去中心化应用(Decentralized Applications,DApps)日益普及,但它们正面临各类可被攻击者利用牟利的漏洞。在这些漏洞中,只读重入(本文中简称ROR)是一类因DApp间复杂交互产生的新型漏洞。近三年来,ROR攻击事件已给DApp生态造成约3000万美元的损失。现有智能合约漏洞检测技术因缺乏对多DApp间复杂交互的追踪与分析,几乎无法检测只读重入攻击。\n本文提出SmartReco——一种通过对智能合约结合静态分析与动态分析(即模糊测试)的新型框架,用于检测DApp中的只读重入漏洞。SmartReco的核心设计包含三方面:(1)SmartReco从高度耦合的跨合约交互中识别不同DApp之间的边界;(2)SmartReco执行细粒度静态分析,定位可能引发ROR的兴趣点(即入口函数);(3)SmartReco利用链上交易数据,跨不同DApp执行多功能模糊测试(针对入口函数与受害函数),以验证ROR的存在。\n我们在包含45个ROR的人工标注数据集上开展评估,结果显示SmartReco的准确率达88.63%,召回率达86.36%。此外,SmartReco从123个热门DApp中成功检测出43个新的ROR漏洞,受这些漏洞影响的总资产规模约达52万美元。

英文摘要:

Despite the increasing popularity of Decentralized Applications (DApps), they are suffering from various vulnerabilities that can be exploited by adversaries for profits. Among such vulnerabilities, Read-Only Reentrancy (called ROR in this paper), is an emerging type of vulnerability that arises from the complex interactions between DApps. In the recent three years, attack incidents of ROR have already caused around 30M USD losses to the DApp ecosystem. Existing techniques for vulnerability detection in smart contracts can hardly detect Read-Only Reentrancy attacks, due to the lack of tracking and analyzing the complex interactions between multiple DApps. In this paper, we propose SmartReco, a new framework for detecting Read-Only Reentrancy vulnerability in DApps through a novel combination of static and dynamic analysis (i.e., fuzzing) over smart contracts. The key design behind SmartReco is threefold: (1) SmartReco identifies the boundary between different DApps from the heavy-coupled cross-contract interactions. (2) SmartReco performs fine-grained static analysis to locate points of interest (i.e., entry functions) that may lead to ROR. (3) SmartReco utilizes the on-chain transaction data and performs multi-function fuzzing (i.e., the entry function and victim function) across different DApps to verify the existence of ROR. Our evaluation of a manual-labeled dataset with 45 RORs shows that SmartReco achieves a precision of 88.63% and a recall of 86.36%. In addition, SmartReco successfully detects 43 new RORs from 123 popular DApps. The total assets affected by such RORs reach around 520,000 USD.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑