Skip to main content
QUICK REVIEW

[论文解读] EVulHunter: Detecting Fake Transfer Vulnerabilities for EOSIO's Smart Contracts at Webassembly-level

Lijin Quan, Lei Wu|arXiv (Cornell University)|Jun 25, 2019
Blockchain Technology Applications and Security参考文献 6被引用 24
一句话总结

EVulHunter 是一种静态分析工具,通过大规模分析 WebAssembly (WASM) 代码,检测 EOSIO 智能合约中的虚假转账漏洞。它构建控制流图,并应用基于模式的检测方法,结合 WASM 模拟器,对虚假 EOS 转账漏洞的检测准确率达到 86%,对虚假转账通知漏洞的检测准确率为 100%,且误报率较低。

ABSTRACT

As one of the representative Delegated Proof-of-Stake (DPoS) blockchain platforms, EOSIO's ecosystem grows rapidly in recent years. A number of vulnerabilities and corresponding attacks of EOSIO's smart contracts have been discovered and observed in the wild, which caused a large amount of financial damages. However, the majority of EOSIO's smart contracts are not open-sourced. As a result, the WebAssembly code may become the only available object to be analyzed in most cases. Unfortunately, current tools are web-application oriented and cannot be applied to EOSIO WebAssembly code directly, which makes it more difficult to detect vulnerabilities from those smart contracts. In this paper, we propose oolname, a static analysis tool that can be used to detect vulnerabilities from EOSIO WASM code automatically. We focus on one particular type of vulnerabilities named extit{fake-transfer}, and the exploitation of such vulnerabilities has led to millions of dollars in damages. To the best of our knowledge, it is the first attempt to build an automatic tool to detect vulnerabilities of EOSIO's smart contracts. The experimental results demonstrate that our tool is able to detect fake transfer vulnerabilities quickly and precisely. EVulHunter is available on GitHub\footnote{Tool and benchmarks: https://github.com/EVulHunter/EVulHunter} and YouTube\footnote{Demo video: https://youtu.be/5SJ0ZJKVZvw}.

研究动机与目标

  • 为解决在缺乏源代码的情况下检测 EOSIO 智能合约漏洞的挑战,仅依赖已编译的 WebAssembly (WASM) 二进制文件。
  • 开发一种自动化静态分析工具,能够识别 EOSIO 智能合约中常见的虚假转账漏洞,特别是虚假 EOS 转账和虚假转账通知漏洞。
  • 通过推断函数索引并支持不断演化的合约开发工具包 (Contract Development Toolkit, CDT) 变体,克服 WASM 二进制文件中缺乏符号和类型信息的问题。
  • 在包含 241 个 EOSIO 智能合约(其中 159 个存在漏洞)的真实世界基准上,评估该工具的精确率、召回率和性能表现。
  • 为 EOSIO 高吞吐量区块链生态系统提供一种可扩展且高效的漏洞检测解决方案。

提出的方法

  • EVulHunter 解析 WASM 二进制文件以提取控制流图(CFG),并使用预定义的漏洞模式进行静态分析。
  • 其包含一个 WASM 模拟器模块,用于对可疑代码路径进行模拟执行,以实现更深入的分析。
  • 通过检测在动作处理函数中触发未经授权或非预期代币转账的模式,识别虚假转账漏洞。
  • 通过分析行为模式而非依赖固定语法或结构,支持对 CDT 版本变化的动态适应。
  • 支持白名单机制,以减少由合法第三方代币账户引起的误报。
  • 该系统在包含 241 个真实世界 EOSIO 智能合约的基准上进行了评估,其中 184 个用于虚假 EOS 转账检测,195 个用于虚假转账通知检测。

实验结果

研究问题

  • RQ1当仅提供 WASM 二进制文件时,静态分析工具能否检测 EOSIO 智能合约中的虚假转账漏洞?
  • RQ2基于模式的分析在 WASM 代码上检测虚假 EOS 转账和虚假转账通知漏洞的准确率和效率如何?
  • RQ3CDT 版本的演进对 WASM 二进制文件中漏洞检测的可靠性与可维护性有何影响?
  • RQ4如何在不牺牲检测覆盖率的前提下,最小化由合法第三方代币账户引起的误报?
  • RQ5所提出的方案在实际中能否扩展到对数千个智能合约的大规模分析?

主要发现

  • EVulHunter 对虚假 EOS 转账漏洞的检测准确率达到 86%,其中 26 个误报源于 eosbetdice11 合约的历史版本和合法第三方代币账户。
  • 对于虚假转账通知漏洞,该工具实现了 100% 的准确率,无任何漏报,表明在检测此类变体时具有高精度和高召回率。
  • 每个智能合约的检测时间在 1 至 3 秒之间,随合约大小线性增长,显示出高效率和可扩展性。
  • 该工具在 241 个智能合约中的 159 个中成功识别出虚假 EOS 转账和虚假转账通知漏洞,分别使用 184 个和 195 个合约进行相应评估。
  • WASM 模拟器模块使对可疑代码路径的深入分析成为可能,显著提升了检测可靠性,超越了仅依赖语法模式匹配的局限。
  • 系统可通过自定义白名单机制扩展,以减少来自合法代币账户的误报,从而提升实际可用性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。