"無敵のエアギャップセキュリティ"の神話

"無敵のエアギャップセキュリティ"の神話

2つのデバイスの間に物理的な接続がないことで、接続が「安全」であると認識しやすくなるエアギャップ。逆に、ハードウェアウォレットをコンピュータに差し込むと安全とは感じられないかもしれません。しかしこれには現実とのギャップがあり、誤った安心感を与える可能性があります

ここでは、AirGapが実際にはセキュリティにあまり効果がない主な理由を紹介し、Trezorなど差込式モデルのファームウェアの安全性についても言及します。

1.通信は行われている

物理的な接続がなくても、ウォレットとコンピュータは情報をやり取りしています。有線接続とエアギャップ接続の違いは、その帯域幅にあります。依然としてQRコードやその他のデータは潜在的に悪意のあるものである可能性があり、ハードウェアウォレットが受信するすべてのデータを徹底的に検査し"無効化"することは、ハードウェアウォレットの責任であることに変わりはありません。

2. 通信が遮断される可能性がある

攻撃者は受信を変更したり、アドレスを変更したり、マルチシグネチャーのセットアップで共同署名者を入れ替えたりすることが可能です。この場合も、エアギャップそのものがそれを防ぐわけではありません。

QRコードは、カメラ画像やQRコードのレンダリングを制御する上流ライブラリ、カメラのファームウェア、ホスト上で動作するマルウェアによって導入されるバックドアなど、複数のレベルで悪意を持って改ざんされる可能性があります。

microSDカードの場合、他のプログラムによって、例えば、ユーザーが気づかないうちに、内容を監視したり、PSBTファイルを改ざんしたり、追加データを書き込んだりできる可能性があります。

3.エアギャップは人間にとって透明性が高くない

よく引き合いに出されるエアギャップウォレットのもう一つの期待は、デバイス間で共有されるデータが、USB接続の場合よりも透過的で検証可能であることです。

「より強固なセキュリティモデルにより、受信した情報を正確に把握することができます」--Foundation Devices社
「QRコード通信を利用することで、マルウェア侵入のリスクを排除し、BluetoothやUSBでは実現できない透明性を実現しました」。-- キーストーン
"コールドウォレットからのデータ転送にはQRコードのみを使用し、QRコード形式は管理され、検証可能で透明性があります。"-- Ellipal

1. PSBTファイルは、人間が読めないバイナリ形式で保存されています。それらを開いて中身を確認することはできません。唯一の方法は、それらをビットコインウォレットに読み込むことです。つまり、悪意のあるデータを無効化する責任があるのは、またしてもウォレットなのです。

2. QRコードでは、同じ情報を視覚的に表現することができます。1つのQRコードでは取引が大きすぎるため、アニメーションのコードが使用されます。この場合も、人間が読み取れる情報ではないため、データを確認するために別のウォレットが必要です。

その他考慮すべき点

MicroSDカードには、ハッキング可能なファームウェアを実行するミニコンピュータ(マイクロコントローラ)含むことができます。もし、ハードウェアウォレットを使うために、ミニコンピュータを接続する必要があるなら、それは本当にエアギャップでしょうか?

これは、USBのソフトウェアドライバーだけでなく、microSDカードリーダーや組み込みカメラのソフトウェアドライバーにも当てはまります。アプリ内のQRコードやテキストを閲覧するショルダーサーフィンや監視カメラは、プライバシーに影響を及ぼします。

実際のところ:AirGapは2020年以降のハードウェアウォレットの悪用からあなたを救ってくれたでしょうか?

