I'm Building a Self-Destructing USB Drive Part 2(interruptlabs.ca) |
I'm Building a Self-Destructing USB Drive Part 2(interruptlabs.ca) |
But really, apart from the novelty, why attempt to destroy the chip in the first place? Encrypt the bulk flash memory, store the key in supercap backed SRAM, and then zero out and short the RAM when triggered. Then you'd have a reusable device in case of inadvertent triggering. You could even load it with a key from a trusted host computer (stored on the computer or derived from passphrase), gain safety for transporting your files while walking around and plugging in to less trusted computers), and then if you did accidentally trigger the device, simply reload the key afterwards when you got back to the trusted computer and not have to rewrite the flash. The utility of such reloading functionality would depend on your threat model, but could be very useful for a lot of people. Perhaps border crossings.
Since we're on the topic of bespoke crypto ideas, I've often mused about the possibility of a probabilistic KDF that would take a lengthy amount of time to derive the key, and/or be resilient to typos in the passphrase. Rather than doing a fixed number of rounds that take a few seconds to derive the key xor failure, there would be additional random bits that had to be derived via hash collision finding, stretching out the time. Such a thing could be resistant to typos or omissions of words in the passphrase, with the result that such errors would increase the time even more. Thus, until the KDF reported success, an attacker would not know whether you gave them the correct passphrase and they just need more time, or whether you were stalling.
The encryption idea makes way more sense, and the means to short out the cap doesn't even require the device to be powered. The only implementation challenge is that now instead of combining a simple circuit with an off-the-shelf mass storage controller, you need to either find one that can read a key from an external source or roll your own using a micro (maybe this is easy with existing libraries?). But if I was a journalist concerned about such things I'd rather pay a premium for the right solution than worry that the police might be sweating from the heat or that the chip in my drive happened to be especially resilient to overvoltage.
After being inserted in, the drive was dead on USB2. On USB3 it would work for a few minutes at a time. This became relevant when I discovered the drive still worked in that few-minutes-at-a-time fashion in 2021 and contained my old wallet with 30,000 Dogecoin on it.
Yeah, this is a really weird and unreliable method for killing the flash. I would be more inclined to go the route of super high voltage.
> Encrypt the bulk flash memory, store the key in supercap backed SRAM, and then zero out and short the RAM when triggered.
Probably the easiest method for sure is a decryption key. Older style flash could also be erased using UV, but it seems like this is now not the case.
I'm not entirely sure about using moisture as a method for ensuring the USB device is interacted with in a certain way. I would probably consider some other options:
* A few holes with light sensors that check for a binary code as the stick is inserted.
* A covert fingerprint sensor.
* DIP switches that are somewhat hidden. Perhaps on first entry an LED flashes, and you must set the switches in response to the sequence. In this case somebody could watch you do it and still not understand what they must do.
* Perhaps even something as simple as unplugging it and plugging it in several times.
All of these seem somewhat more reliable that the resistance you happen to create when licking you fingers, and are harder to replicate.
As you say, having it so that just the encryption code is lost means that you could recover the device by loading in the correct key again.
Since the AVR core has zero support for floats, that will mean it's all software emulation, bloating the code fantastically. I guess (and understand) it doesn't matter as long as the application fits and does what it's supposed to do, it was just ... extremely jarring.
This, for example:
void set_pwm(float voltage) {
OCR1A = ( voltage / 5 )* 0x400;
}
The above generates 100+ instructions, without inlining the floating-point operations that are left as library calls (see [1] for a Compiler Explorer view).Normally you'd expect code like that to use 8-bit variables wherever possible, and perhaps stretching to 16-bit numbers when more range is needed such as when computing the above PWM value.
With the Big Red Switch that throws sparks and emits smoke, the adversary may still inflict punishment on you, but they have no illusions that they can torture you into revealing "the secret way to access it".
Accelerometers are widely used by smartphones so I assume that the ICs are common and inexpensive (at least if bought in volume). A tiny battery would be needed as well.
Carrying the idea even further, maybe you could even do key entry this way. Imagine that the USB device stores encrypted data and you enter a short decryption key by tapping out a particular bit of music before plugging it in.
To get even fancier, maybe you can enter a hexadecimal key (0123456789ABCDEF) through various motions. For example, spinning the USB clockwise on your desk is a 0, flipping it from horizontal to vertical is a 1, waving it through a figure eight loop is an 8, rolling it along the long axis is a B, etc.
But I'd expect this to just burn out the flash chip's control logic, the stored data itself should stay intact. Someone determined enough could decap the chip and surgically wire in replacements for any burned-out parts.
I think it's a good balance if you have a believable excuse why you're carrying a dead USB stick, and aren't on the list of public enemies. It's a lot simpler than trying to melt the flash with thermite or something like that. But I wonder if there would be a reasonable way to run an erase cycle first.
If you do this as part of a legal search and they catch on you're now in a lot more trouble and you've caught their attention.
That way you aren't doing anything, it's their act of arresting you or sneezing your device that causes the destruction. If they want to keep the evidence they have no choice but to keep the device in your possession.
If you have to worry about an adversary who would torture you, then I'd guess that convincing them that you just intentionally destroyed the info... is only going to make them torture/kill you punitively.
When the cops plug in the drive, they see the content you want them to see. And there are no hidden partitions or anything: your uC passes through all signals to a complete storage device. They can examine the partitions at the block level, and all that; nothing is hidden.
You have some mechanism to instruct the uC to switch different storage device (which, of course, is encrypted so that it's protected should it be discovered).
Washing hands, sweating, condensation from beverages, etc. could easily trigger this.
This could be implemented by writing a timestamp file on wakeup.
You’d need to embed a clock and an energy source to keep the clock going.
Unless of course you are a big company, in which case that seems to be the expectation.
So the real advice here is just to be a very important person.
If the law forcefully and physically separates the device from me, the device self-destructs of its own design. The law enforcers would be the ones at fault for destroying the evidence.
How is that not what's being described here? The dead-man switch signal is to moisten your fingers before plugging it in.