Skip to main content
QUICK REVIEW

[论文解读] Vandal: A Scalable Security Analysis Framework for Smart Contracts

Lexi Brent, Anton Jurisevic|arXiv (Cornell University)|Sep 11, 2018
Security and Verification in Computing参考文献 11被引用 123
一句话总结

Vandal 将以太坊字节码转换为逻辑关系,并使用声明式 Soufflé 分析来检测智能合约漏洞,在大规模研究中实现高覆盖率和高速度。

ABSTRACT

The rise of modern blockchains has facilitated the emergence of smart contracts: autonomous programs that live and run on the blockchain. Smart contracts have seen a rapid climb to prominence, with applications predicted in law, business, commerce, and governance. Smart contracts are commonly written in a high-level language such as Ethereum's Solidity, and translated to compact low-level bytecode for deployment on the blockchain. Once deployed, the bytecode is autonomously executed, usually by a %Turing-complete virtual machine. As with all programs, smart contracts can be highly vulnerable to malicious attacks due to deficient programming methodologies, languages, and toolchains, including buggy compilers. At the same time, smart contracts are also high-value targets, often commanding large amounts of cryptocurrency. Hence, developers and auditors need security frameworks capable of analysing low-level bytecode to detect potential security vulnerabilities. In this paper, we present Vandal: a security analysis framework for Ethereum smart contracts. Vandal consists of an analysis pipeline that converts low-level Ethereum Virtual Machine (EVM) bytecode to semantic logic relations. Users of the framework can express security analyses in a declarative fashion: a security analysis is expressed in a logic specification written in the \souffle language. We conduct a large-scale empirical study for a set of common smart contract security vulnerabilities, and show the effectiveness and efficiency of Vandal. Vandal is both fast and robust, successfully analysing over 95\% of all 141k unique contracts with an average runtime of 4.15 seconds; outperforming the current state of the art tools---Oyente, EthIR, Mythril, and Rattle---under equivalent conditions.

研究动机与目标

  • 由于目标价值高且工具链复杂,动机需要对智能合约进行稳健的安全分析。
  • 提出一个通过声明性、逻辑驱动的方法分析低级的 EVM 字节码的框架。
  • 展示如何将常见的漏洞分析表达为 Soufflé 逻辑规范。
  • 展示在大规模的合约语料库上进行的实证评估,以评估鲁棒性和效率。

提出的方法

  • 介绍两部分组成的 Vandal 架构:一个将 EVM 字节码转换为逻辑关系的分析管线,以及一个用 Soufflé 表达的安全分析库。
  • 构建端到端管线:抓取器检索字节码、反汇编器产生助记符、反编译器生成寄存器传输语言、提取器输出逻辑关系。
  • 使用一种逐步重构控制流的反编译技术,通过符号执行、数据流分析和节点分割来解析跳转目标。
  • 将漏洞分析表达为 Soufflé 中的声明性逻辑规范,使分析的快速原型设计和组合成为可能。
  • 利用 Datalog 引擎来合成在生成的逻辑关系上工作的高效分析器。
  • 对 141k 个唯一合约进行大规模实证研究,以评估覆盖率、鲁棒性和性能。

实验结果

研究问题

  • RQ1Vandal 是否能够将 EVM 字节码分解为适用于静态分析的精确控制流和数据流表示?
  • RQ2是否可以通过声明性的 Soufflé 规范检测出常见的智能合约漏洞,并具备具有竞争力的性能?
  • RQ3在大量合约集合上,与现有工具(Oyente、EthIR、Mythril、Rattle)相比,Vandal 的覆盖率和速度表现如何?
  • RQ4面向可扩展的智能合约安全分析的逻辑驱动管线的可行性及其收益是什么?

主要发现

  • Vandal 对研究中 141k 个合约中的超过 95% 进行了反编译与分析。
  • 平均分析运行时间为每个合约 4.15 秒。
  • 在等效条件下,Vandal 的表现优于最先进的工具 Oyente、EthIR、Mythril 与 Rattle。
  • 实现的安全分析包括 unchecked send、重入、未受保护的余额、可销毁合约,以及来源漏洞。
  • 该框架提供模块化、声明性的方法,使分析的快速原型设计和组合成为可能。
  • 该管线生成的逻辑关系被 Soufflé 用于高效执行分析。

更好的研究,从现在开始

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

无需绑定信用卡

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