ここでは、ビットコイン関連に範囲を限定して、2020年に入ってから判明しているすべての脆弱性を検証してみましょう。これらの脆弱性はすべて、デバイスがエアギャップされているかどうかに関係なく動作することが可能です。

  • Supply chain vulnerability with attacker-controlled firmware (Coldcard, 2020/03)Allows flashing malicious firmware and reset to a compromised “factory” stateFurther reading by reportervendorAirgap does not help: physical attack vector
  • OP_RETURN treated as change output (Trezor, 2020/03)Allows to skip user confirmation, could affect level 2 protocols (e.g. Omni layer)Further reading by vendorAirgap does not help: transaction validation issue
  • Malicious Change in Mixed Transactions (Trezor, 2020/03)Change could be sent to a 1of2 multisig address, partially controlled by an attackerFurther reading by reporter (Shift Crypto), second report (2020/03), vendorAirgap does not help: transaction validation issue
  • Insufficient field size check (Trezor, 2020/03)Transaction containing a `prevhash` exceeding the expected 32 bytes could contain a hidden output sending funds to attackerFurther reading by vendorAirgap does not help: transaction validation issue
  • Inconsistent sanitization of transaction inputs (Trezor, 2020/03)Transaction with single-sig input and a 1of2 multi-sig output (partially controlled by an attacker) would be accepted without the appropriate user verification.Further reading by vendorAirgap does not help: transaction validation issue
  • Large Transaction fee via two Segwit transactions (all vendors, 2020/03)Malicious wallet could trick user into signing a Bitcoin transaction twice, e.g. by faking an error after first signing, asking the user to try again, and creating a transaction with a huge mining fee. Collaborating with a miner could allow access to these fees.Further reading by Shift CryptoLedgerTrezorCoinkiteAirgap does not help: general verification design issue of BIP-143
  • JTAG/SWD enabled on unsecured processor (Ledger, 2020/06)The Ledger Nano X MCU had its debug interfaces enabled. This could effectively allow a supply chain attack, but not access to internal secrets.Further reading by reportervendorAirgap does not help: physical attack vector
  • Bitcoin derived fork/altcoins cross-account signing (Ledger / Trezor / Keepkey, 2020/08)User can be tricked into signing a Bitcoin transaction while the device shows testnet or altcoin details on screen.Further reading by reporterLedgerTrezorAirgap does not help: transaction validation issue
  • Bitcoin mainnet/testnet cross-account signing (Coldcard, 2020/08)User can be tricked into signing a Bitcoin mainnet transaction while the device shows testnet details on screen.Further reading by reporter (Shift Crypto), vendorAirgap does not help: transaction validation issue
  • Ransom attack on passphrase handling (Trezor/Keepkey, 2020/08)A wallet created with a passphrase on the host computer allows malware to use a different passphrase on the hardware wallet and hold all future funds ransom.Further reading by reporter (Shift Crypto), vendorAirgap does not help: passphrase must be entered or verified directly on device regardless of communication channel
  • Remote multisig theft attack (Coldcard, 2020/11)The device did not check if it was part of a newly created multisig wallet, allowing an attacker to trick the user to create an attacker-controlled multisig wallet.Further reading by reporter (Shift Crypto), vendorThis is a general wallet verification issue when receiving malicious data from an external coordinator or a 3rd party participant:-  This vulnerability can be mitigated if the multisig wallet is set up fully by yourself, simply by passing a microSD card from hardware wallet to hardware wallet. This also holds true if the devices communicate with each other via QR codes or USB (although nobody implemented this yet).-  Airgap does not help if the multisig wallet is set up with an external coordinator or with a different (malicious) person serving as a co-signer, even if the device is fully air-gapped.
  • Length-extension attack on SCP (Ledger, 2021/05)Allows an attacker to decrypt a block of application data and firmware updates, without any security impact (data is not secret and is publicly available).Further reading by vendorAirgap does not help: data can be read anywhere when downloading new firmware

結局、私たちが心配していること

エアギャップでも、差込式のハードウェアウォレットでも、最終的に私たちが心配になるのはファームウェアの安全性です。

Trezorの例では

2018年2月、独立系セキュリティ研究者でTREZORコントリビューターのSaleem Rashid氏が、TREZOR Oneが使用しているSTM32F205プロセッサのメモリ書き込み保護操作にセキュリティ脆弱性を発見し、当社の責任ある開示プログラムを通じて問題を開示しました。リンク

つまり、ウォレットの書き込み不可領域を上書きされてしまう可能性があったということです。

ここでも説明されているように、基本的にTrezorのファームウェアは、読み取り専用の領域にあるプログラム(ブートローダ)よってSatoshiLabsの署名があるかどうかが確認され、そうでなければファームウェアはインストールされませんでした。

しかし、2018年の時点で使われているチップSTM32F205には、そのブートローダを読み取り専用にするためのライトプロテクションを事実上無効化する欠陥があり、これに対応するためTrezorの開発者はファームウェアと端末のブートローダ(起動時にウォレット内部の動作を導く領域)をアップデートしました。更新されたファームウェアは、デバイス内のブートローダが本物であるかどうかを確認し、そのブートローダによってファームウェアの署名をチェックするようになりました。

これ以来、Trezorにおいて悪意あるファームウェアのダウンロードを許したりブートローダを上書きされるリスクはなくなりました。

悪意のあるファームウェアがフィッシングサイトからダウンロードされる危険はない

上記のプロセスを経たことにより、悪意あるファームウェアがダウンロードされる可能性はほとんどなくなりました。もちろんこれは、公式のファームウェア自体に意図せぬ脆弱性がないということを意味しませんが、それでも無意味に差込式のハードウェアウォレットに過剰な不安を抱く必要はないことがわかります。

Trezorの内部領域は、そもそも特定の形式の入力しか受け付けておらず、そうでない命令については無視します。この意味において、必ずしもエアギャップよりもセキュリティが劣るとは言えないのです。ファームウェアさえ安全に機能しているなら安心して使うべきであり、そうでないなら、エアギャップのファームウェア自体を自分で確認するまで安心するべきではないのです。

  • "ファームウェアが本物かどうか"を疑う必要はないこと
  • Bitcoin-onlyのファームウェアであれば、更新による脆弱性の増加は防げること

この二つは覚えておいて損はないと言えるでしょう。

もちろんエアギャップには接続式にはない多くの安全上のメリットがあります。しかし少なくとも、"エアギャップだから安心"という主張は、セールスとしての側面を持っているということを忘れないでください。

それでは、楽しいBitcoinライフを。

参考記事: Does airgap make Bitcoin hardware wallets more secure?(要約・省略あり) 

この続き : 0字 / 画像 0枚
500

会員登録 / ログインして続きを読む

関連記事

記事を書いた人

SNSにシェア

このクリエイターの人気記事

【Nostr】GitHubPagesで覚えやすい認証マークをつけちゃおう【最短5分】

172