130 comments

[ 0.66 ms ] story [ 30.5 ms ] thread
Man, I wish there were some pictures. I didn’t even know that there are LTE modems that small.
There are pictures online. And for an unexplainable reason it is the person behind the biggest Bitcoin exchange SNAFU of all times (where hackers stole something like 800 000 Bitcoins), Mark Karpeles of "Mt. Gox" (who did jail time btw), who was the first to post them:

Apparently the hacker did remove the battery and replace it with a smaller one, leaving enough room for the tiny eSIM/LTE modem / OCR chip that did recognition of the secret on screen.

What incredible engineering
(comment deleted)
It's a great hack. I wonder why they didn't just spin a new board and transplant the secure-enclave chip to it.

I guess the sweatshop workers would then need to be trained in reballing BGAs if they did that.

I want to read that but my slop detector went off. Instant disinterest.

Give me a shitty html4 page with the text ffs.

It's definitely AI-written, annoying as fuck god damn it, but the photos are good and the descriptions of the boards, are at least at cursory glance, pretty accurate.

tl;dr Implant is just a little cell phone that does OCR of the hardware wallet's screen during setup to steal the recovery phrases. The implant's design has improved notably three different times before landing on a pretty darn sleek spot-welded overlay that is laminated flat onto the host.

Does it do OCR. The screen is very low res(128x64 monochrome iirc), so 2KB for entire buffer. I doubt there is OCR library that use less RAM than that. Better to just send the entire framebuffer and not have to worry about false negative.
Look at the size of the board in something like a late-model iPhone. The biggest part of a regular smartphone is the battery. The modem and RFIC along with supporting discretes are absolutely tiny. They've been making wrist-sized watch-phones for many years.

This was already the level of integration 13 years ago: https://www.bunniestudios.com/blog/the-12-gongkai-phone/

Observe how the SIM card socket is the biggest part on the board: http://bunniefoo.com/ntw/dozendp_8.png

I already commented the other day on this exploit but really it's fascinating.

I don't care about cryptocurrencies but I've always been fascinated by the cryptography behind it. I've also dabbled with hardware wallets for non-cryptocurrencies stuff: like U2F auth.

The idea of a master secret that is behind a secure element which I control and which I can duplicate is amazing to me (as opposed to, say, "your" passkeys which Google/Microsoft/Apple can basically backup and transfer to other devices for you).

But really to me in the cryptocurrencies world people have been sold the lie that a hardware wallet was secure: it's not. It could be tampered with (as happened in this hack, where an additional rogue chip reading the screen and then sending it using an eSIM steals the secret) but it can also contain a bug (like the recent Coldcard exploit where Coldcard hardware wallets fell back on a RNG with only 32 bits of entropy and some dark-hat hacker cracked those and stole Bitcoins) and, most of all, the vendor of the hardware wallet itself can do nasty attacks (like "kleptography").

From the very start everybody in the ecosystem should have pushed of "n-of-n" schemes (say even just 2-of-2), where one secret goes on a hardware wallet from one vendor and the other secret goes on a hardware wallet from another vendor.

For years and years the tune has been: "PCs cannot be trusted, use a hardware wallet" but it mislead people.

PCs indeed cannot be trusted but unsuspecting users should have learned how to use 2-of-2 or 3-of-3 schemes, to become immune from hacks affecting one hardware wallet vendor.

The typical, non-sensical, response to this is the idiotic: "but if you have two secrets, if you lose one of them you lose everything". It's totally idiotic for people basically save a list of 24 words (the "seed", which is the master secret). Well, guess what: instead of saving a list of 24 words, you save a list of 48 words. Exact same thing, just twice longer.

That's my take: the entire "your coins will be safe if you use a hardware wallet" was misguided.

You might be interested by the Tillltis TKey - it's an open-source open-hardware programmable-by-the-user secure element.
m-of-n provides increased security AND redundancy.

2-of-3 allows loss of one key, 3-of-5 allows loss of two keys, etc

The cost is increased complexity, but the alternative is potentially losing everything due to a single mistake. So far people seem to overweigh the complexity of multisig, and to overestimate their understanding of using a single signing device.

If you lie down with dogs, you will get up with fleas.

Dogs = cryptocurrencies. Fleas = scammed.

Yep. Crypto is more clever than I am—and there are scammers in the field equally so.

