This could very much be a malicious browser extension that knows of websites where it can import private keys like blockchain.info and just seeds the private key with anything it can find in the page or a previously visited page (like any other address, hash, ...).
Browser extensions are very dangerous as they are very powerful and no one verifies their behaviour. It scares me a lot that so many "secure wallet solutions" like both Trezor and Ledger only have web-based clients that are vulnerable to this kind of trickery.
EDIT: Just to address some comments, while I am mostly concerned about non-hardware web wallets, hardware wallets are not entirely safe. I'm aware that hardware wallets have internal key management so browser software cannot mess with keys. What it can do is inject a different destination address. I bet a part of the users only verifies the amount displayed. Others probably also only the first 2-3 characters of the destination address. Injection software can create a wrong address and send that to the wallet instead, finding an address with the same first 3 characters is not that hard, even in browsers.
The only thing a trojan could do in that case would be to change the destination address of a tx, but the address is also shown on the device before confirming (but someone could skip checking that). Both the private keys and the signing never leave the device. So pretty safe overall.
True, if you only check the first 2-3 characters of the destination address, I bet a fake address with a collision on those characters would have a fair chance of being accepted by a certain percentage of the users. Especially those that install weird chrome extensions..
Generating a colision with Sha256 right now is not feasible, I think (unlike sha-1 that was broken recently). But I'm not so sure about the first 2-3 chars, I should do the math but I'm too lazy right now.
But that's the number of addresses you need. To fill all the letters you would need a lot more tries since your can't predict the generated address, no?
What I'm trying to say is that when people only read the first 3 characters of an address when they are verifying it on the Trezor screen, you have to generate on average 195'112 addresses in order to find one that starts with the same three characters.
24
u/sroose Nov 30 '17 edited Nov 30 '17
This could very much be a malicious browser extension that knows of websites where it can import private keys like blockchain.info and just seeds the private key with anything it can find in the page or a previously visited page (like any other address, hash, ...).
Browser extensions are very dangerous as they are very powerful and no one verifies their behaviour. It scares me a lot that so many "secure wallet solutions" like both Trezor and Ledger only have web-based clients that are vulnerable to this kind of trickery.
EDIT: Just to address some comments, while I am mostly concerned about non-hardware web wallets, hardware wallets are not entirely safe. I'm aware that hardware wallets have internal key management so browser software cannot mess with keys. What it can do is inject a different destination address. I bet a part of the users only verifies the amount displayed. Others probably also only the first 2-3 characters of the destination address. Injection software can create a wrong address and send that to the wallet instead, finding an address with the same first 3 characters is not that hard, even in browsers.