Title: An attack strategy on the Ethereum network based on Block Stuffing. Post by: gbianchi on September 27, 2021, 01:03:52 PM An attack strategy on the Ethereum network based on Block Stuffing technique and the Deathstar smart contract. By gbianchi (https://bitcointalk.org/index.php?action=profile;u=140582) bitcointalk.org Translated by fillippone (https://bitcointalk.org/index.php?action=profile;u=1852120). This study stems from some observations:
Based on these observations, it is possible to design a "DeathStar" smart contract whose execution costs exactly the amount of gas needed to fill the block, so that it "burns" ethers only to compete with the other smart contracts for block inclusion. Briefly, the transaction is buying the entire space of an ethereum block, and therefore does not remain any available for the execution of other smart contracts. Reasons for a BlockStuffing attack A group of attackers could be incentivized for various reasons to burn ethers to jeopardize the network, for example:
In general, any person or group with sufficient economical and technical means and with any type of interest in the decline of the Ethereum network and/or the smart contracts running on it , could use this line of attack. To estimate the cost involved, consider that an ethereum block is mined every approximately 15 seconds. Estimating the average block size of 15,000,000 gas, and a gas cost of 100 gwei, that's about 1.5 ETH per block. Let’s add a 10% fee to be the most competitive, we could then estimate a cost per block of about 1.65 ETH. At this cost of gas, at the current exchange rate of about $ 4,000 for an eth, an attack lasting 60 minutes would cost about 400 ETH, or about $ 1,600,000, a very small figure in relation to the value of the network of hundreds of billions of dollars. Obviously, this estimate varies according to the current cost of gas in gwei, and the eth/usd exchange rate, both of which are extremely variable. DeathStar technical description Using the solidity language, a smart contract is encoded executing a loop burning all the gas passed by the calling transaction with the GasLimit parameter. Eventually, you can create various slightly different versions of DeathStar, to make it more difficult to identify them by a possible HardFork or from a filter software added by miners or nodes, but each one of them working according to the same logic as in the examples that I will report here: Examples Code of DeathStar code: Code: pragma solidity ^0.6.0; Code: // this version loops until it reaches the out of gas error. Brief description of the dynamics of the BlockStuffing attack: 1) launch your own geth node: geth --syncmode "light" --mainnet It will instantly synchronize because it downloads the previous blockchain. We will be necessarily autonomous and not pass trough proprietary API’s that could ban us during the attack. 2) pre-load a certain number of deathStar smart-contracts on the network, each at a different address and with slightly different code (DeathStar_a, DeathStar_b, etc. ), to make it difficult either for mining pools to recognize us or for developer recognise the necessity of a possible hard fork, 3) Find an adequate number of ETH, based on the duration of the attack and the current gas coast in gwei, and pre-load them on a certain number of source addresses. (15,000,000 average block size * (gas cost in gwei + incentive fee (Tip) to be certainly included in hte block)) / 1,000,000,000= cost in ETH for a 15 seconds attack) 4) create a script (python, perl, c, go .... or any language of your choice) that uses RPC calls on geth and does more or less the things summarized here: Code: # if DeathLoop_a stops working, 5) run the script. Thanks to the guys from the Italian community of bitcointalk.org (filippone, acquafredda, HostFat, jack0m and others) who gave me interesting ideas for the realization of this study. References: [1]ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER (https://ethereum.github.io/yellowpaper/paper.pdf) [2]The Anatomy of a Block Stuffing Attack (https://medium.com/hackernoon/the-anatomy-of-a-block-stuffing-attack-a488698732ae) [3]A Survey on Ethereum Systems Security: Vulnerabilities, Attacks, and Defenses (https://dl.acm.org/doi/fullHtml/10.1145/3391195) [4]How to Fix Ethereum’s MEV Problem and Give Traders the Best Price (https://www.coindesk.com/markets/2021/07/27/how-to-fix-ethereums-mev-problem-and-give-traders-the-best-price/) [5]Ethereum is a Dark Forest (https://www.paradigm.xyz/2020/08/ethereum-is-a-dark-forest/) [6]How Bitcoin and Ethereum solved the Halting Problem differently (https://infernaltoast.medium.com/how-bitcoin-and-ethereum-solved-the-halting-problem-differently-cffbb4e3045c) [7]Why is Bitcoin not Turing complete? (https://www.quora.com/Why-is-Bitcoin-not-Turing-complete) Title: Re: An attack strategy on the Ethereum network based on Block Stuffing. Post by: gbianchi on September 27, 2021, 01:04:08 PM reserverd
|