Back to Blog

[すべてのトークンが有効とは限らない] パラルニ攻撃の迅速な分析

Code Auditing
March 13, 2022
3 min read

Paraluniプロジェクト(https://twitter.com/paraluni)は、3月13日午前(UTC+8時)に攻撃を受けました。攻撃者は2つの脆弱性を利用してプロトコルを攻撃しました。最初の脆弱性は、渡されたトークンの検証の欠如であり、2番目は一般的なリエントランシーです。攻撃者はいくつかの攻撃トランザクションを実行しました。以下では、そのうちの1つ(0xf2bba649019ce40a67f0fb74e5e800257d359d9094b6ba6faea14ffa4d3446b1)を使用して、攻撃プロセス全体を説明します。

ステップI:paraRouterliquidityを追加

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

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

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

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

ステップIII:利益を得る

攻撃者は最終的にUBT.withdrawAssetMasterChef.withdrawを呼び出し、LPトークンを償還して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
The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis
Security Insights

The Decentralization Dilemma: Cascading Risk and Emergency Power in the KelpDAO Crisis

This BlockSec deep-dive analyzes the KelpDAO $290M rsETH cross-chain bridge exploit (April 18, 2026), attributed to the Lazarus Group, tracing a causal chain across three layers: how a single-point DVN dependency enabled the attack, how DeFi composability cascaded the damage through Aave V3 lending markets to freeze WETH liquidity exceeding $6.7B across Ethereum, Arbitrum, Base, Mantle, and Linea, and how the crisis forced decentralized governance to exercise centralized emergency powers. The article examines three parameters that shaped the cascade's severity (LTV, pool depth, and cross-chain deployment count) and provides an exclusive technical breakdown of Arbitrum Security Council's forced state transition, an atomic contract upgrade that moved 30,766 ETH without the holder's signature.

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 13 – Apr 19, 2026

This BlockSec weekly security report covers four attack incidents detected between April 13 and April 19, 2026, across multiple chains such as Ethereum, Unichain, Arbitrum, and NEAR, with total estimated losses of approximately $310M. The highlighted incident is the $290M KelpDAO rsETH bridge exploit, where an attacker poisoned the RPC infrastructure of the sole LayerZero DVN to fabricate a cross-chain message, triggering a cascading WETH freeze across five chains and an Arbitrum Security Council forced state transition that raises questions about the actual trust boundaries of decentralized systems. Other incidents include a $242K MMR proof forgery on Hyperbridge, a $1.5M signed integer abuse on Dango, and an $18.4M circular swap path exploit on Rhea Finance's Burrowland protocol.

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Apr 6 – Apr 12, 2026

This BlockSec weekly security report covers four DeFi attack incidents detected between April 6 and April 12, 2026, across Linea, BNB Chain, Arbitrum, Optimism, Avalanche, and Base, with total estimated losses of approximately $928.6K. Notable incidents include a $517K approval-related exploit where a user mistakenly approved a permissionless SquidMulticall contract enabling arbitrary external calls, a $193K business logic flaw in the HB token's reward-settlement logic that allowed direct AMM reserve manipulation, a $165.6K exploit in Denaria's perpetual DEX caused by a rounding asymmetry compounded with an unsafe cast, and a $53K access control issue in XBITVault caused by an initialization-dependent check that failed open. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident.

Best Security Auditor for Web3

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

BlockSec Audit