一句话:提出基于字节码污点分析的静态分析器 eTainter,检测智能合约 gas 相关漏洞。
智能合约在以太坊上执行需消耗用户支付的 gas;若 gas 不足,执行会中止并回滚。但合约中可能包含抬高执行成本的代码模式,攻击者可借此对受害者合约发起拒绝服务等攻击,论文称之为 gas 相关漏洞。为此,作者提出 eTainter,一种在智能合约字节码上进行污点跟踪的静态分析器,用以检测此类漏洞。在带标注合约数据集上,eTainter 的精确率和召回率均优于先前工作 MadMax,人工检查显示其精确率达 90%。作者还对以太坊上 60,612 个真实合约进行大规模分析,发现 2,763 个合约存在 gas 相关漏洞,平均分析一个合约约需 8 秒。
The execution of smart contracts on the Ethereum blockchain consumes gas paid for by users submitting contracts' invocation requests. A contract execution proceeds as long as the users dedicate enough gas, within the limit set by Ethereum. If insufficient gas is provided, the contract execution halts and changes made during execution get reverted. Unfortunately, contracts may contain code patterns that increase execution cost, causing the contracts to run out of gas. These patterns can be manipulated by malicious attackers to induce unwanted behavior in the targeted victim contracts, e.g., Denial-of-Service (DoS) attacks. We call these gas-related vulnerabilities. We propose eTainter, a static analyzer for detecting gas-related vulnerabilities based on taint tracking in the bytecode of smart contracts. We evaluate eTainter by comparing it with the prior work, MadMax, on a dataset of annotated contracts. The results show that eTainter outperforms MadMax in both precision and recall, and that eTainter has a precision of 90% based on manual inspection. We also use eTainter to perform large-scale analysis of 60,612 real-world contracts on the Ethereum blockchain. We find that gas-related vulnerabilities exist in 2,763 of these contracts, and that eTainter analyzes a contract in eight seconds, on average.
DOI 原文 ·
@inproceedings{paperbot7379,
title = {eTainter: detecting gas-related vulnerabilities in smart contracts},
author = {Asem Ghaleb and Julia Rubin and Karthik Pattabiraman},
booktitle = {ISSTA},
year = {2022},
doi = {10.1145/3533767.3534378}
}