News for hackers. Stuff that matters.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by anonporridge on Monday November 07, 2022 @02:48PM (#33511332)
This is exactly the type of attack many cypherpunk bitcoin types have been paranoid about for years.

And it's why in any good hardware wallet, you need to explicitly confirm the address you're transferring to on the wallet's air gapped screen and make sure it wasn't swapped in the copy/paste.

I'm sure it would also be quite easy for this kind of attacker to generate thousands of addresses they control, and have their software pick one that looks 'closest' to the one being subverted to increase the likelihood that a lazy user just sanity checks a few characters at the beginning and end of the address before confirming.

Survival of the most paranoid.

Re:Malicious Python Packages Replace Crypto Addresses in Dev... by louislang on Monday November 07, 2022 @02:51PM (#33511367)
There was some discussion of this over on Reddit. I didn't see evidence of it, but the claim was that this had already happened. I'd be curious if someone had some examples of it in the wild.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by anonporridge on Monday November 07, 2022 @03:05PM (#33511584)
It could be very hard to prove after the fact. And it's generally much more likely that human error causes a loss than to be victim to a malicious attack. So even if it has legitimately happened, it's likely to be dismissed as the person was just incompetent and that there just wasn't enough software safeguards to protect people from themselves.

This is probably a good lesson in general for intelligent malicious actors. If you have an exploit that works, it's important that you use it rarely enough and against the right marks that the loss doesn't enter the collective consciousness as a malicious attack, but simply as an individual or systemic failure.

And for those of us who strive to be constructive and defensive actors, it's an important lesson to remember that sometimes malicious actors disguise their actions as amoral bugs in the system. Regular random auditing of the seemingly mundane is an important tool to uncover these kinds of exploits.

Re:Malicious Python Packages Replace Crypto Addresses in Dev... by throwup on Monday November 07, 2022 @03:04PM (#33511574)
This particular clipboard attack has been part of malware for at least 5 years, maybe 10. But I haven't heard of it being distributed via a package manager until now.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by louislang on Monday November 07, 2022 @04:24PM (#33512706)
Oh I meant malware generating addresses that look directionally similar to the address the user expects (as opposed to a random address that's hardcoded). I'm not sure if this is a thing, or just conjecture from others.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by BoardsOfCanada on Monday November 07, 2022 @04:01PM (#33512382)
I remember malware replacing addresses on the clipboard like this, probably 8-10 years ago, there were reddit threads about it at the time for anyone with energy to look.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by Pxtl on Monday November 07, 2022 @02:57PM (#33511465)
Ouch. I haven't handled Bitcoin since the early days, addresses are like 30 chars aren't they? It seems like it would be really easy to screw up anything involving eyeballs there.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by throwup on Monday November 07, 2022 @03:09PM (#33511647)
The last 6-ish characters are a checksum. It would be very computationally intensive to generate a similar-looking address without changing the checksum, though of course not impossible.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by anonporridge on Monday November 07, 2022 @03:15PM (#33511741)
Public addresses are 160 bits in bitcoin, so it depends on your character encoding. But yes, very long and random.

Pieter Wuille has a very interesting talk on public addresses and some novel work he did to drastically improve address error detection. Worth a watch for some cool computer science. https://www.youtube.com/watch?v=NqiN9VFE4CU

Honestly, it's kind of surprising that these kinds of exploits don't happen all the time since base layer bitcoin transactions alone secure $14 trillion in annual transfer volume in recent years. That's a huge honey pot for malicious attackers that seems to mostly go under exploited.

Re:Malicious Python Packages Replace Crypto Addresses in Dev... by fps-hero on Monday November 07, 2022 @03:16PM (#33511755)
Perhaps a better way would be to use something along the lines of SSH’s randomart.

I’m sure there would be an even more interesting variant where the address could be used to generate a prompt for DALL-E.

Re:Malicious Python Packages Replace Crypto Addresses in Dev... by mywittyname on Monday November 07, 2022 @03:48PM (#33512203)
I'm surprised someone hasn't built what3words style translation algorithm for crypto. So instead of the user seeing an address as a long stream of character, it becomes a series of words.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by bombcar on Monday November 07, 2022 @04:24PM (#33512700)
Isn't that almost what those wallet seed phrases are? Or something very similar looking - that could introduce another new line of attack, where you think you're using an address and accidentally have your seed phrase.
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by nightpool on Monday November 07, 2022 @04:37PM (#33512890)
That's for the private key, right? OP was talking about a smaller "fingerprint" for the public key that wouldn't necessarily be as long as a full seed phrase (or as secure)
Re:Malicious Python Packages Replace Crypto Addresses in Dev... by ohy on Monday November 07, 2022 @06:32PM (#33514063)
Maybe something like ENS?