区块链论文速读A会-ISSTA 2023(2/2)如何检测DeFi协议中的价格操纵漏洞
Conference:ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA)
CCF level:CCF A
Categories:Software Engineering/System Software/Programming Languages
Year:2023
第1~5篇区块链文章 请点击此处查看
6
Title:
SmartState: Detecting State-Reverting Vulnerabilities in Smart Contracts via Fine-Grained State-Dependency Analysis
SmartState:通过细粒度状态依赖性分析检测智能合约中的状态恢复漏洞
Authors:
Key words:
bug finding, smart contract, static analysis, state dependency
bug查找、智能合约、静态分析、状态依赖
Abstract:
Smart contracts written in Solidity are widely used in different blockchain platforms such as Ethereum, TRON and BNB Chain. One of the unique designs in Solidity smart contracts is its statereverting mechanism for error handling and access control. Unfortunately, a number of recent security incidents showed that adversaries also utilize this mechanism to manipulate critical states of smart contracts, and hence, bring security consequences such as illegal profit-gain and Deny-of-Service (DoS). In this paper, we call such vulnerabilities as the State-reverting Vulnerability (SRV). Automatically identifying SRVs poses unique challenges, as it requires an in-depth analysis and understanding of the state-dependency relations in smart contracts. This paper presents SmartState, a new framework for detecting state-reverting vulnerability in Solidity smart contracts via finegrained state-dependency analysis. SmartState integrates a set of novel mechanisms to ensure its effectiveness. Particularly, Smart- State extracts state dependencies from both contract bytecode and historical transactions. Both of them are critical for inferring dependencies related to SRVs. Further, SmartState models the generic patterns of SRVs (i.e., profit-gain and DoS) as SRV indicators, and hence effectively identify SRVs based on the constructed statedependency graph. To evaluate SmartState, we manually annotated a ground-truth dataset which contains 91 SRVs in the real world. Evaluation results showed that SmartState achieves a precision of 87.23% and a recall of 89.13%. In addition, SmartState successfully identifies 406 new SRVs from 47,351 real-world smart contracts. 11 of these SRVs are from popular smart contracts with high transaction amounts (i.e., top 2000). In total, our reported SRVs affect a total amount of digital assets worth 428,600 USD.
用 Solidity 编写的智能合约广泛应用于以太坊、波场和 BNB Chain 等不同的区块链平台。Solidity 智能合约的独特设计之一是其用于错误处理和访问控制的状态恢复机制。不幸的是,最近的一些安全事件表明,攻击者还利用这种机制来操纵智能合约的关键状态,从而带来非法获利和拒绝服务 (DoS) 等安全后果。在本文中,我们将此类漏洞称为状态恢复漏洞 (SRV)。自动识别 SRV 带来了独特的挑战,因为它需要深入分析和理解智能合约中的状态依赖关系。本文介绍了 SmartState,这是一种通过细粒度状态依赖分析检测 Solidity 智能合约中状态恢复漏洞的新框架。SmartState 集成了一套新颖的机制来确保其有效性。特别是,Smart-State 从合约字节码和历史交易中提取状态依赖关系。它们两者对于推断与 SRV 相关的依赖关系都至关重要。此外,SmartState 将 SRV 的通用模式(即利润收益和 DoS)建模为 SRV 指标,从而根据构建的状态依赖图有效地识别 SRV。为了评估 SmartState,我们手动标注了一个包含现实世界中 91 个 SRV 的真实数据集。评估结果表明,SmartState 的准确率为 87.23%,召回率为 89.13%。此外,SmartState 还从 47,351 个现实世界智能合约中成功识别出 406 个新的 SRV。其中 11 个 SRV 来自交易金额较高的热门智能合约(即前 2000 个)。总的来说,我们报告的 SRV 影响了总价值 428,600 美元的数字资产。
assertion-related state dependency (ASD)
temporal order state dependency (TSD)
Pdf link:
https://dl.acm.org/doi/10.1145/3597926.3598111
7
Title:
Toward Automated Detecting Unanticipated Price Feed in Smart Contract
在智能合约中自动检测意外价格馈送
Authors:
Key words:
Smart Contract, Formal Verification, Price Oracle, DeFi
智能合约、形式化验证、价格预言机、DeFi
Abstract:
Decentralized finance (DeFi) based on smart contracts has reached a total value locked (TVL) of over USD 200 billion in 2022. In DeFi ecosystems, price oracles play a critical role in providing real-time price feeds for cryptocurrencies to ensure accurate asset pricing in smart contracts. However, the price oracle also faces security issues, including the possibility of unanticipated price feeds, which can lead to imbalances in debt and assets in the DeFi protocol. However, existing solutions cannot effectively combine transactions and code for real-time monitoring of price oracles. To address this limitation, we first categorize price oracles as either DON oracles, DEX oracles, or internal oracles based on trusted parties, and analyze their security risks, data sources, price duration, and query fees. Then, we propose VeriOracle, a formal verification framework for the automated detection of unanticipated price feeds in smart contracts. VeriOracle can deploy a formal semantic model of the price oracle on the blockchain to detect the status of smart contracts and identify unanticipated price feed transactions in real time. We apply VeriOracle to verify over 500,000 transactions of 13 vulnerable DeFi protocols in the real world. The experimental results show that (1) VeriOracle is effective and it can detect unanticipated price feeds before DeFi attacks (33,714 blocks ahead of the attacker in the best case); (2) VeriOracle is efficient in that its verification time (about 4s) is less than the block time of Ethereum (about 14s), which means VeriOracle can detect unsafe transactions in real time; and (3) VeriOracle is extendable for verifying defense strategies. Attacks using unanticipated price feeds can only succeed in particular smart contract states. VeriOracle can verify which smart contract states can defend against attacks.
基于智能合约的去中心化金融 (DeFi) 已在 2022 年达到超过 2000 亿美元的总锁定价值 (TVL)。在 DeFi 生态系统中,价格预言机在为加密货币提供实时价格信息以确保智能合约中资产定价准确方面发挥着关键作用。然而,价格预言机也面临安全问题,包括可能出现意外的价格信息,这可能导致 DeFi 协议中的债务和资产不平衡。然而,现有的解决方案无法有效地结合交易和代码来实时监控价格预言机。为了解决这一限制,我们首先根据可信方将价格预言机分类为 DON 预言机、DEX 预言机或内部预言机,并分析它们的安全风险、数据来源、价格持续时间和查询费用。然后,我们提出了 VeriOracle,这是一个用于自动检测智能合约中意外价格信息的形式化验证框架。VeriOracle 可以在区块链上部署价格预言机的形式化语义模型,以检测智能合约的状态并实时识别意外的价格馈送交易。我们应用 VeriOracle 验证了现实世界中 13 个易受攻击的 DeFi 协议的 500,000 多笔交易。实验结果表明:(1)VeriOracle 是有效的,它可以在 DeFi 攻击之前检测到意外的价格馈送(最好情况下比攻击者提前 33,714 个区块);(2)VeriOracle 的验证时间(约 4 秒)小于以太坊的出块时间(约 14 秒),这意味着 VeriOracle 可以实时检测不安全的交易;(3)VeriOracle 可扩展以验证防御策略。使用意外价格馈送的攻击只能在特定的智能合约状态下成功。VeriOracle 可以验证哪些智能合约状态可以抵御攻击。
decentralized exchanges (DEX)
Decentralized Oracle Networks (DONs)
Pdf link:
https://dl.acm.org/doi/10.1145/3597926.3598133
8
Title:
Detecting State Inconsistency Bugs in DApps via On-Chain Transaction Replay and Fuzzing
通过链上交易重放和模糊测试检测 DApp 中的状态不一致错误
Authors:
Mingxi Ye,Sun Yat-sen University,China
Yuhong Nan,Sun Yat-sen University
Zibin Zheng,Sun Yat-sen University
Dongpeng Wu, Sun Yat-sen University
Huizhong Li, WeBank,China
Abstract:
Decentralized applications (DApps) consist of multiple smart contracts running on Blockchain. With the increasing popularity of the DApp ecosystem, vulnerabilities in DApps could bring significant impacts such as financial losses. Identifying vulnerabilities in DApps is by no means trivial, as modern DApps consist of complex interactions across multiple contracts. Previous research suffers from either high false positives or false negatives, due to the lack of precise contextual information which is mandatory for confirming smart contract vulnerabilities when analyzing smart contracts. In this paper, we present IcyChecker, a new fuzzing-based framework to effectively identify State inconsistency (SI) Bugs – a specific type of bugs that can cause vulnerabilities such as re-entrancy, front-running with complex patterns. Different from prior works, IcyChecker utilizes a set of accurate contextual information for contract fuzzing by replaying the on-chain historical transactions. Besides, instead of designing specific testing oracles which are required by other fuzzing approaches, IcyChecker implements novel mechanisms to mutate a set of fuzzing transaction sequences, and further identify SI bugs by observing their state differences. Evaluation of IcyChecker over the top 100 popular DApps showed it effectively identifies a total number of 277 SI bugs, with a precision of 87%. By comparing IcyChecker with other state-of-the-art tools (i.e., Smartian, Confuzzius, and Sailfish), we show IcyChecker not only identifies more SI bugs but also with much lower false positives, thanks to its integration of accurate on-chain data and unique fuzzing strategies. Our research sheds light on new ways of detecting smart contract vulnerabilities in DApps.
去中心化应用程序(DApps)由在区块链上运行的多个智能合约组成。随着 DApp 生态系统的日益普及,DApp 中的漏洞可能会带来重大影响,例如财务损失。识别 DApp 中的漏洞绝非易事,因为现代 DApp 包含跨多个合约的复杂交互。先前的研究存在高误报率或漏报率,这是因为缺乏精确的上下文信息,而这些信息在分析智能合约时对于确认智能合约漏洞是必不可少的。在本文中,我们提出了 IcyChecker,这是一个基于模糊测试的新框架,可有效识别状态不一致(SI)错误 - 这是一种特定类型的错误,可能导致诸如重入、具有复杂模式的抢先交易等漏洞。与之前的研究不同,IcyChecker 通过重放链上历史交易,利用一组准确的上下文信息进行合约模糊测试。此外,IcyChecker 无需设计其他模糊测试方法所需的特定测试预言机,而是实现了新颖的机制来改变一组模糊测试交易序列,并通过观察它们的状态差异进一步识别 SI 错误。对前 100 个流行 DApp 的 IcyChecker 评估表明,它有效识别了总共 277 个 SI 错误,准确率为 87%。通过将 IcyChecker 与其他最先进的工具(即 Smartian、Confuzzius 和 Sailfish)进行比较,我们发现 IcyChecker 不仅可以识别出更多的 SI 错误,而且由于其集成了准确的链上数据和独特的模糊测试策略,误报率也低得多。我们的研究为检测 DApp 中的智能合约漏洞的新方法提供了启示。
Pdf link:
https://dl.acm.org/doi/10.1145/3597926.3598057
9
Title:
DeFiTainter: Detecting Price Manipulation Vulnerabilities in DeFi Protocols
DeFiTainter:检测 DeFi 协议中的价格操纵漏洞
Authors:
Key words:
vulnerability detection, smart contract, taint analysis
漏洞检测、智能合约、污点分析
Abstract:
DeFi protocols are programs that manage high-value digital assets on blockchain. The price manipulation vulnerability is one of the common vulnerabilities in DeFi protocols, which allows attackers to gain excessive profits by manipulating token prices. In this paper, we propose DeFiTainter, an inter-contract taint analysis framework for detecting price manipulation vulnerabilities. DeFiTainter features two innovative mechanisms to ensure its effectiveness. The first mechanism is to construct a call graph for inter-contract taint analysis by restoring call information, not only from code constants but also from contract storage and function parameters. The second mechanism is a high-level semantic induction tailored for detecting price manipulation vulnerabilities, which accurately identifies taint sources and sinks and tracks taint data across contracts. Extensive evaluation of real-world incidents and high-value DeFi protocols shows that DeFiTainter outperforms existing approaches and achieves state-of-the-art performance with a precision of 96% and a recall of 91.3% in detecting price manipulation vulnerabilities. Furthermore, DeFiTainter uncovers three previously undisclosed price manipulation vulnerabilities.
DeFi 协议是管理区块链上高价值数字资产的程序。价格操纵漏洞是 DeFi 协议中常见的漏洞之一,攻击者可以通过操纵代币价格获取超额利润。本文提出了 DeFiTainter,一个用于检测价格操纵漏洞的合约间污点分析框架。DeFiTainter 具有两种创新机制来确保其有效性。第一种机制是通过恢复调用信息来构建合约间污点分析的调用图,不仅从代码常量,而且从合约存储和函数参数中恢复调用信息。第二种机制是专门为检测价格操纵漏洞而定制的高级语义归纳,它可以准确识别污点源和污点接收器并跟踪跨合约的污点数据。对现实世界事件和高价值 DeFi 协议的广泛评估表明,DeFiTainter 优于现有方法,在检测价格操纵漏洞方面以 96% 的准确率和 91.3% 的召回率实现了最先进的性能。此外,DeFiTainter 还发现了三个以前未披露的价格操纵漏洞。
Pdf link:
https://dl.acm.org/doi/10.1145/3597926.3598124
关注我们,持续接收区块链最新论文
洞察区块链技术发展趋势
Follow us to keep receiving the latest blockchain papers
Insight into Blockchain Technology Trends
相关文章:

