In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "case analysis of similar Fomo3D attacks". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Fomo3D-like
Before analyzing the whole event, we need to have a basic understanding of the rules of Fomo3D-like games.
The core rule of the Fomo3D game is that the last player to buy is to get the maximum benefit.
The main rules are as follows:
There is a 24-hour countdown to the beginning of the game.
If each player buys it, the time will be extended by 30s.
The earlier players buy, the more dividends they will get.
The last player to buy gets 48% of the eth in the prize pool.
There are also some detailed rules:
Each player buys dividend rights, and the more they buy, the more dividend rights they will have.
Each time the player buys the eth, it will be filled into the bonus pool, and the players who have bought it before will receive a dividend.
With the change of prize pool, the price of key will be higher.
In other words, the earlier the player buys, the greater the advantage.
Eventually, 48 per cent of the ETH in the pool is allocated to the winner, 2 per cent to the community foundation, and the remaining 50 per cent is allocated according to four team models.
After the rules of the game are clear, it is easy to understand where the attraction of the game is. As long as there are enough participants and some people are lucky, there will be a steady stream of people involved in the game. The core of the game is that the banker should ensure the authority of the rules of the game, and the credibility and unusurability of the block chain perfectly match this model.
To put it simply, this is a game based on the principle of blockchain credibility, and it is also a huge social experiment.
But how did the problem happen? Let's review the events together.
Event review
On Aug. 22, 2018, the first round of the extremely popular Fomo3D game in Tai Fong officially ended, and users who started wallet for 0xa169 finally took away the bonus of about 10469 eth.
There seems to be nothing wrong with it, but is that really the case?
Based on the rules of Fomo3D, after user A169 bought the last key, the remaining time of the game was extended to 3 minutes, and no transaction was born in the next 3 minutes. In these 3 minutes, a total of 12 blocks have been packed. But none of the Fomo3D deals were successfully packaged.
In addition, the number of these blocks is also very small, accompanied by several examples of contract transaction failures.
The most frequently involved here is the contract 0x18e1B664C6a2E88b93C1b71F61Cbf76a726B7801, which costs a lot of fees for successive failed transactions during the lottery period.
And most importantly, the contract was created by the last user who won the Fomo3D award above.
In each block during this period, there are requests for huge eth fees initiated by this contract.
In this way, the attacking users blocked the transactions purchased by other players, and finally won the big prize.
So why?
Event principle
Before we can explain how the event occurs, we need to know something about the bottom layer of the blockchain.
Ethernet Square about 14s will be dug up a block, a block will be packaged transactions, only the packaged transactions will never be tampered with on the chain.
So in order to reward the miners who dig up the blocks, every transaction on the blockchain will consume gas, and the money will be used to reward the miners, while the miners will give priority to selecting transactions that consume more gas to package for greater benefits. at present, the gas limit for a block is generally 8000000.
For each transaction, the initiator of the transaction can also define gas limit. If the total value of gas consumed by the transaction exceeds gas limit, the transaction will fail, and most transactions will be rolled back when the transaction fails.
To keep the transaction from rolling back, the attacker also uses a special instruction assert (), which is a function similar to require. The only difference between him and require is that when the condition is not met, assret consumes all gas. The principle is that during the underlying execution of the EVM, the assret returns invalid opcode error corresponding to an undefined operator 0xfeJournal EVM and ends with an error.
What the attacker does here is to initiate a super-large key transaction when determining that he is the last gasprice holder, as shown in the figure:
When attackers continue to initiate master renewal deals, the miners give priority to the packaging of these expensive deals, during which time, other transactions (including all transactions initiated on the ethernet chain, Fomo3D transactions) are difficult for miners to package into. As a result, the attacker has a high chance of becoming the last winner to hold the key.
The whole attack process is as follows:
There are about 3 minutes left in Fomo3D countdown.
The attacker purchased the last key
Attackers initiate junk transactions that consume huge amounts of gas through contracts prepared in advance.
Keep judging whether you are the last key holder for 3 minutes.
No one bought it and successfully won the grand prize.
This is the end of the content of "case Analysis of Fomo3D-like attacks". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.