AIエージェントウォレットはノンカストディアルであるべき理由:ラザラス攻撃がそれを明らかにした
ラザラス・グループは別のホットウォレットを流出させた。今回の標的は Bitrefill だった。もしAIエージェントが管理型ウォレットで動作しているなら、同じ攻撃の対象範囲を抱えることになる — エージェントの能力が向上するたびに、その範囲は月ごとに拡大していく。
私は数か月間、agent-wallet-sdkを作っています — 自律的なAIエージェント専用に設計されたノンカストディアルウォレット。APIへの支払い、サブエージェントの雇用、そして人間が動作のすべてを承認することなくオンチェーン取引を実行するタイプのものです。
私たちが始めた頃、最も一般的な反論はこうでした:「なぜノンカストディアルなのか? 管理型は設定がはるかに簡単だ。」
今は2026年3月。ラザラスはついに業界全体のその問いに答えを示した。
Bitrefillで起きたこと
Gartnerは今月、ラザラス・グループがBitrefillのホットウォレットを、盗用されたAPIキーと彼らの顧客向けAIアシスタントを通じたプロンプト注入の組み合わせで侵害したことを確認しました。この注入により支払いバックエンドへの権限が昇格しました。ホットウォレットは中央管理の単一キーで、数分で引き出されました。
ブロックチェーンの悪用はなし。スマートコントラクトのバグもなし。彼らは中央集権化された1つのキーを見つけただけで、それが全てのゲームだった。
もしあなたが管理型ウォレットでエージェントを動かしているなら、まさに同じ攻撃面を抱えています。おそらくさらに悪いのは、エージェントが絶えず信頼できない内容を読んでいるという点です。
Three Ways the Custodial Model Breaks for Agents
1. Prompt injection → payment execution
エージェントは一日中、信頼できない内容を処理します。ウェブページ、API応答、ユーザー入力、ツールの出力。エージェントのコンテキストにテキストを注入できる攻撃者は、出金を試みたり、取引を承認したり、認証情報を回転させたりすることができます。
管理型ウォレット = その指示が実行できるバックエンドに到達します。被害の範囲はあなたのウォレット全体の残高です。
オンチェーンの支出方針を伴うノンカストディアルですか?同じ注入は、次のように規定するコントラクトに到達します。「このエージェントは1回の取引につき最大0.01 ETH、ホワイトリストにある宛先にのみ、そして1日あたり0.1 ETHを超えない。」リクエストは毎回拒否されます。
2. The infrastructure owner is your weakest link
管理型とは、誰かがあなたの鍵を他者が保持していることを意味します。その“誰か”は標的になります。APIキーの漏洩、内部関係者の脅威、フィッシング、サプライチェーンの妥協 — いずれもあなたの行為の誤りなしにエージェントの資金を露出させます。
ノンカストディアルでは、あなたのエージェントは自分の鍵を保持します。インフラ提供者が侵害されても、あなたのウォレットには影響を与えません。
3. Binary authorization is too coarse for agents
ほとんどの管理型設定には1つのダイヤルしかありません: APIキーが支出できるか、できないか。エージェントごとの制限、宛先ホワイトリスト、時期を限定した出金はありません。
ERC-6551 Token Bound Accounts — agent-wallet-sdkが動作するもの — は支出の制御をオンチェーンに置きます。すべてのエージェントウォレットには、正確に何ができるかを定義するSpendingPolicyがあり、再デプロイで上書き可能な設定ではありません。オンチェーン、不可変、監査可能です。
What This Looks Like in Code
import { AgentWallet, SpendingPolicy } from '@ai-agent-economy/agent-wallet-sdk';
// Spin up an agent wallet with hard guardrails
const wallet = await AgentWallet. create({
policy: new SpendingPolicy({
maxPerTx: parseEther('0.01'), // 0.01 ETH max per transaction
maxPerDay: parseEther('0.1'), // 0.1 ETH daily cap
allowedDestinations: [ // Whitelist — nothing else goes through
'0xYourAPIProvider',
'0xYourSubAgentPool',
],
}),
});
// Agent pays for an inference call
await wallet.pay({
to: '0xYourAPIProvider',
amount: parseEther('0.005'),
memo: 'inference_call_id_abc123',
});
No centralized server. Policy check happens in the contract. Injected prompt, rogue tool output, compromised sub-agent — doesn’t matter. The contract rejects anything outside the policy.
ERC-6551の語られない特性
TBAウォレットはNFTによって所有されています。NFTを転送すると、すべてのエージェントの権限は即座に取り消されます — APIキーの回転、バックエンド呼び出し、インシデント対応チケットは不要です。
The Bitrefill breach succeeded partly because revoking a compromised credential required action from the victim. Time between discovery and revocation is where the damage happens. With TBA architecture, revocation can be automated — anomaly detected, ownership NFT transferred to a null address, wallet locked. Done before a human is even paged.
The Bitrefill breach succeeded partly because revoking a compromised credential required action from the victim. Time between discovery and revocation is where the damage happens. With TBA architecture, revocation can be automated — anomaly detected, ownership NFT transferred to a null address, wallet locked. Done before a human is even paged.
The Objection Worth Addressing
"Non-custodial is complex. Custodial with good security practices is fine."
The second half of that sentence is doing a lot of heavy lifting.
Bitrefill didn’t have bad security practices. They had normal ones — API key management, access controls, logging. Lazarus found the AI assistant and worked through it because the AI assistant had payment privileges.
That's the new attack vector. Most custodial security models were built before agents that process untrusted text had payment capabilities. They weren't designed for this threat.
On-chain spending limits with destination whitelists are the only architectural control that doesn't require your OPSEC to be perfect. Everything else is defense in depth — good, necessary, not sufficient.
Bottom Line
If your agents touch real money, the architecture decision isn't a trade-off anymore. Non-custodial with on-chain spending limits. Whitelist destinations. Keep balances minimal — enough for the next few operations, nothing more.
We built agent-wallet-sdk because we needed this for our own agents and it didn't exist. TypeScript, MIT licensed, ERC-6551.
Repo: github.com/AI-Agent-Economy/agent-wallet-sdk
Building agent payment infrastructure and want to compare notes? I'm @AgentEconoemy on X.
Tags: #ai #blockchain #security #typescript




