论文标题

EOSIO智能合约的安全分析

Security Analysis of EOSIO Smart Contracts

论文作者

He, Ningyu, Zhang, Ruiyi, Wu, Lei, Wang, Haoyu, Luo, Xiapu, Guo, Yao, Yu, Ting, Jiang, Xuxian

论文摘要

EOSIO区块链是代表性授权证明(DPOS)区块链平台之一,最近迅速发展。同时,在野外也发现并观察到了对Eosio Dapps及其智能合同的许多漏洞和引人注目的攻击,从而造成了严重的财务损失。 EOSIO的大多数智能合约不是开源的,通常将其汇编为Websembly(WASM)字节码,从而使分析和检测可能存在的漏洞的存在变得具有挑战性。在本文中,我们提出了EOSAFE,这是第一个静态分析框架,可用于自动检测在字节码级别的EOSIO智能合约中的漏洞。我们的框架包括WASM的实用象征性执行引擎,WASM是EOSIO智能合约的定制库模拟器,以及四个以启发式驱动的探测器,可确定EOSIO智能合约中四个最受欢迎的漏洞的存在。实验结果表明,EOSAFE在检测漏洞的情况下实现了有希望的结果,而F1量度为98%。我们已将EOSAFE应用于生态系统中所有活跃的53,666个智能合约(截至2019年11月15日)。我们的结果表明,超过25%的智能合约是脆弱的。我们进一步分析了针对这些脆弱的智能合约的可能的剥削尝试,并确定了48次野外攻击(其中25次已由DAPP开发人员确认),从而导致财务损失至少170万美元。

The EOSIO blockchain, one of the representative Delegated Proof-of-Stake (DPoS) blockchain platforms, has grown rapidly recently. Meanwhile, a number of vulnerabilities and high-profile attacks against top EOSIO DApps and their smart contracts have also been discovered and observed in the wild, resulting in serious financial damages. Most of EOSIO's smart contracts are not open-sourced and they are typically compiled to WebAssembly (Wasm) bytecode, thus making it challenging to analyze and detect the presence of possible vulnerabilities. In this paper, we propose EOSAFE, the first static analysis framework that can be used to automatically detect vulnerabilities in EOSIO smart contracts at the bytecode level. Our framework includes a practical symbolic execution engine for Wasm, a customized library emulator for EOSIO smart contracts, and four heuristics-driven detectors to identify the presence of four most popular vulnerabilities in EOSIO smart contracts. Experiment results suggest that EOSAFE achieves promising results in detecting vulnerabilities, with an F1-measure of 98%. We have applied EOSAFE to all active 53,666 smart contracts in the ecosystem (as of November 15, 2019). Our results show that over 25% of the smart contracts are vulnerable. We further analyze possible exploitation attempts against these vulnerable smart contracts and identify 48 in-the-wild attacks (25 of them have been confirmed by DApp developers), resulting in financial loss of at least 1.7 million USD.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源