Back to Blog

APEエアドロップへのフラッシュローン攻撃の簡単な分析

Code Auditing
March 17, 2022

The creators of Bored Ape Yacht Club unveil ApeCoin crypto token (lifestyleasia.com)

Will Sheehan氏の報告によると、APEトークンはMEVによって攻撃を受けました。分析の結果、APEトークンのエアドロッププロセスがスポット状態のみを考慮しており、攻撃者によって操作されうる脆弱性が原因であると考えられます。

具体的には、攻撃者はNFTと交換可能なBYACトークンを借り入れ、そのNFTを使用してエアドロップを請求できます。その後、攻撃者はBYAC NFTを使用してBYACトークンをミントし、フラッシュローンを返済します。しかし、このプロセスで攻撃者はエアドロップされたAPEトークンを入手しました。これは、契約が操作可能な資産のスポット価格のみを考慮するフラッシュローンベースの価格操作攻撃に似ていると考えられます。

以下では、攻撃トランザクションを使用してこのプロセスを説明します。

ステップI:フラッシュローンの手数料のためのNFTを準備する

攻撃者は1060 NFTを攻撃コントラクト0x7797に転送しました。このNFTはフラッシュローンで借りたものではなく、106 ETHで購入したものです。

ステップII:フラッシュローンを通じてBYACトークンを借り入れる

ステップIII:NFTを使用してAPEトークンを請求する

このプロセス中、攻撃者は6つのNFTを保有していました。1つは購入した1060個、もう5つは(ステップIIで)借り入れたBYACトークンを使用して交換したものです。合計で60,564 APEトークンを入手しました。

ステップIV:NFTをミントしてBYACトークンを取得する

攻撃者は6つのNFTをミントしてBYACトークンを取得しました。攻撃者は自身のNFT(1060個)もミントしてフラッシュローンの手数料を支払いました。フラッシュローンを返済した後もBYACトークンが残っていたため(自身のBYAC NFT 1060個をミントしたため)、攻撃者は残りのBYACトークンを約14 ETHでスワップしました。

利益

合計で、攻撃者は60,564 APEトークンを入手しました。これは(執筆時点の)約500万米ドルの価値がありました。コストはNFT1つ(106 ETH - 14 ETH)で、約27万米ドルでした。

学び

ここでの問題は、APEトークンのエアドロップが、NFTが誰かに保有されているかどうかというスポット状態のみを考慮していることだと考えられます。これは、攻撃者がフラッシュローンを使用してスポット状態を操作できるため、脆弱です。フラッシュローンのコストがエアドロップトークンの価値よりも小さい場合、示されたような攻撃機会が生まれます。

謝辞

トランザクションを報告したWill Sheehan氏に感謝します。

BlockSecについて

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

現在までに、同社は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
Tracing $1.6B in TRON USDT: Inside the VerilyHK Ponzi Infrastructure
Case Studies

Tracing $1.6B in TRON USDT: Inside the VerilyHK Ponzi Infrastructure

An on-chain investigation into VerilyHK, a fraudulent platform that moved $1.6B in TRON USDT through a multi-layered fund-routing infrastructure of rotating wallets, paired payout channels, and exchange exit funnels, with traced connections to the FinCEN-sanctioned Huione Group.

Weekly Web3 Security Incident Roundup | Mar 30 – Apr 5, 2026
Security Insights

Weekly Web3 Security Incident Roundup | Mar 30 – Apr 5, 2026

This BlockSec weekly security report covers nine DeFi attack incidents detected between March 30 and April 5, 2026, across Solana, BNB Chain, Arbitrum, and Polygon, with total estimated losses of approximately $287M. The week was dominated by the $285.3M Drift Protocol exploit on Solana, where attackers combined multisig signer social engineering with Solana's durable nonce mechanism to bypass a zero-timelock 2-of-5 Security Council, alongside notable incidents including a $950K flash loan TWAP manipulation against the LML staking protocol, a $359K Silo Finance vault inflation via an external `wstUSR` market donation exploiting a depegged-asset oracle and `totalAssets()` accounting flaw, and an EIP-7702 delegated-code access control failure. The report provides detailed vulnerability analysis and attack transaction breakdowns for each incident, covering flawed business logic, access control, price manipulation, phishing, and misconfiguration attack types.

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.

Best Security Auditor for Web3

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

BlockSec Audit