当前位置:网站首页>Analysis of zero time technology | discover lightning loan attack
Analysis of zero time technology | discover lightning loan attack
2022-06-11 04:14:00 【Zero time technology】

0x1 Background of the event
Zero time science and technology blockchain security intelligence platform monitors the message , Beijing time. 2022 year 6 month 6 Japan Binance On the chain Discover Smart contract is attacked by flash loan . At zero hour, the science and technology security team timely analyzed this security incident .
0x2 Attacker information
- Attacker's wallet :
0x446247bb10B77D1BCa4D4A396E014526D1ABA277
- The attacker contract :
0x06b912354b167848a4a608a56bc26c680dad3d79
0xfa9c2157cf3d8cbfd54f6bef7388fbcd7dc90bd6
- Attack trading :
0x8a33a1f8c7af372a9c81ede9e442114f0aabb537e5c3a22c0fd7231c4820f1e9
0x1dd4989052f69cd388f4dfbeb1690a3f3a323ebb73df816e5ef2466dc98fa4a4
- ETHpledge contract :
0xe732a7bD6706CBD6834B300D7c56a8D2096723A7
0x3 Attack analysis
The attacker's main attack transaction process :

- adopt PancakeSwap Flash loans are borrowed separately 2100 gold USD and 19810 gold USD.
- take 2000 gold USD Transfer to ETHpledge contract 0xe732a.ETHpledge Contract return 62,536 gold Discover.
- take 19,810 gold USD Return the lightning loan to BSC-USD-Discover.
- take 62,536 gold Discover Exchange for USD, get 16,336 gold USD.
- The return 2,100 gold Flash loan , Put the rest USD Exchange for BNB, Profit out .
0x4 Vulnerability details
ETHpledge.team

ETHpledge.pledgein The function of the method is , The caller is transferred to USDT After receiving a certain proportion of the funds Discover Tokens, , Transfer in here USDT The money is in pledgein Method execution , receive Discover The logic of token is ETHpledge.team Method realization , Get the price logic in ETHpledge.getprice Method realization .
Vulnerability resolution
Attacker calls ETHpledge.pledgein The method used to borrow a large amount of money through lightning loans USDT Money , bring usdt.balanceOf Less money , Then call ETHpledge.pledgein Method will be a small amount of USDT into , Then call ETHpledge.getprice Method to get the price , because usdt.balanceOf Reduce , therefore _price smaller ,_swapprice smaller , Of the final transfer amount curTamount The variable increases . So as to exchange Discover The number of tokens increased .
In exchange for a large amount of Discover After the token , The attacker then promptly returned a larger sum USDT Flash loan . Subsequent use Discover Tokens are usually exchanged for more USDT.
0x5 The flow of money
At present, hackers have made profits 49 gold BNB Transfer to Tornado.Cash Mixed currency platform .

0x6 summary
The attack mainly controlled the price through the lightning loan funds , Cause the exchange quantity to fluctuate , For such security incidents , It is recommended not to use externally controllable funds to obtain prices , Avoid flash loan attacks affecting official and user assets , In addition, a comprehensive safety audit shall be conducted before the contract goes online , Avoid possible safety risks .
边栏推荐
- JVM(7):动态链接、方法的调用、四种方法调用指令区分非虚方法和虚方法、invokedynamic指令的使用
- What great open source projects does Google have?
- FreeRTOS startup - based on stm32
- 超简单 CameraX 人脸识别效果封装
- Docker uses PXC to build a MySQL Cluster (mysql:5.7.24)
- Unity prefab scene conflict merge tool unityyamlmerge
- ESP series module burning firmware
- Embedded basic interface -spi
- 再聊数据中心网络
- A Security Analysis Of Browser Extensions
猜你喜欢

JVM(6):Slot变量槽、操作数栈、代码追踪、栈顶缓存技术

Fundamentals of embedded audio processing

Eth Transfer

SQL injection correlation analysis

ESP series module burning firmware

数据类型的转换和条件控制语句

Some differences between people

从初代播种到落地生花,5G商用三周年“催生万物”

Docker swarm installs redis cluster (bitnami/redis cluster:latest)

Detailed explanation of network time synchronization (NTP network timing) of video monitoring system
随机推荐
Source Insight 4.0设置注释与反注释的快捷键
How to check whether domain name resolution is effective?
Market prospect analysis and Research Report of Ethernet scanner in 2022
Market prospect analysis and Research Report of surround packing machine in 2022
Summary of C language implementation of BP neural network
Embedded basic interface-i2s
[network] socket programming
Matlab reports an error when trying to use * * * as a function problem, and tries to execute script PCA as a function:
Esp32 gattc configuration UUID
golang泛型:generics
Some differences between people
超简单 CameraX 人脸识别效果封装
Pci/pcie related knowledge
QT日志模块的个性化使用
Market prospect analysis and Research Report of seed laser in 2022
Esp32 development -lvgl animation display
Market prospect analysis and Research Report of integrated scanner in 2022
How does the NTP clock server (satellite clock system) coordinate the integrated system?
Zhongang Mining: fluorochemical industry is the main consumption field of fluorite
It's 2022. When will the "module freedom" be realized?