一句话:提出字节码级检测器 PrettySmart,识别可被绕过权限约束并滥用代币管理功能的权限再委托漏洞。
智能合约中的代币资产需要有效的权限策略来防止未授权用户操纵,但公开可访问函数可能被攻击者滥用,导致权限再委托(PRD)漏洞;现有研究多关注特权函数或状态变量的可达性,较少关注此类问题。本文提出 PrettySmart,一个面向智能合约字节码的 PRD 漏洞检测器。作者首先对 43 万个开源合约进行实证研究,发现五类广泛使用的权限约束覆盖了 98% 的合约;随后提出推断这些权限约束的机制,以及识别可被未授权攻击者绕过的约束的算法,并据此检测攻击者是否能操纵合约中的特权代币管理功能。真实数据集实验表明,PrettySmart 达到最高精确率,并检测出 118 个新的 PRD 漏洞。
As an essential component in Ethereum and other blockchains, token assets have been interacted with by diverse smart contracts. Effective permission policies of smart contracts must prevent token assets from being manipulated by unauthorized adversaries. Recent efforts have studied the accessibility of privileged functions or state variables to unauthorized users. However, little attention is paid to how publicly accessible functions of smart contracts can be manipulated by adversaries to steal users' digital assets. This attack is mainly caused by the permission re-delegation (PRD) vulnerability. In this work, we propose PrettySmart, a bytecode-level Permission re-delegation vulnerability detector for Smart contracts. Our study begins with an empirical study on 0.43 million open-source smart contracts, revealing that five types of widely-used permission constraints dominate 98% of the studied contracts. Accordingly, we propose a mechanism to infer these permission constraints, as well as an algorithm to identify constraints that can be bypassed by unauthorized adversaries. Based on the identification of permission constraints, we propose to detect whether adversaries could manipulate the privileged token management functionalities of smart contracts. The experimental results on real-world datasets demonstrate the effectiveness of the proposed PrettySmart, which achieves the highest precision score and detects 118 new PRD vulnerabilities.
@inproceedings{paperbot11336,
title = {PrettySmart: Detecting Permission Re-delegation Vulnerability for Token Behaviors in Smart Contracts},
author = {Zhijie Zhong and Zibin Zheng and Hong-Ning Dai and Qing Xue and Junjia Chen and Yuhong Nan},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3639140}
}