区块链论文速读A会-ISSTA 2023(2/2)如何检测DeFi协议中的价格操纵漏洞
Conference:ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) CCF level:CCF A Categories:Software Engineering/System Software/Programming Languages Year:2023 第1~5篇区块链文章 请点击此…...

权力之望怎么下载客户端 权力之望一键下载
《权力之望》是一款由NX3 Games开发、Smilegate发行的多人在线动作MMORPG游戏。这款游戏最大的特点是高度的自由度和丰富的角色定制选项。我们在游戏中不仅可以自由更换武器,而且游戏还提供了54种能力和60多种职业选择,让我们可以根据自己的游戏风格和喜…...
Oracle PL/SQL 循环批量执行存储过程
1. 查询存储过程 根据数据字典USER_OBJECTS查询出所有存储过程。 2. 动态拼接字符串(参数等) 根据数据字典USER_ARGUMENTS动态拼接参数。 3. 动态执行 利用EXECUTE IMMEDIATE动态执行无名块。 4. 输出执行信息 利用DBMS_OUTPUT.PUT_LINE输出执行成功与…...

kafka 生产者
生产者 生产者负责创建消息,然后将其投递到Kafka中。 负载均衡 轮询策略。随机策略。按照 key 进行hash。 Kafka 的默认分区策略:如果指定了 key,key 相同的消息会发送到同一个分区(分区有序);如果没有…...

