当前位置:网站首页>Superfluid_ HQ hacked analysis
Superfluid_ HQ hacked analysis
2022-07-06 01:18:00 【Know Chuangyu blockchain Security Laboratory】
front ⾔
2022 year 2 month 8 Japan , Know Chuangyu blockchain Security Lab Detected on Ethereum DeFi agreement superfluid Encounter hacker attack , Loss exceeding 1300 Thousands of dollars . The laboratory tracked and analyzed this event for the first time .
The attack involves basic information
Superfluid:0xEBbe9a6688be25d058C9469Ee4807E5eF192897f
Attack trading hash:0x396b6ee91216cf6e7c89f0c6044dfc97e84647f5007a658ca899040471ab4d67
Hacker address :0x1574F7F4C9d3aCa2EbcE918e5d19d18aE853c090
Attack contract address : 0x32D47ba0aFfC9569298d4598f7Bf8348Ce8DA6D4
Vulnerability analysis
The core of the vulnerability
The core of this vulnerability lies in the function callAgreement, This function is mainly used to provide a function named "ctx" Data structure of ,“ctx” Used for communication sharing between protocols . The attacker of this incident is right ”ctx“ The data are forge , Achieve the purpose of cheating the contract .
Exploit
Why fake data is used and how attackers construct fake “ctx” Data ?
From the transaction, we can see that the attacker is directly in callData A false is passed in at the end “ctx”, At the same time, it's really “ctx” The data is also constructed , It's just that the program will callData Data and “ctx” Packaged into an object , When the protocol decodes the object ,ABI The decoder will only process the data at the front and ignore the data at the back .
And build a fake “ctx” The data is not complicated , because “ctx” The end of the structure is all zero, so we only need to imitate “ctx” Structure adds it directly to userData in , The following is an official example of how to build a fake “ctx”:
summary
This attack event lies in the unconditional trust of the source data during protocol data processing , User data should be identified and distinguished from official construction data . In the near future , Various contract vulnerabilities and security incidents occur frequently , Contract audit 、 Risk control measures 、 It is necessary to implement the emergency plan .
边栏推荐
- Fibonacci number
- 有谁知道 达梦数据库表的列的数据类型 精度怎么修改呀
- 视频直播源码,实现本地存储搜索历史记录
- Unity | 实现面部驱动的两种方式
- MobileNet系列(5):使用pytorch搭建MobileNetV3并基于迁移学习训练
- Paging of a scratch (page turning processing)
- 3D model format summary
- Four dimensional matrix, flip (including mirror image), rotation, world coordinates and local coordinates
- Beginner redis
- Interview must brush algorithm top101 backtracking article top34
猜你喜欢
[pat (basic level) practice] - [simple mathematics] 1062 simplest fraction
Test de vulnérabilité de téléchargement de fichiers basé sur dvwa
cf:H. Maximal AND【位运算练习 + k次操作 + 最大And】
Pbootcms plug-in automatically collects fake original free plug-ins
Idea sets the default line break for global newly created files
95后CV工程师晒出工资单,狠补了这个,真香...
Cf:c. the third problem
About error 2003 (HY000): can't connect to MySQL server on 'localhost' (10061)
The population logic of the request to read product data on the sap Spartacus home page
282. Stone consolidation (interval DP)
随机推荐
Four commonly used techniques for anti aliasing
MATLB | real time opportunity constrained decision making and its application in power system
Differences between standard library functions and operators
The inconsistency between the versions of dynamic library and static library will lead to bugs
yii中console方法调用,yii console定时任务
2020.2.13
cf:H. Maximal AND【位运算练习 + k次操作 + 最大And】
Programmer growth Chapter 9: precautions in real projects
在产业互联网时代,将会凭借大的产业范畴,实现足够多的发展
Study diary: February 13, 2022
测试/开发程序员的成长路线,全局思考问题的问题......
DOM introduction
What is weak reference? What are the weak reference data types in ES6? What are weak references in JS?
现货白银的一般操作方法
FFT 学习笔记(自认为详细)
基于DVWA的文件上传漏洞测试
In the era of industrial Internet, we will achieve enough development by relying on large industrial categories
Kotlin core programming - algebraic data types and pattern matching (3)
How to extract MP3 audio from MP4 video files?
Leetcode 剑指 Offer 59 - II. 队列的最大值