(My hardware wallet is made of pleather and holds paper bills.)

your fiat goes brrrrr
It's been going very well, yes thanks.

Much better than the average crypto gambler,

Garbage website that doesn't allow me to reject tracking cookies without paying.

> Data processing by advertising providers including personalised advertising with profiling

> Consent [required for free use]

Most websites do this, they just don't give you the option.
Just delete the cookies after if you absolutely must go to the site.
Here’s a new market for $500 Faraday Cages, if any HN readers are interested
The link you want:

https://grandideastudio.com/portfolio/security/ledger-hardwa...

They should have posted the weight with and without the device in it.

Also: never leave empty space in a hardware key, pot the whole thing in epoxy.

I heard they reduced the battery size to make space for their chip.
Yes, hence the potting. You'd have to figure out a way to open the device without breaking it.
When there are millions of dollars to be stolen, someone can figure out how to remove the potting.

If need be, just grind and cut till you are back to the one silicon wafer that contains crypto keys, then rebuild the whole lot from scratch, add your evil parts, then re-pot it.

millions out of thousands of wallets. Epoxy potting raises the lottery ticket and odds of getting caught by a great deal.
This story is a case of someone tampering with devices in the supply chain, before the user first receives them.

What you’re describing is a different thing. It’s an “evil maid” attack. Also, it would be ultra difficult and expensive.

What you’re saying is possible. But:

It would probably be cheaper to build a total fake Ledger Wallet, then just replace the real wallet and deliver a fake with a weak entropy generator. Any case, that’s not what has happened this time.

The legit wallets have an online way to verify they are genuine by cryptographic means. A totally new fake couldn't do that.
Thanks. I believe you’re right a totally fake copy couldn’t verify. So my idea was wrong.
Ledger provides a 'Genuine Check' mechanism to determine the authenticity of the device; however, it explicitly warns that it cannot detect added implants when the device's original Secure Element remains intact.

And as this workaround leaves the original Secure Element intact, good luck detecting the supply chain attack.

I think that’s where the epoxy from earlier in this comment chain is supposed to come in.
Epoxy is useless, we have materials to dissolve cured epoxies for rework in aerospace.

Man can make it, man can break it.

But it's specifically a potting epoxy designed to cause damage to the electronics if removed. And any destruction of the epoxy has to not significantly affect the outward appearance of the device. At worst it's defense-in-depth.
That would work but the skill level required is orders of magnitude higher than what's on display here. I know all of the theory on that one but I would probably not be able to pull that off. The best I've done is to modify a potted chip by very careful thermal imaging to figure out where the part was that blocked the feature I wanted to unlock (market segmentation) and then drill through the case to a depth just higher than the chip. You'd have definitely been able to spot the difference. This was at the millimeter level. Recently there was a post about a group doing this at the chip level, which I thought was extremely impressive, and again, even with the recipe out there duplicating it would still be very hard.
> The best I've done is to modify a potted chip by very careful thermal imaging to figure out where the part was that blocked the feature I wanted to unlock (market segmentation) and then drill through the case to a depth just higher than the chip.

Sounds like a good approach when you only have a single (or just a few) of the devices so you need to be careful.

With hardware wallets (aka substantial incentive), then the attackers could order a bunch of them for sacrificial zero-ing in the exact places to drill with a CNC/microscope/etc.

> Sounds like a good approach when you only have a single (or just a few) of the devices so you need to be careful.

Yes, initially I had just the one. But once I had it figured out there were lots of other people that wanted their device 'improved' so that jig got used plenty of times. Even so working on other people's hardware always felt very scary, especially poking around with a drill in a sensitive piece of hardware. Even so, they all worked, it was a neat little trick.

Market segmentation?! What device is high quality enough to be potted but still has the same hardware modified by jumpers across models?
Not quite a jumper. CB transceiver.
Did you blog about it? That would be like catnip around here.
No, this was a couple of decades ago, I didn't have a blog back then and I have zero evidence. But I can tell you some of the details: the device was a Philips 'Marc' CB transceiver. They made only one model both for the US and the EU market so there were 22 channels available in the EU and 40 iirc in the United States. But the rotary channel selector did have all 40 positions. That made me wonder... what if? So I opened the device and there was this very large plastic blob in the middle of the circuit board with obviously a large (40 pin iirc) chip underneath it. I realized that if I tried to physically remove the blob that I would most likely break the chip so that wasn't going to work.

