arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.12971cs.CRcs.AI
收藏

Esim:基于稳定语义图的EVM字节码相似度检测

Esim: EVM Bytecode Similarity Detection Based on Stable-Semantic Graph

Zhuo Chen(朱卓);Gaoqiang Ji(贾高强);Yiling He(何毅灵);Lei Wu(吴磊);Yajin Zhou(周雅琴)

Zhuo Chen, Gaoqiang Ji, Yiling He, Lei Wu, Yajin Zhou

AI总结:

针对EVM字节码相似度检测受字节码特性、编译器版本干扰的问题,本文提出基于稳定语义图的检测方法Esim,经大规模合约验证其检测精度与漏洞搜索效果优于传统方法及Etherscan。

摘要:

去中心化金融(DeFi)正处于快速扩张阶段,但普遍存在的代码复用与有限的开源贡献给区块链生态带来了包括抄袭、漏洞代码传播在内的严峻挑战,因此亟需高效准确的EVM字节码相似度检测方法来识别相似合约。传统二进制相似度检测方法通常基于指令流或控制流图(CFG),受EVM字节码底层特性、基本块高度复用等专属特征影响,这类方法在EVM字节码场景存在局限性,此外Solidity编译器(Solc)版本差异极大,进一步提升了精准相似度检测的难度。针对上述挑战,本文提出名为稳定语义图(SSG)的新型EVM字节码表示方式,可捕获经研究识别的特殊指令“稳定指令”间的关联;同时实现了原型系统Esim,利用异构图神经网络将SSG嵌入为矩阵以开展相似度检测。Esim的SSG构建精度优异,控制流F1分数达100%、数据流F1分数达95.16%,其相似度检测性能AUC达96.3%,优于传统方法。本文开展的大规模研究在一年周期内分析了6条EVM兼容链上的2675573份智能合约,结果表明Esim在漏洞搜索场景下表现优于当前最优(SOTA)工具Etherscan。

英文摘要:

Decentralized finance (DeFi) is experiencing rapid expansion. However, prevalent code reuse and limited open-source contributions have introduced significant challenges to the blockchain ecosystem, including plagiarism and the propagation of vulnerable code. Consequently, an effective and accurate similarity detection method for EVM bytecode is urgently needed to identify similar contracts. Traditional binary similarity detection methods are typically based on instruction stream or control flow graph (CFG), which have limitations on EVM bytecode due to specific features like low-level EVM bytecode and heavily-reused basic blocks. Moreover, the highly-diverse Solidity Compiler (Solc) versions further complicate accurate similarity detection. Motivated by these challenges, we propose a novel EVM bytecode representation called Stable-Semantic Graph (SSG), which captures relationships between 'stable instructions' (special instructions identified by our study). Moreover, we implement a prototype, Esim, which embeds SSG into matrices for similarity detection using a heterogeneous graph neural network. Esim demonstrates high accuracy in SSG construction, achieving F1-scores of 100% for control flow and 95.16% for data flow, and its similarity detection performance reaches 96.3% AUC, surpassing traditional approaches. Our large-scale study, analyzing 2,675,573 smart contracts on six EVM-compatible chains over a one-year period, also demonstrates that Esim outperforms the SOTA tool Etherscan in vulnerability search.

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

↑