Powershell 获取电脑保存的所有wifi密码
一. 知识点 netsh wlan show profiles 用于显示计算机上已保存的无线网络配置文件 Measure-Object 用于统计数量 [PSCustomObject]{ } 用于创建Powershell对象 [math]::Round 四舍五入 Write-Progress 显示进度条 二. 代码 只能获取中文Windows操作系统的wifi密码如果想获取…...

golang结合neo4j实现权限功能设计
neo4j 是非关系型数据库之图形数据库,这里不再赘述。 传统关系数据库基于rbac实现权限, user ---- role ------permission,加上中间表共5张表。 如果再添上部门的概念:用户属于部门,部门拥有 角色,则又多了一层: user-…...

java 参数传递(尤其注意参数是对象的情况)
8大基本数据类型为 值传递 类和数组为 引用传递,传递的是地址 但是要注意虽然类是引用传递,但是要注意,调用方法是新开一个栈 因此如果进行p null或者 Person p new Person()等语句,要格外注意: 如果主函数再次输出…...
拼音字符串相似度
拼音字符串相似度 拼音字符串相似度介绍参考代码**编辑距离****余弦相似度****Jaccard相似度**参考文档拼音字符串相似度 介绍 拼音相似度是指在拼音转换后,两个拼音字符串之间的相似程度。常用的拼音相似度度量方法包括编辑距离、余弦相似度和 Jaccard 相似度等。 编辑距离…...
如何创建一个基本的Mojolicious Web应用:探索Perl的现代Web框架
如何创建一个基本的Mojolicious Web应用:探索Perl的现代Web框架 Mojolicious是一个用Perl编写的简单、优雅的Web开发框架,它提供了一套丰富的工具和方法,让开发者能够快速构建高性能的Web应用。本文将详细介绍如何创建一个基本的Mojolicious…...
FPGA/数字IC复习八股
一、FPGA概念,与数字IC的区别 二、FPGA底层逻辑 三、同步电路、异步电路以及优缺点 四、同步复位、异步复位、异步复位同步释放 深入理解复位---同步复位,异步复位,异步复位同步释放(含多时钟域)_画出支持异步复位dff的电路图…...

