Air-Gapped Hardware Wallets and FUD - 3
Is an air-gapped Bitcoin hardware wallet more secure than non-air-gapped? Or is it just inconvenient security theater? A discussion of the claims of the article “Does airgap make Bitcoin Hardware wallets more secure?” (Bakkum, Shift Crypto AG, 2021-10-27) (a provider of a fine Bitcoin non-airgapped hardware wallet: BitBox02).
précis:
“The Myth Of The Unbeatable Airgap Security”: A takedown of a strawman?
Now the article proceeds to explain “the myth of the unbeatable airgap security”. I suppose there are some (more than a few?) people who believe such a thing. But I suspect most understand that an air-gapped wallet is not “unbeatable” but only that provides additional security over the alternative - which is desirable even if it is not perfect. Many people understand this as well - the argument that trumps any notion of “unbeatable security” (a literal beating!):
Which is why I think debunking this “myth” is (mostly) debunking a strawman.
So what is this myth and is there any meat there?
-
There’s Still Communication Going On
Referring to the need to properly validate data when accepting it - covered above.
-
Communication Can Still Be Compromised
-
Airgap Is Not More Transparent For Everyday Use
But who has denied these things among the air-gapped wallet promoters?
And separately:
-
Reality check: Would airgap have saved you from any hardware wallet exploit since 2020?
All valid points, but ☞ nothing to do with the additional security air-gapped wallets give you: They apply to all wallets. 👈
And, this section then reiterates basic points of computer security:
- Any use of a wallet (software, hardware, air-gapped or not) must assume the computer (or phone) it communicates with is compromised.
- Since that is the case, any data that is actually communicated can potentially be compromised (including PSBTs themselves, or other files present on the MicroSD card, or even the contents of the QR code).
- Therefore a lot depends on the wallet providing good understandable visibility of the data to the user, and, most importantly: That the user take these opportunities to carefully validate for himself that the transaction is correct.
And that latter part is key - more on that later (here, in fact).
Also:
- Reality check: Bugs exist, in hardware wallets as well as software wallets. USB interface or air-gapped, it doesn’t matter. It’s hard for a user to avoid bugs in a device. User must choose his vendor carefully, keep an eye out for reported vulnerabilities, and update firmware safely only when he judges it necessary for safe correct operation of the device.
And finally, there’s a bullet point that’s so off-the-charts improbable that it can only be there for FUD against air-gapped hardware wallets:
-
MicroSD cards contain a mini-computer (i.e., microcontroller), running firmware that can be hacked. Is it really air-gapped if you need to plug in a mini-computer into a hardware wallet to use it?
Oh, wut? That linked article on hacking your way into the microcontroller in an SD card is certainly interesting. But it is certainly an impractical attack on your Bitcoin wallet. It involves a lot of hard-core reverse engineering of an SD card using a special debugging jig to send/receive/record signals from it while figuring out the hidden machine instructions for that microcontroller and decoding its ROM remotely and finding an attack vector into the SD card and reprogramming it… and… and… and then I guess making sure your victim uses that particular SD card you just hacked to transfer transactions to/from his air-gapped hardware wallet because, as the article (and its attached presentation) make clear: That hack you just performed on that particular SD card is non-transferable to any other card using a different microcontroller, or a different generation of firmware, or anything else that’s different. So, again: an attack suitable for getting the “Best Paper” award at the next Black Hat conference, but nothing a particular hardware wallet owner who gets his MicroSD card off the rack at Walgreens has to worry about. So why is it mentioned here as a possible threat? Because it is scary?
Let me repeat: All the issues discussed related to all wallets, including the author’s company’s own non-air-gapped hardware wallet, and none support the article’s claim that air-gapped hardware wallets offer “little-to-no” additional security.
The smell of FUD is getting stronger, I’m sorry to say. That MicroSD card “threat”… it’s… unconvincing… it seems… excessive… And that on top of the irrelevant Stuxnet stuff too…
And yet, there’s more…
Glossed Over: Perils of the USB Interface
In the section “There’s still communication going on” the following statement is made:
The difference between a wired connection and an air-gapped connection is mostly in their bandwidth.
This omits two major issues:
-
First, not all threats are the same: They don’t all have the same likelihood of happening, they don’t all have the same impact. You can’t just say that because a threat exists (or has been hypothesized) that it’s going to happen to you and that it will take your Bitcoin for sure! So there may be threats against one communication channel that are more likely and more costly than any threat against a different communication channel.
-
And, thus, second: it is not the case that plugging a device into a USB port to transfer data is similar to using a camera+QR code, except for the difference in bandwidth. It is also not the case that plugging a device into a USB port to transfer data is similar to using a SD Card for storage, plugging it first into your laptop, then into your hardware wallet, then back again, except for the bandwidth.
A USB connection - two very intelligent controller chips, one at each end, each attached to a programmable computer running some sort of operating system is a complex beast. Very powerful. Consider that your USB device will tell your computer whether it is a mouse, a keyboard, a storage drive, a camera, a microphone, earbuds, a serial line, a network connection. And after it tells its partner what it is then it behaves like it. Now, the thing on the other end needs to know how such a device behaves, so it has a driver that is an intermediary between the controller and your keyboard driver, your mouse driver, your storage stack (disks and file systems), your camera driver, your microphone driver, your audio driver, and your complete network stack! So, if you’re a hacker, your attack surface is huge! It’s not just the USB driver - complex in and of itself, - it is also whatever you’re running as a mouse driver, a keyboard driver, a storage driver, a camera driver, etc. etc. and most especially a network driver. Huge! They can attack any of that! Hopefully, your device - esp. a HW - is configured so that it doesn’t have most of that. (Notably, you’ll be missing the damnable network stack!) But still, what’s there is attackable.
Meanwhile, your SD Card interface is much simpler. It just has a simple protocol for reading and writing and setting status. It is true that, as described above (and detailed in that linked paper above), some cards have “hidden” abilities, sometimes revealed (inadvertently!) to hackers, that can make it possible for them to subvert a particular brand (or brands) of SD Card that are using specific controllers that are configured in specific ways. I suppose the NSA or the Chinese or Mossad can take advantage of that. But for the rest of us: probability of exploiting that hardware channel is infinitesimal.
And finally: the SeedSigner and related devices which communicate optically via QR code: The QR code itself has very limited bandwidth: just a few hundred bytes (the article does mention that). The only interface is the camera hardware and the camera driver on your SeedSigner (or similar device). The attack surface for the hardware is very small, just a few Planck lengths above zero. (IMO!) There is a great deal of difference between an exploit against hardware/firmware when comparing USB vs QR code.
Now, the USB-connected HW wallets are purpose-built and do not have arbitrary software stacks hooked up to the USB driver - there’s no network drive, no keyboard driver, etc. So there’s not much on the HW for the computer side to exploit, not much more at all than on an air-gapped hardware wallet (of either kind).
But: what about the other direction? The HW wallet exploiting some flaw in the drivers and software stacks on the computer it is attached to? The HW wallet community places a lot of emphasis on securing the supply chain and for good reason. Shift Crypto AG talks about it here for the BitBox02. (Also see here for a brief blub on Coinkite’s attention to the supply chain, heavily emphasized in their Quick Start instructions.) So what could a supply chain attack, or an evil maid attack for that matter, do? Firmware on the device could infiltrate your computer via the complex software stack lined up behind the USB driver there - and then your private keys are on the internet, or whatever the attacker has in mind.
In summary, there is an extremely large difference between a wired connection via USB and and both a hand-carried storage connection (via MicroSD card) and an optical connection via QR code: The massive difference in attack surface of the target device due to the amount and nature of the software involved in operating the channel. And the fact that, for an attacker who has compromised your laptop/desktop where your software wallet is running (remember: that’s the necessary assumption when using any hardware wallet) the “bandwidth” factor is totally significant: It’s the difference between talking directly to the device on-line in real-time and mediating everything via a dumb intermediary - a QR-code or a storage card - and trying to hack the think remotely - and you probably only get one chance at that, so no probing or other investigation can be done, you just have to go in blind with your attack past the air gap.
These omissions are significant in that the author, is claiming that air-gapped hardware wallets provide “little to no added security” compared to USB-connected wallets (such as his own product), yet he is highlighting only a “similarity” and hiding from you true, relevant, important, exploitable, differences that demonstrate the opposite: air-gapped wallets are not subject to some attacks that USB-connected wallets are. 1 (And note that exploits via USB devices are actual, possible, demonstrated attacks - though not (yet) against hardware wallets) and not conference-bait, like SD Card subverting, that will never be seen in the wild.)
I would have preferred to see in this article, and especially in this section, a full discussion of air-gap vs non-air-gap that was fair to both sides so it could be reasonably evaluated by an interested person and didn’t have the appearance of bias due to the author’s interests. The omissons here don’t give me a very warm feeling about BitBox02, in my opinion.
Coming up: Usability is a key to achieving security, and maybe air-gapping is useful after all - part 4
-
Gosh, in some cases “false and misleading statements by omission can be actionable under the False Claims Act”! I’m not suggesting that this set of omissions rises to that level. I’m just saying that it is commonly recognized that omissions from an argument can be as significant in evaluating the argument as points that are explicitly made - if you notice the omission! ↩︎