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
Tether Freezes $6.76M USDT Linked to Iran's IRGC & Houthi Forces: Why On-Chain Compliance is Now a Geopolitical Battlefield
Security Insights

Tether Freezes $6.76M USDT Linked to Iran's IRGC & Houthi Forces: Why On-Chain Compliance is Now a Geopolitical Battlefield

Looking ahead, targeted freezing events like this $6.76M USDT action will only become more common. On-chain data analysis is improving. Stablecoin issuers are also working closely with regulators. As a result, hidden illicit financial networks will be exposed.

Weekly Web3 Security Incident Roundup | Mar 2 – Mar 8, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 2 – Mar 8, 2026

During the week of March 2 to March 8, 2026, seven blockchain security incidents were reported with total losses of ~$3.25M. The incidents occurred across Base, BNB Chain, and Ethereum, exposing critical vulnerabilities in smart contract business logic, token deflationary mechanics, and asset price manipulation. The primary causes included a double-minting logic flaw during full token deposits that allowed an attacker to exponentially inflate their balances through repeated burn-and-mint cycles, a price manipulation vulnerability in an AMM-based lending market where artificially inflated vault shares created divergent price anchors to incorrectly force healthy positions into liquidation, and a flawed access control implementation relying on trivially spoofed contract interfaces that enabled attackers to bypass authorization to batch-mint and dump arbitrary tokens.

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

Weekly Web3 Security Incident Roundup | Feb 23 – Mar 1, 2026

During the week of February 23 to March 1, 2026, seven blockchain security incidents were reported with total losses of ~$13M. The incidents affected multiple protocols, exposing critical weaknesses in oracle design/configuration, cryptographic verification, and core business logic. The primary drivers included oracle manipulation/misconfiguration that led to the largest loss at YieldBloxDAO (~$10M), a crypto-proof verification flaw that enabled the FOOMCASH (~$2.26M) exploit, and additional token design and logic errors impacting Ploutos, LAXO, STO, HedgePay, and an unknown contract, underscoring the need for rigorous audits and continuous monitoring across all protocol layers.