Cointime

Download App
iOS & Android

SharkTeam: Analysis of the Tornado.Cash Proposal Attack

On May 20, 2023, Tornado.Cash experienced a proposal attack, resulting in the attacker profiting approximately $680,000.

SharkTeam conducted a technical analysis of the incident and summarized security measures to serve as a lesson for future projects, aiming to strengthen the security defenses in the blockchain industry.

1. Incident Analysis

Attacker Addresses:

· 0x092123663804f8801b9b086b03B98D706f77bD59

· 0x592340957eBC9e4Afb0E9Af221d06fDDDF789de9

Attacking Contracts:

· 0xAF54612427d97489707332efe0b6290F129DbAcb

· 0x03ecf0d22f9ccd21144a7d492cf63b471916497a

· 0x7dc86183274b28e9f1a100a0152dac975361353d(deployed contract)

· 0xc503893b3e3c0c6b909222b45f2a3a259a52752d (fake proposal contract)

Targeted Contract:

· 0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce

Proposal Transaction:

· 0x34605f1d6463a48b818157f7b26d040f8dd329273702a0618e9e74fe350e6e0d

Attack Transaction:

· 0x3274b6090685b842aca80b304a4dcee0f61ef8b6afee10b7c7533c32fb75486d

Attack Process:

(1) The attacker (0x59234095) initiated a proposal to the targeted contract (0x5efda50f) and claimed that it was a supplement to Proposal 16.

(2) However, the proposal actually contained an additional self-destruct function.

(3) Unfortunately, the community did not identify the issue within the proposal, and most members voted in favor of it.

(4) The attacker created multiple contracts to execute token transfers.

(5) The attacker (0x59234095) destroyed the proposal contract (0xc503893b) and its creating contract (0x7dc86183). Subsequently, the attacker redeployed the attack contract (0xc503893b) at the same address.

(6) After modifying the proposal contract, the attacker (0x59234095) executed the proposal and changed the locked token balance of the contracts they controlled to 10,000.

(7) Once the proposal execution was complete, the attacker (0x09212366) transferred the tokens to their own address, gaining ownership of the targeted contract.

Vulnerability Analysis:

Since the deployment contract (0x7dc86183) is deployed through create2, the fake proposal contract (0xc503893b) is deployed through create. After the two contracts are destroyed, because the bytecode of the deployment contract (0x7dc86183) has not changed, so reusing create2 deployment can be deployed to the same address, which is 0x7dc86183, and the attack contract is deployed using the create opcode, in the deployment contract ( 0x7dc86183) is destroyed, the nonce restores the initial value, so that the attack contract can be deployed to the same address 0xc503893b even when the contract is modified. And the execution of the proposal is called in the form of delegatecall, and the attacking contract can arbitrarily modify the value in the attacked contract.

Summary of the Incident:

The root cause of this incident was the community's failure to identify the risks within the proposal and to thoroughly verify the security of the proposal contract's code.

2. Security Recommendations

In response to the recent attack incident, it is important to follow the following guidelines during the development process:

1. When designing proposals, fully consider the security of the proposal mechanism and strive to minimize the risk of centralized control. Practical measures such as reducing the value of potential attacks, increasing the cost of acquiring voting rights, and raising the cost of executing an attack should be taken into account to ensure a well-designed proposal mechanism.

2. Before voting on a proposal, the community should carefully review the contract code for any potential backdoors or security vulnerabilities.

3. Prior to proposal approval, it is advisable to engage a third-party security audit firm to conduct a thorough security audit of the contract logic code.

About us

SharkTeam’s vision is to comprehensively protect the security of the Web3 world. The team is composed of experienced security professionals and senior researchers from all over the world. They are proficient in the underlying theory of blockchain and smart contracts, and provide services including smart contract auditing, on-chain analysis, and emergency response. It has established long-term cooperative relationships with key players in various fields of the blockchain ecosystem, such as Polkadot, Moonbeam, polygon, OKC, Huobi Global, imToken, ChainIDE, etc.
Official website: https://www.sharkteam.org/
Twitter: https://twitter.com/sharkteamorg
Discord: https://discord.gg/jGH9xXCjDZ
Telegram: https://t.me/sharkteamorg

Comments

All Comments

