当前位置:网站首页>Is Dao safe? Build finance encountered a malicious governance takeover and was looted!
Is Dao safe? Build finance encountered a malicious governance takeover and was looted!
2022-07-01 19:44:00 【Chengdu Lianan】
today 2 month 15 Japan , First of all, I wish you a happy Lantern Festival ! Get together every day !
And in the early hours of this morning , Chengdu Lianan Chain Bing - Blockchain security situation awareness platform Public opinion monitoring shows that , Wind pitch DAO organization Build Finance The project is under governance attack . About this attack , Chengdu chain security technical team conducted analysis for the first time .
#1 Event overview
It is reported that ,Build Finance Is a self described as “ Decentralized risk builders ”, The goal is to encourage new projects by rewarding tokens . The idea is to use its original BUILD Tokens fund the project , In return , These projects will use BUILD Tokens to increase demand for them . Besides , The project consists of DAO maintain , That is, a decentralized organization participates in governance .( Extended reading :“DAO” What is it ?)
however , Hackers are quietly doing things , The project was maliciously managed by attackers , Hackers successfully control by getting enough votes Build The token contract , More than... Were cast in three transactions 10 Billions of BUILD Tokens, , And exhausted Balancer and Uniswap Most of the funds in the liquidity pool . After the incident , On twitter, the project team advised users not to buy... On any platform BUILD Tokens, , Project team members try to have a direct conversation with the attacker , But the other person doesn't seem interested in talking .

It seems that the project side has met another “ Capricious ” Hackers of . below , Let's take a look at the specific analysis process of the event .
#2 Event specific analysis
Round 1
Through the transaction tracking of the project , We found that 2022 year 2 month 12 Japan Build Finance The project has been stolen by an attacker , Then to 0xdcc8A38A The address was cast in three times for more than 10 Billions of BUILD Tokens, .



then 0xdcc8A38A The address will be 10 Billion tokens through Uniswap V2: BUILD The exchange will empty the transaction pool of the project party .

After observing the details of the transaction , We found that calling Build The token contract mint The address of the function coinage is also 0xdcc8A38A.

So let's look down , We observe the contract code of the project side in the figure below and find that it calls mint The address of a function can only be governance Address . The address of the coinage is 0xdcc8A38A, In other words, the contract is now governance Permission has been 0xdcc8A38A Got the address .

You can see the original from the code governance The permission belongs to the creator of the contract, that is, the 0x2Cb037BD6B7Fbd78f04756C99B7996F430c58172 Address .


We can't help but ask , that governance How permissions are transferred to 0xdcc8A38A What about it? ?
Round 2
By checking , We go through 2020 year 9 month 4 A transaction on the th found a clue , The attacker can only pass setGovernance Function to steal governance Authority . So during this period, the contract Creator 0x2Cb037BD Must have used setGovernance Function performs permission transfer .
By looking for 0x2Cb037BD The transaction record of the address is visible , On the same day, the creator used setGovernance function . transaction hash by 0xe3525247cea81ae98098817bc6bf6f6a16842b68544f1430926a363e790d33f2.


By looking inside Storage Visible permissions have been transferred to 0x38bce4b45f3d0d138927ab221560dac926999ba6 Address instead of the above 0xdcc8A38A Attack address . The transaction hash is :
0xe3525247cea81ae98098817bc6bf6f6a16842b68544f1430926a363e790d33f2.
By following up 0x38bce4b Address , Discovery is a Timelock contract , The contract can be called build Of token contract function setGovernance Function only executeTransaction function .

We follow up executeTransaction The function found one of Storage.

As can be seen from the above figure 0x38bce4b45f3d0d138927ab221560dac926999ba6 The address transfers the permission to 0x5a6ebeb6b61a80b2a2a5e0b4d893d731358d888583 Address , The transaction hash is 0x9a0c9d5d3da1019edf234d79af072c1a6acc93d21daebae4ced97ce5e41b2573, Call time is 2021 year 1 month 25 Japan .
By following up 0x5a6ebeb6 Address , As can be seen in the figure below 2022 year 2 month 9 Day by suho.eth The proposal launched ,0xdcc8A38A The attack address is 2022 year 2 month 11 The vote passed on the th . stay 4 Days ago will governance Permission changed to 0xdcc8A38A.


suho.eth Proposed changes initiated governance, The lower threshold set by the vote led to the proposal being passed , adopt call Call will build The contract governance Change to 0xdcc8A38A Address .



0x5a6ebeb6b61a80b2a2a5e0b4d893d731358d888583 Address part code .

Get... From this address governance After permission ,0xdcc8A38A Address through build Token contract mint The function casts itself about 10 Billions of build Tokens, , Then go to the trading pool to empty out liquidity .
The flow chart of obtaining permission is :

The attacker used a similar technique , The token assets held by the governance contract are transferred from another governance contract . The total profit this time is 162 individual ETH、20014 individual USDC 481405 individual DAI、75719 individual NCR about 112 Thousands of dollars .
Last , Chengdu Lianan reminds :DAO The contract should set an appropriate voting threshold , Achieve real decentralized governance , Avoiding a small number of votes will enable the proposal to be passed and successfully implemented , Suggestions can refer to openzeppelin The realization of officially provided Governance Contracts .
边栏推荐
- 703. The k-th element in the data flow
- How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?
- ffmpeg AVFrame 转 cv::Mat
- optaplanner学习笔记(一)案例Cloud balance
- 通过js实现金字塔(星号金字塔,回文对称数字金字塔)
- 118. Yanghui triangle
- Test self-study people must see: how to find test items in software testing?
- 安装sharp报错
- Actual combat of flutter - fast implementation of audio and video call application
- Wireshark packet analysis TCP, FTP
猜你喜欢
Flutter 实战-快速实现音视频通话应用
How to use console Log print text?
类加载机制
118. 杨辉三角
After studying 11 kinds of real-time chat software, I found that they all have these functions
pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']
商业智能BI开发和报表开发有什么本质区别?
如何正确使用Vertx操作Redis(3.9.4带源码分析)
JVM内存模型
Why has instagram changed from a content sharing platform to a marketing tool? How do independent sellers use this tool?
随机推荐
[AI server setup] CUDA environment
直播HLS协议
2022/6/8-2022/6/12
ES6中的代理proxy
简版拼多多商品数据
HLS4ML进入方法
IPv4地址、子网掩码、网关
一文读懂C语言中的结构体
servlet知识点
Instagram 为何从内容共享平台变成营销工具?独立站卖家如何利用该工具?
【无标题】
GC垃圾回收
利用win7漏洞进行系统登录密码破解
Interview questions for audio and video positions in Dachang -- today's headline
产品模块化设计的前世今生
【let var const】
win10下使用msys+vs2019编译ffmpeg源码
118. 杨辉三角
Redo和Undo的区别
OpenCV视频质量诊断----视频遮挡诊断