Data verification vulnerabilities lost 3.3 million US dollars Socket attack events at the beginning and end of the attack

Source: Certik Chinese Community

January 16, 2024,Socket Tech was attacked and lost about 3.3 million US dollarsEssenceThe attacker uses a Socket contractVulnerability in the data verification linkThe user’s funds that stole the authorized contract through malicious data input.This attack brought losses to 230 addresses, and the largest single address loss was about 656,000 US dollars.

Background introduction

Socket is an interoperable protocol serving cross -chain security, efficient data and asset transmission.The Socket Gateway contract is the access point for all interaction with the Socket liquidity layer. All asset bridge accessers and DEX are converged into a unique Yuanqiao pickup, and the best transaction is selected according to user preferences (such as cost, delay or security).routing.

Three days before the hacking attack, the Socket contract administrator executed the Addroute command and added a new route to the system.The purpose of adding routes is to extend the function of the socket gateway,But I accidentally introduced a key loopholeEssence

The following figure is a record of adding routing through the contract administrator:

Outline

1. At 15:03 on January 16, Beijing time, the attacker’s wallet was transferred to the funds used by the attack. Our time analysis shows that the funds are from 0xe620, which is related to 10 BNB extracted from Tornado Cash.

2.These funds are used to create and execute two contracts to use Socket’s loopholesEssenceThe first contract is aimed at the USDC in the address of the Socketgateway address (the screenshot is as follows).127 victims were deceived by about $ 2.5 million.

3. Next, the second contract aims at Weth, USDT, WBTC, DAI and MATIC in the victim’s address.As a result, the other 104 victims lost about the assets: assets:

-42.48 WETH

-347,005.65 USDT

-2.89 WBTC

-13,821.01 dai

-165,356.99 matic

4. The attacker converts USDC and USDT into ETH.

Vulnerability

The vulnerabilities used by the attacker exist in the newly added routing address Routeaddress.

The original function of the PerformAction function in this address is to assist the function of WRAPPING and Unwrapping.

However,There is a key loophole in this function: Under the situation without verification, directly call external data through SwapextRadata in .call (), andThis means that an attacker can execute any malicious functionEssence

In this incident, the attacker made a malicious Swapextradata input to trigger the TransferFrom function.The malicious call took advantage of the user’s authorization of the Socketgateway contract and stole funds from them.

Although the contract will ensure that the user balance will change correctly after the information is called by checking the balance check to ensure that the user balance will change, but the function does not consider that the attacker sets the amount to 0.

Restore the attack process

1. Use an attack contract to call 0x00000196 () on the Socket Gateway contract.

2.Fallback () uses the six -to -make signature 196 to call loopholes. Routeraddress.

3. In the screenshot below, we can see the false input used by the attacker. The number of swapping is all 0.

4. Next, you will call wrappedtokenwapperimpl.PerformAction () for swap.

5. Without any verification, the false Swapextradata is accepted and executed by FROMTOKEN (Weth).

6. The attacker repeatedly executes the above process until the victim’s assets are exhausted.After the malicious transaction appeared, the Socket quickly called DisaBleroute, blocking the routing of the loopholes before, preventing the larger range of attacks.

7. On January 23, Socket announced that it had recovered 1032 ETHs and announced on the 25th that it would compensate all losses.This event is resolved.

Event summary

In a routing contract authorized by unlimited users, malicious CALLDATA attacks are not uncommon.

Similar attacks in the past includeDexible and heCTOR BRIDGEEssence

On February 17, 2023, the decentralized exchange Dexible was attacked and lost more than1.5 million US dollarsEssenceVulnerability Utilities Enter the malicious CALLDATA to the Fill () function of Dexible to steal user assets.

On June 2, 2023, the Hector network protocol was attacked.The attacker deployed a false USDC contract and passed the malicious CALLDATA to transfer 652,000 real USDCs from the victim’s contract.

The blockchain polymer platform usually uses a series of bridges and routing contracts to improve liquidity and reduce losses.However, this complicated packaging can bring more problems to security.

  • Related Posts

    Pump.fun sends coins. Is it an opportunity or a harvest?

    Jessy, bitchain vision On July 12, Pump fun’s token Pump will be sold publicly.This public sale is a cooperation with many second-tier companies such as Kucoin, Bitget, MEXC, etc. The…

    The market is just a little bit better, WLFI is about to be unlocked

    Jessy, bitchain vision According to the official social media of World Liberty Financial (WLFI), it is developing a token transfer function. In mid-June this year, news that WLFI is about…

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    Understand the Exit Test: The Last Mile to Decentralization

    • By jakiro
    • July 11, 2025
    • 5 views
    Understand the Exit Test: The Last Mile to Decentralization

    Shanghai State-owned Assets Supervision and Administration Commission learns stablecoin. Mysterious Oriental Power helps BTC break new highs?

    • By jakiro
    • July 11, 2025
    • 13 views
    Shanghai State-owned Assets Supervision and Administration Commission learns stablecoin. Mysterious Oriental Power helps BTC break new highs?

    ETH returns to $3,000: Six major reasons to boost Is the copycat season coming

    • By jakiro
    • July 11, 2025
    • 7 views
    ETH returns to $3,000: Six major reasons to boost Is the copycat season coming

    Shanghai State-owned Assets Supervision and Administration Commission holds a study meeting on cryptocurrency and stablecoin

    • By jakiro
    • July 11, 2025
    • 10 views
    Shanghai State-owned Assets Supervision and Administration Commission holds a study meeting on cryptocurrency and stablecoin

    Beyond DeFi Summer: Is PayFi Summer coming soon?

    • By jakiro
    • July 10, 2025
    • 10 views
    Beyond DeFi Summer: Is PayFi Summer coming soon?

    Pump.fun sends coins. Is it an opportunity or a harvest?

    • By jakiro
    • July 10, 2025
    • 21 views
    Pump.fun sends coins. Is it an opportunity or a harvest?
    Home
    News
    School
    Search