Android 简单快速实现 下弧形刻度尺(滑动事件)
效果图: 直接上代码: package com.my.view;import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Pai…...

【Go】常见的变量与常量
变量 常见的变量声明方式 一、声明单个变量的多种方式 1.声明一个变量初始化一个值 //声明变量 默认值是0,var a int//初始化一个值a 1fmt.Println(a) 2. 在初始化的时候省去数据类型,通过值自动匹配当前的变量的数据类型 var b 2fmt.Println(&quo…...

Qt使用sqlite数据库及项目实战
一.sqlite使用介绍 在Qt中使用SQLite数据库非常简单,SQLite是一个轻量级的嵌入式数据库,不需要单独的数据库服务器,完全使用本地文件来存储数据。 当在Qt中使用SQLite数据库时,需要涉及到一些SQL语句以及Qt中的相关函数…...

开源模型应用落地-FastAPI-助力模型交互-进阶篇(一)
一、前言 FastAPI 的高级用法可以为开发人员带来许多好处。它能帮助实现更复杂的路由逻辑和参数处理,使应用程序能够处理各种不同的请求场景,提高应用程序的灵活性和可扩展性。 在数据验证和转换方面,高级用法提供了更精细和准确的控制&#…...
精准选择广告工具,提升推广效果
在考虑使用巨量引擎之前,我们首先要明白它的本质。巨量引擎是一个付费广告平台,包含了多种推广工具,如巨量ID、巨量千川、巨量本地推,以及企业蓝V等。很多人希望通过这个平台提升抖音账号的流量和曝光度,但真正有效的流…...
Swagger的原理及应用详解(六)
本系列文章简介: 在当今快速发展的软件开发领域,特别是随着微服务架构和前后端分离开发模式的普及,API(Application Programming Interface,应用程序编程接口)的设计与管理变得愈发重要。一个清晰、准确且易于理解的API文档不仅能够提升开发效率,还能促进前后端开发者之…...

