一句话:提出 RoRacle,结合静态分析与机器学习学习合约语义,自动检测并验证只读重入引发的价格操纵漏洞。
只读重入(Read-Only Reentrancy, RoR)是智能合约中新兴的一类漏洞:攻击者利用合约 view 函数中的瞬时状态不一致,静默地操纵 DeFi 合约的价格预言机。本文提出自动化框架 RoRacle,用于检测并验证可被利用的 RoR 价格操纵漏洞。该框架分三步:首先在一组合约上做静态分析,识别跨合约的读/写依赖,从而定位脆弱函数;随后用基于机器学习的方法,通过在随机输入上采样来学习这些脆弱函数精确的数学语义;最后在所学的语义模型上合成使收益最大化的攻击。每一个利用都会在分叉链上被具体执行验证,产出可直接运行的漏洞利用证明(proof-of-exploit)。
Read-Only Reentrancy (RoR) is an emerging vulnerability in smart contracts (SC) that allows an attacker to exploit transient state inconsistencies in a contract's view functions to silently manipulate price oracles in DeFi SCs. We present RoRacle, an automated framework that detects and validates exploitable RoR-induced price manipulation vulnerabilities. RoRacle first detects vulnerable functions in a group of SCs by performing static analysis to identify cross-contract read/write (RW) dependencies. It then uses an ML-based approach to learn the precise mathematical semantics of vulnerable functions by sampling over randomized inputs. Finally, it synthesizes an attack to maximize profit using the learned model. Every exploit is concretely validated on a forked chain, producing execution-ready proof-of-exploits.