bitbouillion (OP)
|
|
April 12, 2015, 10:19:37 PM Last edit: April 13, 2015, 05:32:14 AM by bitbouillion |
|
http://johoe.mooo.com/trezor-power-analysis/Paper claims that private keys from a TREZOR device could be extracted via a side channel attack, but newer firmware fixes the vulnerability.
|
|
|
|
criptix
Legendary
Offline
Activity: 2464
Merit: 1145
|
|
April 12, 2015, 10:48:17 PM |
|
nice link and good read thanks. so every trezor user shoulda update their firmware asap
|
|
|
|
doof
|
|
April 13, 2015, 05:06:48 AM |
|
Good read, great to see security research in this space. Hope you get a tip!
|
|
|
|
Fabrizio89
|
|
April 13, 2015, 05:10:41 AM |
|
Wow, that was some crazy shit
|
|
|
|
innocent93
Legendary
Offline
Activity: 896
Merit: 1000
|
|
April 13, 2015, 06:20:19 PM |
|
Wow that is a creative attack!
|
|
|
|
coinfusion
|
|
April 15, 2015, 05:01:16 AM |
|
Going by the pulse widths, it seems like a few cents worth of power filtering caps in the device would have prevented seeing anything exciting on the USB port. He mentioned removing the screen as well to clean up the signal, so I guess the device isn't even tamper-resistant? It doesn't seem to be going by the Trezor website. Too bad everything has to be made as cheaply as possible.
|
|
|
|
Hawkix
|
|
April 15, 2015, 06:22:35 AM |
|
Adding caps will not stop anyone to measure directly at the processor pins. And the device is tamper-evident, not resistant. Nothing is. The goal is to slower and make attack more expensive.
|
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4200
Merit: 8443
|
|
April 15, 2015, 11:53:55 AM |
|
Going by the pulse widths, it seems like a few cents worth of power filtering caps in the device would have prevented seeing anything exciting on the USB port. He mentioned removing the screen as well to clean up the signal, so I guess the device isn't even tamper-resistant? It doesn't seem to be going by the Trezor website. Too bad everything has to be made as cheaply as possible.
It isn't connecting to the jtag is easier than the power analysis. But-- not quite the same, it's conceivable that a sufficiently creative attacker could do basically the same power analysis attack just by recording EMI picked up by the soundcard in the computer or via RF emissions from the device. (It's apparently quite easy to pick up noise from the trezor from across the screen with a radio receiver). People who've tried this have been frustrated by the extreme amount of noise put off by the screen and power regulators, but sufficiently advanced DSP may overcome it.
|
|
|
|
coinfusion
|
|
April 16, 2015, 02:24:56 AM |
|
Adding caps will not stop anyone to measure directly at the processor pins. And the device is tamper-evident, not resistant. Nothing is. The goal is to slower and make attack more expensive.
That's true, 'swhy I specified power only at the USB port. It would allow the tamper-evident feature to do its job, as only needing non-invasive monitoring would let someone try without being noticed. It really only needs to withstand attack long enough for its owner to notice it missing. .... it's conceivable that a sufficiently creative attacker could do basically the same power analysis attack just by recording EMI picked up by the soundcard in the computer or via RF emissions from the device. (It's apparently quite easy to pick up noise from the trezor from across the screen with a radio receiver). People who've tried this have been frustrated by the extreme amount of noise put off by the screen and power regulators, but sufficiently advanced DSP may overcome it.
Hmm, I wonder if it's FCC class B certified. Seems unlikely if it's throwing out a noticeable amount of RFI, so maybe using more elaborate shielding and coupling to the detector would help passive monitoring succeed. Might try placing it near a machine with an old taiwanese ISA-bus soundblaster clone in it; those were great at picking up noise!
|
|
|
|
jl2012
Legendary
Offline
Activity: 1792
Merit: 1097
|
|
April 16, 2015, 06:27:47 PM |
|
I always feel uneasy to connect a device with private key directly to an untrusted online computer I hope something like a audio modem could be implemented but seems it's too slow to be practically used? https://bitcointalk.org/index.php?topic=135423.0
|
Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY) LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC) PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
|
|
|
coinfusion
|
|
April 17, 2015, 01:47:42 AM |
|
It took me a while to realize that gmaxwell was talking about secretly recording the audio interference from a nearby compromized computer which would then be retrieved and decoded by the attacker at a later time.
|
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4200
Merit: 8443
|
|
April 17, 2015, 11:16:15 AM |
|
It took me a while to realize that gmaxwell was talking about secretly recording the audio interference from a nearby compromized computer which would then be retrieved and decoded by the attacker at a later time.
Actually, from the computer the Trezor is connected to itself (after all, the point of the Tezor is the assumption the host computer is compromised); nearby would be an even more impressive stunt-- in terms of nearby but not connected; that would better be done with a software defined radio receiver (e.g. not merely a remote compromise). All of that is a long shot, but thats the annoyance about defense; you have to defend against all attackers, and an attacker may spend a lot of time and resources on a single valuable target. It's quite hard to be confident that you do not have an exploitable weakness. If you're sure you're secure you're probably not being creative enough.
|
|
|
|
Darkblock
Full Member
Offline
Activity: 124
Merit: 100
photo taken by ESSA-7 satelite. 1968
|
|
April 17, 2015, 01:12:58 PM |
|
It took me a while to realize that gmaxwell was talking about secretly recording the audio interference from a nearby compromized computer which would then be retrieved and decoded by the attacker at a later time.
Actually, from the computer the Trezor is connected to itself (after all, the point of the Tezor is the assumption the host computer is compromised); nearby would be an even more impressive stunt-- in terms of nearby but not connected; that would better be done with a software defined radio receiver (e.g. not merely a remote compromise). All of that is a long shot, but thats the annoyance about defense; you have to defend against all attackers, and an attacker may spend a lot of time and resources on a single valuable target. It's quite hard to be confident that you do not have an exploitable weakness. If you're sure you're secure you're probably not being creative enough. wooow. crazy shit. reminds me of the hollywood movie "eagle eye". But not long ago i ve read an article about some scientists from Tel Aviv University who were able to extract RSA keys from the "noise" of a CPU!!! So the above scenario, where a nearby computer "attacks" a victim within his noise-recognition area by "listening to its processor", should be practically possible. maybe we should start adding noise protection measures to our computers and trezors... LOL
|
|
|
|
bigbitmine
Full Member
Offline
Activity: 196
Merit: 100
Big Bit Mine
|
|
April 17, 2015, 01:18:48 PM |
|
You never break into my Trezor collection.
|
|
|
|
Blazr
|
|
April 17, 2015, 01:21:33 PM |
|
This is why I always advise people to wait a few more years before using hardware wallets to store significant amounts of Bitcoin. They are too new, untested and unstudied and due to this they may have undiscovered flaws like this, in fact my opinion is that there are many other side-channel attacks similar to this, however in a few years once they have been better studied, tested and improved and we fully understand all the security concerns involved then hardware wallets will really shine.
|
|
|
|
user2020
Newbie
Offline
Activity: 7
Merit: 0
|
|
April 19, 2015, 08:36:43 PM |
|
This is why I always advise people to wait a few more years before using hardware wallets to store significant amounts of Bitcoin. They are too new, untested and unstudied and due to this they may have undiscovered flaws like this, in fact my opinion is that there are many other side-channel attacks similar to this, however in a few years once they have been better studied, tested and improved and we fully understand all the security concerns involved then hardware wallets will really shine.
Did you saw this? http://www.eliptibox.com/#!The-perfect-hardware-part-1-REDBLACK/cw4e/54fdf26b0cf24585978defdb Looks that it is claims to be protected against all of these attucks
|
|
|
|
medUSA
Legendary
Offline
Activity: 952
Merit: 1003
--Signature Designs-- http://bit.ly/1Pjbx77
|
|
April 19, 2015, 09:08:18 PM |
|
A good read. Demonstrates how a chain is only as strong as its weakest link. This attack is so easy for someone who knows the stuff. 512bit key generation defeated by a current meter.
|
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4200
Merit: 8443
|
|
April 19, 2015, 09:09:46 PM Last edit: April 19, 2015, 09:47:30 PM by gmaxwell |
|
Looks that it is claims to be protected against all of these attucks
Unlikely. Power filtering cannot help you when the leak is so gross that it makes timing differences you could darn near measure with a stopwatch. Though the device looks pretty interesting and would be good for applications where the software is already largely protected! But the invest page makes it severely smell like a scam.
|
|
|
|
bitbouillion (OP)
|
|
April 20, 2015, 12:42:12 AM |
|
Looks that it is claims to be protected against all of these attucks
Unlikely. Power filtering cannot help you when the leak is so gross that it makes timing differences you could darn near measure with a stopwatch. In the article they also write about emission from signal lines. Electronic designers have been working for decades on such problems to avoid interference with other devices and to satisfy regulatory requirements. Simple layout changes of the PCB can achieve this at marginal cost. On the other hand electromagnetic emissions can't be completely avoided and an attacker can use more sophisticated measurement and analysis methods, but a good PCB design can drive the costs for such an attack significantly up. Therefore EMI-engineering should be mandatory for the development of security hardware.
|
|
|
|
johoe
|
|
April 23, 2015, 10:35:49 AM Last edit: April 23, 2015, 10:58:57 AM by johoe |
|
Going by the pulse widths, it seems like a few cents worth of power filtering caps in the device would have prevented seeing anything exciting on the USB port.
The TREZOR definitely has some filtering caps; Beyond 10 kHz I can see no signal. The main problem was that the bn_inverse function is noisy (several branches) and quite slow in executing (it does a thousand additions of 256 bit numbers). One could filter these out with larger caps but it probably was never a design requirement to put the largest cap that would fit inside the casing of the TREZOR. And of course you can always break it open. The problem with the noisy bn_inverse function has been fixed (now, it is only used once on the z coordinate of the public key, which is even randomized). My next project is analysing the Ledger. This has no filtering caps worth mentioning. It is just the secure element with a USB connector. The oscilloscope shows much more details. However, some of it is noise the device is producing deliberately to make these kinds of analysis more difficulty. It also randomizes the timing. I will probably report more of this, once the analysis is finished. Still, even with the secure elements, you can see a lot of details of the executed code on the power line. The producers of the Ledger are aware of this and use constant time code to compute the public from the private key. We will see, whether they did this right.
|
Donations to 1CF62UFWXiKqFUmgQMUby9DpEW5LXjypU3
|
|
|
|