世界人工智能大会今日开幕:人工智能如何成为引领发展的新引擎
人工智能如何成为引领上海发展的新引擎?今日(7月4日)开幕的2024世界人工智能大会暨人工智能全球治理高级别会议(简称“WAIC 2024”)将带来答案。 “新”和“全”是今年大会的亮点所在:“新”在于技术新&…...

tinyshop项目部署
参考软件测试之测试用例设计(四)_管理后台 测试用例-CSDN博客 1、下载xampp 2、修改apache和mysql的端口分别为4431 ,8013和3306 3、访问页面:输入ip:端口号,出现以下页面即成功 4、安装tinyshop商城 将解压的tinys…...

Gemini for China 大更新,现已上架 Android APP!
官网:https://gemini.fostmar.online/ Android APP:https://gemini.fostmar.online/gemini_1.0.apk 一、Android APP 如果是 Android 设备,则会直接识别到并给下载链接。PC 直接对话即可。 二、聊天记录 现在 Gemini for Chinaÿ…...
Unity渲染管线介绍
Unity中的渲染管线渲染场景主要分为三个阶段 剔除(Culling) 剔除摄像机不可见对象(视锥体剔除Frustum Culling)和被遮挡对象(遮挡剔除Occlusion Culling)。 渲染(Rendering) 将可见…...
基于算法竞赛的c++编程(28)结构体的进阶应用
结构体的嵌套与复杂数据组织 在C中,结构体可以嵌套使用,形成更复杂的数据结构。例如,可以通过嵌套结构体描述多层级数据关系: struct Address {string city;string street;int zipCode; };struct Employee {string name;int id;…...
模型参数、模型存储精度、参数与显存
模型参数量衡量单位 M:百万(Million) B:十亿(Billion) 1 B 1000 M 1B 1000M 1B1000M 参数存储精度 模型参数是固定的,但是一个参数所表示多少字节不一定,需要看这个参数以什么…...

对WWDC 2025 Keynote 内容的预测
借助我们以往对苹果公司发展路径的深入研究经验,以及大语言模型的分析能力,我们系统梳理了多年来苹果 WWDC 主题演讲的规律。在 WWDC 2025 即将揭幕之际,我们让 ChatGPT 对今年的 Keynote 内容进行了一个初步预测,聊作存档。等到明…...

cf2117E
原题链接:https://codeforces.com/contest/2117/problem/E 题目背景: 给定两个数组a,b,可以执行多次以下操作:选择 i (1 < i < n - 1),并设置 或,也可以在执行上述操作前执行一次删除任意 和 。求…...
sqlserver 根据指定字符 解析拼接字符串
DECLARE LotNo NVARCHAR(50)A,B,C DECLARE xml XML ( SELECT <x> REPLACE(LotNo, ,, </x><x>) </x> ) DECLARE ErrorCode NVARCHAR(50) -- 提取 XML 中的值 SELECT value x.value(., VARCHAR(MAX))…...

NFT模式:数字资产确权与链游经济系统构建
NFT模式:数字资产确权与链游经济系统构建 ——从技术架构到可持续生态的范式革命 一、确权技术革新:构建可信数字资产基石 1. 区块链底层架构的进化 跨链互操作协议:基于LayerZero协议实现以太坊、Solana等公链资产互通,通过零知…...

HarmonyOS运动开发:如何用mpchart绘制运动配速图表
##鸿蒙核心技术##运动开发##Sensor Service Kit(传感器服务)# 前言 在运动类应用中,运动数据的可视化是提升用户体验的重要环节。通过直观的图表展示运动过程中的关键数据,如配速、距离、卡路里消耗等,用户可以更清晰…...

GitFlow 工作模式(详解)
今天再学项目的过程中遇到使用gitflow模式管理代码,因此进行学习并且发布关于gitflow的一些思考 Git与GitFlow模式 我们在写代码的时候通常会进行网上保存,无论是github还是gittee,都是一种基于git去保存代码的形式,这样保存代码…...

【网络安全】开源系统getshell漏洞挖掘
审计过程: 在入口文件admin/index.php中: 用户可以通过m,c,a等参数控制加载的文件和方法,在app/system/entrance.php中存在重点代码: 当M_TYPE system并且M_MODULE include时,会设置常量PATH_OWN_FILE为PATH_APP.M_T…...

零知开源——STM32F103RBT6驱动 ICM20948 九轴传感器及 vofa + 上位机可视化教程
STM32F1 本教程使用零知标准板(STM32F103RBT6)通过I2C驱动ICM20948九轴传感器,实现姿态解算,并通过串口将数据实时发送至VOFA上位机进行3D可视化。代码基于开源库修改优化,适合嵌入式及物联网开发者。在基础驱动上新增…...