Recommended for you

  • Global Bond Market Faces Sell-off, Panda Bond Issuance Reaches Record High

    According to CCTV Finance, the long-term government bond yields of major global economies have continued to rise recently, intensifying sell-off pressure in the bond market. However, China's bond market and exchange rate have remained relatively stable, with the issuance of Panda bonds reaching a historical high for the same period. Data shows that as of August 21, the cumulative issuance of 2026 Panda bonds has reached 209.975 billion yuan, an increase of over 73% year-on-year. Against the backdrop of significant fluctuations in the global bond market, the increased interest from international institutions in domestic RMB financing has drawn attention. Industry insiders noted, 'We are in completely different economic and monetary cycles compared to overseas. Foreign capital accounts for only about 5%-8% of our bond market, while domestic capital holds absolute pricing power. Coupled with our monetary policy that prioritizes domestic considerations, overseas shocks cannot reverse the overall trend of the domestic bond market.' Looking ahead, industry experts believe that overseas bond yields are likely to remain highly volatile, highlighting the value of RMB bond allocations, and foreign capital may continue to increase its allocation in the medium to long term. However, it is also important to note that rising U.S. bond yields have raised the return threshold for global allocation funds, which may disrupt the willingness of foreign institutions to increase their holdings of RMB bonds. Additionally, the rapid rise in bond yields in developed countries overseas may also constrain the valuation of domestic risk assets.

  • Global Bond Market Faces Sell-Off, Panda Bond Issuance Reaches Record High

    According to CCTV Finance, recent long-term government bond yields in major global economies have been rising, increasing sell-off pressure in the bond market. In contrast, China's bond market and exchange rate have remained relatively stable, with Panda bond issuance reaching a historical high for the same period. Data shows that as of August 21, the cumulative issuance of 2026 Panda bonds has reached 209.975 billion yuan, a year-on-year increase of over 73%. Amidst significant fluctuations in the global bond market, international institutions are increasingly focusing on domestic RMB financing. Industry insiders noted, 'We are in completely different economic and monetary cycles compared to overseas. Foreign capital accounts for only about 5%-8% of our bond market, while domestic capital holds absolute pricing power. Coupled with our monetary policy that prioritizes domestic conditions, overseas shocks cannot reverse the overall trend of the domestic bond market.' Looking ahead, industry experts believe that overseas bond yields are likely to remain highly volatile, highlighting the value of RMB bond allocation, which may attract continued foreign investment in the medium to long term. However, it is also important to note that rising U.S. bond yields have raised the return threshold for global allocation funds, which may disturb the willingness of foreign institutions to increase their holdings of RMB bonds. Additionally, the rapid rise in yields of bonds from developed countries overseas may also constrain the valuation of domestic risk assets.

  • Whale Transfers 1,727 Bitcoins Worth $133 Million to Binance

    According to monitoring by Bitcoin News, a whale has transferred 1,727 bitcoins, valued at $133 million, to Binance.

  • A Whale Transfers 1,727 Bitcoins Worth $133 Million to Binance

    According to monitoring by Bitcoin News, a whale has transferred 1,727 bitcoins to Binance, valued at $133 million.

  • Canadian Prime Minister: Tariff Measures Against the U.S. to Take Effect on September 8

    On August 22, Canadian Prime Minister Carney announced that Canada's tariff measures against the United States will take effect on September 8. (Jin Ten)

  • Canadian Prime Minister: Tariff Measures Against the U.S. to Take Effect on September 8

    On August 22, Canadian Prime Minister Carney announced that Canada’s tariff measures against the United States will take effect on September 8. (Jin Shi)

  • Over $1.244 Billion Liquidated in 24 Hours, Majority in Long Positions

    On August 22, according to CoinGlass data, the total liquidation amount in the cryptocurrency market reached $1.244 billion in the past 24 hours, with long positions accounting for $744 million and short positions for $500 million. A total of 246,203 individuals were liquidated. Among them, the liquidation amount for BTC was approximately $194 million, for ETH about $277 million, for SOL around $104 million, for XRP about $123 million, for ZEC approximately $66.77 million, and other assets totaled about $479 million in liquidations. The largest single liquidation in the past 24 hours occurred on the BTC-USD trading pair on Hyperliquid, valued at approximately $24.96 million.

  • Over $1.244 Billion Liquidated in the Last 24 Hours, Primarily Long Positions

    On August 22, according to CoinGlass data, the total liquidation amount in the cryptocurrency market over the past 24 hours reached $1.244 billion, with long positions accounting for $744 million and short positions for $500 million. A total of 246,203 individuals were liquidated. Among them, the liquidation amounts were approximately $194 million for BTC, $277 million for ETH, $104 million for SOL, $123 million for XRP, and about $66.77 million for ZEC, with other assets totaling approximately $479 million in liquidations. The largest single liquidation occurred on the Hyperliquid BTC-USD trading pair, valued at approximately $24.96 million.

  • Grayscale: Bitcoin May Have Hit Bottom, This Week's Rise Signals Key Cycle Reversal

    On August 22, Grayscale published an article indicating that this week could mark a turning point for Bitcoin. Historical data shows that Bitcoin typically bottoms out after falling about 80% from its cycle peak. In the recent bear market, Bitcoin has dropped about 50% from its cycle high, which is less than in all previous cycles up to this point. There has been ongoing market speculation about whether Bitcoin will experience a new round of declines in the fourth quarter of 2026. Although risks remain in the market, this week's rise may suggest that Bitcoin has formed a more solid bottom.

  • Web3 data and AI company Validation Cloud completes $10 million in new round of financing

     Web3 data and AI company Validation Cloud announced a $10 million financing round from True Global Ventures. The company plans to use the funds to expand its AI products and achieve seamless access to Web3 data.