But it was clear what it did: as soon as the channel selector went to a forbidden channel the blob sprung into action to disable the chip underneath. I measured the effect on the pins underneath that were accessible from the other side of the board and noticed that a whole bunch of them got shorted to ground. That was the hint I needed. A friend ran a laser game company and they had a nice little IR camera with built in display, that was used for calibration of the IR beam collimators in the laser guns (the laser doesn't actually do any of the shooting, the thing is basically just a very powerful remote control with a lens that sends out a relatively narrow beam). I set it up above the the blob and set the channel selector to a good channel and let it warm up. Had a look with the camera. Then set the channel selector to a bad channel, let it warm up again and had another look with the camera. The difference was pretty obvious, there was a hotspot right in the middle of the blob. I marked the spot and made a drill jig, then it took me a few days to gather courage and stick the drill in, it worked on the first try. That gave 18 nearly empty channels to play with. Once I had it figured out the second one was a lot easier :)

It's stupidly easy to open the device. I opened mine last night with a knife and a hairdryer. I left no perceptible marks either. I watched a few videos where the device was opened without a hairdryer. Apparently, those who did the implant put more glue than Ledger itself.
Well, still a safer reason for clandestinely reducing the size of a battery in a mobile device many people carry around close to their body.
Interesting. Everyone that read the article also heard that.
Ah good one, more useful info in that one. That kapton circuit might be traceable to whoever ordered it.
This is May version. If you look at the twitter thread, the October version is different and looks much more "stock"
These teardowns of compromised Ledger wallets are frightening. Because the infiltration of hardware looks very pro

https://youtube.com/@MagicalTux

(Warning - MagicalTux is Tibanne or Mark Karpeles. He has a “complicated” legal history, but this looks legit)

Is that safe for devices containing a lithium battery?
Good question: the battery here doesn't look like it had any room for expansion so it wouldn't be worse per se. But normally you want a little bit of room around a battery, I guess a thin foam liner would allow for that and would still allow you to pot the whole thing.
Worst case, a bloating battery cracking open a plastic enclosure or being able to vent gas through the gaps in one would be preferable too, right?
Absolutely and it is why I hate these little pouch cells in wearables. Phones, headphones, in-ear pods, sports gear, toys (which kids take to bed), they're absolutely everywhere and if you look at the way they are usually mounted it is a small miracle there aren't more issues. Powerbanks in particular are a pretty serious hazard.
They could x-ray it, carve out epoxy with nothing inside, put the logger, apply epoxy.
Not that easy. The potting epoxies made for this purpose are nothing like your regular epoxies. They're pricey and when you try to break them you are very likely to tear the parts right off the board. This is the brand I have used in the past:

https://www.masterbond.com/techtips/tamper-resistant-potting...

The devices we made were put in places where there was a significant risk of tampering and to the best of my knowledge nobody ever managed to break the epoxy bond to the point that the circuit was still functional. But as I wrote above: not cheap.

Take off the case, put your own entire module in, put the case back in. Epoxy doesn't solve much.

...frankly, selling one as DIY kit have highest chance for tamper resistance. Tho pretty untenable with small SMD components sadly

No, this is May version. If you look at the twitter thread, the October version is different and looks much more "stock"

(sadly I have not found nice website with newer version photos yet)

Not your factory, distributor, warehouses, fulfillment centers and entire supply chain, not your coins.
Not mentioned in article: MediaMarkt, the German equivalent of Best Buy, was selling these compromised devices on store shelves in every city in Germany.
I wonder what the liabilities are for that
Not much unless you can show that they knew about it. Otherwise, they are just as much a victim.
They are liable. In Germany the seller of a product is responsible not the producer.
I'd assume a company like that would have insurance for this. They'd be able to reimburse the customer knowing they'd get paid back from an insurance claim. That is, if they are actually insured for these kinds of losses.

A few years ago, the Canon camera battery supply chain was intermingled with knock offs. The seller I bought from was exchanging for legit batteries or reimbursement when a customer made a claim.

Then they have to be insured. Or the limit of their liability must be capped at the cost of the product or something. Otherwise they would have to reverse engineer every product they carry and just about every retailer would run the risk of being out of business any time someone pulls something like this. That’s obviously not happening.
It's germany, everything is insured.

look up german angst

From what I've read the seller's responsibility is just to fix or replace the product. Damages caused by the defect are the manufacturer's responsibility.
Selling Ledger wallets or compromised Ledger wallets? My understanding was a reputable reseller (Cryptobilis) was bought and then the wallets were modified via the reseller chain. This isn’t on Ledger it’s a (literal) supply chain attack. Unless MediaMarkt was buying via the reseller?
> This isn’t on Ledger it’s a (literal) supply chain attack.

Supply chain attack?

"Can't do shit, not my problem."

If it was that easy to shed responsibility.

TBF that characterization was mine. It’s not been Ledger’s response AFAIK.
I don't know coin stuff, but if top comment's...

"We're talking here about a tiny eSIM implant and a little CPU doing OCR on the fonts appearing on the hardware wallet's screen to read the secrets during set up. So the secure element ain't tampered with."

...is accurate...it's one of the rare times I'd agree there's nothing they can do. And I was all prepared to storm in here saying "convenient excuse!"

>there's nothing they can do

The device should have bricked itself after someone opened it up to put hidden stuff inside. Also showing the key phrase to the user instead of keeping it secret to the secure element is a questionable decision.

people do need the option to repair devices, especially when they contain valuable information, so I don't see an automatic bricking to be a reasonable solution
I'd rather have to buy another wallet than have to worry that someone is able to drain it.
If you can't back up your keys, then what?
There's a medium. Something ironically close to apple's 'non fully approved and supply chained repair' thing (especially when we consider the case of a screen that could be OCRing data and tossing it out later).

'You have unexpected components. You may want to have your device inspected or risking compromise of x/y/z. Should we continue or lock it down'?

I would love to know if I can use one of this to get unlimited data worldwide.

Jokes aside, keystone wallets are air gapped. And not air gapped but awesome the lesser known but imo best of all, gridplus lattice1.

Heck, even a trezor, despite their mail provider being hacked, is better.

I, however, dont endorse the iPhone idea.

Just don’t buy ledger, terrible company. Many of my friends are getting endless spam because of them. The key backup is a disaster after they promised it was not possible to retrieve it. Their software stack is closed source.

This is imo the last nail in the coffin for them. They should refund all the money lost, and issue a worldwide recall.

Lots to hate about them.

How does your air gap defend against someone opening the case and adding a wireless transmitter though? Which is what happened here.
You are right, anti tampering, and not even that. Air gapping protects you from other threat.

Lattice for example, has strong anti-tampering features.

Then what is the best solution aside from tightly controlling the supply chain?

There isn't one, that's sort of the thing. The invisible hand of downvotes is the only thing indicating that in the thread, and thus only indirectly. We only have two choices, a magical tampering detector that bricks the whole thing (maybe desirable for some applications, if it never false positive'd), or, the vulnerability.

I'm not even sure a tampering detector would help. If this can happen, I'm fairly sure someone would figure out how to do the ocr by appending components externally.

Lots of downvotes for people asking questions out of ignorance.

You are right, it’s virtual impossible. You gotta trust the supplier.

The word for crypto device self destruction military guys use is zeroize. It can be triggered manually or automatically. A zeroized device can be repaired and signed off by a trusted person, then a new key loaded by another person.

Maybe these devices could ship in a tamper-detection-only mode, then detection triggered by user to be inspected by the user, then factory installed firmware wiped and reloaded if desired, have user key loaded to the firmware, and the shell sealed back up with electronic and physical detection enabled.

> showing the key phrase to the user instead of keeping it secret to the secure element is a questionable decision.

It's not, you need to write it down for backup and recovery.

Why doesn't it surprise me that the shittiest company Media Markt is somehow involved in this. These guys are about to close shop anyway, rest in piss Mediamarkt.
The technique is so coool. I mean taping the screen output on the way to the display to get around having to hack the secure element. :)
I had a similar idea to bypass DRM for a while. Some kind of board that goes between the display panel driver and whatever sends it the signal, and outputs something you can capture, e.g. DVI or unencrypted HDMI. Not sure how practical it is.
HDMI 1.4 has been leaked and there are devices which will force communication to this protocol, so it is possible to record.
In the past (circa a few years ago) the connection between the main board for a display and the glass driver board would be a ribbon cable, LVDS signalling. Very straightforward and typically not soldered. There'd be a ribbon cable connector. So yeah, you could just put a board between easily. And there are LVDS to H264/H265 chips already.

But as the other comment points out, older HDCP is broken wide open so ... easier to just use that. Plenty HDCP strippers on the market.

(comment deleted)
(comment deleted)
Analogue hole is how I did a more efficient smart garage door hack than what people were talking about here at the time. Soldered zigbee switch into the physical button; worked great :D
A more mundane and common use of this technique is for reading the displays of weighing scales, digital micrometers, and similar instruments which did not originally have the feature to enable computer connectivity.
In my teens, I built a digital serial interface for a scale company my uncle was a salesperson for, think highway and landfill truck scales. This is how I built it, very straightforward to your point, mitm from the scale to the display.
Back to paper wallets I guess.
Reminds me of that time when state actors wanted to spread the Stuxnet worm into an air gapped nucleair facility in Iran, and basically hijacked the whole USB supply chain and put the worm in there.

When enough resources / money is involved, these things are to be expected.

That's not what happened. Companies that did maintenance and had physical access to the facility were targeted, which then pushed the worm on to the laptops and flash drives they would take with them into the air gapped facility.
finally, good use for eSIMs /s But damn, it's hard problem to fix. Put it in epoxy and while tampering is harder (not impossible! also can just replace whole module), you can't verify it
"Because whoever can read the screen wins." This is a bit surprising from Heise.de?
At the bottom:

> This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.

Presumably "technical assistance" covers just about everything.

Oh-Kay_Labs have said it for years. Not only hackers and thieves go for them, but also kidnappers and robbers. If anyone knows you have one, and things could be much worse. Use paper-wallets, old phones and encrypted USBs instead.
>Use paper-wallets, old phones and encrypted USBs instead.

None of these prevent thieves or anybody from knowing you have one worth stealing. The actual solution is to not use fundamentally broken transparent crypto like BTC that broadcasts to the whole world your exact funds and ties them to your identity on every transaction. With monero your funds could be 0,10 or 10 billion and that is nobody's business.

Or just open a bank account like a normal person. But I suppose that requires deprogramming yourself out of the crypto cult.
use leather wallets and paper cash...
Government currencies deflates at 15% a year, Bitcoin doesn't.
Bitcoin has lost 25% of it's value in the last year.
Bitcoin has gained 10,000% since its invention... The US dollar is worth 3% of what it was 100 years ago, I'm sure you're smart enough to do the math.
Makes the claim from BI that Supermicro had malicious hardware implants a little more believable, eh?
Not really. We have physical proof of the compromised Ledger devices; no one has ever presented any specific evidence that Supermicro hardware was similarly compromised.
Very true. I am still somewhat skeptical over the Supermicro implant but seeing these Ledger implants makes it less of an impossibility.
+15 years later and it still doesn't do anything but provide idiots a way to lose their money. It really is impressive.
I wonder why they only managed to steal 100M so far. Like with the order of effort needed, why haven't they waited for the really big fish to unlock their ledger?
because the longer they wait, the higher the chance of being discovered before they're able to steal anything. I'm sure there's some game theory about this
If they were discovered, ledger would need to announce it, couldn't they just send out all the txns at once to steal whatever they had accumulated?
LOL why would anyone want a hardware wallet when you can just store your Bitcoins on your own encrypted hard disk or USB stick? Bitcoin is merely a file.

These people are being suckered into a false sense of security with hardware cryptowallets. I mean, it would be very tempting to sell a hardware wallet with a backdoor inside of it to steal everyone's cryptocurrency, wouldn't it?

You can use FDE all you want but you're still vulnerable to that file being stolen. Do you install programs from outside your package manager? Do you personally verify and compile everything? Do you pirate stuff? Use npm? Have an AI agent? Do you fully trust the browser sandbox? Click on email attachments? Even if you are Better Than Most, judging by the amount of youtubers that get hacked through stolen cookies, it's clear to me that even above-average people are susceptible to having files stolen.

Keeping your wallet file on a USB stick (or encrypting it) merely reduces the window of time an attacker can get the information. The attacker with local access could simply replace your wallet software. Or make use of a keylogger, screen capture, memory capture, etc.

In that context a dedicated device is the safer approach, and a hardware key is a minimalist device to do that whilst also being less inconvenient than an airgapped dedicated crypto laptop.

You're forgetting that the file needs a password to unlock it.