Back to Blog

[すべてのトークンが良いわけではない] パラルーニ攻撃の迅速な分析

Code Auditing
March 13, 2022

Paraluniプロジェクトは、3月13日(UTC+8)の午前中に攻撃を受けました。攻撃者は2つの脆弱性を悪用してプロトコルを攻撃しました。最初の脆弱性は、渡されたトークンの検証の欠如であり、2番目は従来のリエントランシーです。攻撃者はいくつかの攻撃トランザクションを仕掛けました。以下では、そのうちの1つである0xf2bba649019ce40a67f0fb74e5e800257d359d9094b6ba6faea14ffa4d3446b1を使用して、攻撃プロセス全体を説明します。

ステップI:liquidityをparaRouterに追加

攻撃者はBTCB-WBNBプール(インデックス=9)にaddLiquidityを呼び出し、プールはlpトークンをUBT(攻撃者が作成したトークン)にミントします。この操作の後、UBTトークンはプールのlpトークンを保有します。BTCBとWBNBはフラッシュローンから借りていることに注意してください。

ステップII:MasterChefdepositByAddLiquidityを呼び出す 攻撃者は、_pidとして9を指定し、UGTおよびUBTトークンをパラメータとしてdepositByAddLiquidityを呼び出しました。しかし、この関数は、プールの準備金トークンが渡されたトークン(UGTおよびUBT)と等しいかどうかをチェックしません。

次に、関数はdepositByAddLiquidityInternalを呼び出し、それがparaRouterのaddLiquidityを呼び出します。この関数は、UGTおよびUBTトークンのtransferFrom関数を呼び出します。しかし、これらの2つのトークンは攻撃者によって制御されています。UBTのtransferFrom関数で、攻撃者はMasterChefコントラクトのdeposit関数を呼び出し、最初のステップで取得したLPトークンをMasterChefコントラクトにデポジットします。

残念ながら、deposit関数での残高の変更により、addLiquidity後のnewBalanceはoldBalanceよりもはるかに大きくなっています。このようにして、攻撃者はMasterChefコントラクトで二重のクレジットを得ました。

ステップIII:利益の獲得

攻撃者は最終的にUBT.withdrawAssetおよびMasterChef.withdrawを呼び出してlptokenを償還し、BTCBとWBNBを獲得しました。流動性の数が攻撃者が持つべき数よりも多いため、攻撃者は利益を得ることになります。

教訓

リエントランシーの問題に加えて、渡されたトークンが検証されていないことが根本原因の1つです。VisorケースCoin98ケースと同様の問題もこれまでに見てきました。

BlockSecについて

BlockSecは、2021年に世界的に著名なセキュリティ専門家グループによって設立された先駆的なブロックチェーンセキュリティ企業です。当社は、新興のWeb3世界のためのセキュリティとユーザビリティの向上に専念しており、その普及を促進することを目指しています。この目的のため、BlockSecはスマートコントラクトおよびEVMチェーンのセキュリティ監査サービス、セキュリティ開発および脅威のプロアクティブなブロックのためのPhalconプラットフォーム、資金追跡および調査のためのMetaSleuthプラットフォーム、そしてWeb3ビルダーが暗号世界を効率的にサーフィンするためのMetaSuites拡張機能を提供しています。

現在までに、MetaMask、Uniswap Foundation、Compound、Forta、PancakeSwapなど300社以上の著名なクライアントにサービスを提供し、Matrix Partners、Vitalbridge Capital、Fenbushi Capitalなどの著名な投資家から2回の資金調達で数千万米ドルを獲得しました。

公式ウェブサイト:https://blocksec.com/

公式Twitterアカウント:https://twitter.com/BlockSecTeam

Sign up for the latest updates
Drift Protocol Incident: Multisig Governance Compromise via Durable Nonce Exploitation
Security Insights

Drift Protocol Incident: Multisig Governance Compromise via Durable Nonce Exploitation

On April 1, 2026 (UTC), Drift Protocol on Solana suffered a $285.3M loss after an attacker exploited Solana's durable nonce mechanism to delay the execution of phished multisig approvals, ultimately transferring administrative control of the protocol's 2-of-5 Squads governance with zero timelock. With full admin privileges, the attacker created a malicious collateral market (CVT), inflated its oracle price, relaxed withdrawal protections, and drained USDC, JLP, SOL, cbBTC, and other assets through 31 rapid withdrawals in approximately 12 minutes. This incident highlights how durable nonce-based delayed execution can decouple signer intent from on-chain execution, bypassing the temporal assumptions that multisig security implicitly relies on.

Weekly Web3 Security Incident Roundup | Mar 23 – Mar 29, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 23 – Mar 29, 2026

This BlockSec weekly security report covers eight DeFi attack incidents detected between March 23 and March 29, 2026, across Ethereum and BNB Chain, with total estimated losses of approximately $1.53M. Incidents include a $679K flawed burn mechanism exploit on the BCE token, a $512K spot-price manipulation attack on Cyrus Finance's PancakeSwap V3 liquidity withdrawal, a $133.5K flash-loan-driven referral reward manipulation on a TUR staking contract, and multiple integer overflow, reentrancy, and accounting error vulnerabilities in DeFi protocols. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.

Newsletter -  March 2026
Security Insights

Newsletter - March 2026

In March 2026, the DeFi ecosystem experienced three major security incidents. Resolv Protocol lost ~$80M due to compromised privileged infrastructure keys, BitcoinReserveOffering suffered ~$2.7M from a double-minting logic flaw, and Venus Protocol incurred ~$2.15M following a donation attack combined with market manipulation.

Best Security Auditor for Web3

Validate design, code, and business logic before launch. Aligned with the highest industry security standards.

BlockSec Audit