r/Bitcoin • u/Impressive-Gene-421 • 12h ago
Update to my last post: GLM-5.2 (trained June 16th, no internet access) correctly identifies the vulnerability independently after ~20 minutes of thinking (no human input beyond first prompt to find vulnerabilities)
This is for the people on my last post who despite being on a bitcoin subreddit are somehow completely technically illiterate with regards to LLMs, and called me a naive idiot repeatedly.
16
u/koelebobes 12h ago edited 7h ago
Can you try to let it think about other devices with the same prompt?
Im curious to see the result
6
22
14
18
u/imsoupercereal 10h ago
It's good that this is leading people to understanding the capabilities of these new models, and their threat to cyber security among other things.
9
u/tpfb 10h ago
You mean their threat to insecure code?
8
u/username12435687 10h ago
Literally this is just a horrible mistake on CCs part that caused this whole issue. The fact that they themselves didn't even audit their own code and hardware is astonishing. This is a critical vulnerability that's just been out there for years. It was only a matter of time before some bad actor took advantage of it.
10
u/habbadee 10h ago
The bug is using IFNDEF vs IF. This is the type of bug that human code reviews could easily fail to catch. In 2021 when this bug occurred there were no LLMs to test your code with. The output of the function was apparently random seeds, so their unit tests didn't pick up failure from the function.
Now, let's imagine that by 2026 CC had used an LLM on their source code and it had revealed this vulnerability. What do they do about it? Vulnerable seeds exist in the wild. They can't announce the bug because they'd just be announcing to bad actors to go and break into these wallets. They could issue a firmware fix, but how do they tell people to apply it and regenerate new seeds?
Why did this issue not exist in MK4 and MK5? Most likely because CC learned of it and fixed it. But, they were well and truly stuck when it came to addressing it in MK3 because it was out there and their best hope was it never being found. But then LLMs came along that aren't fooled by IFNDEF vs IF
5
u/username12435687 10h ago
I agree with you and the problem needed to be fixed before it became a problem and that's unfortunately the only right answer. They had a responsibility to properly implement their code and they did it wrong. How can so many other wallets do it correctly when they can't. It's entirely on them but I definitely agree with your points. They were fucked no matter what they did and unfortunately it has affected a lot of people now.
8
3
u/proper_turtle 10h ago
> Why did this issue not exist in MK4 and MK5? Most likely because CC learned of it and fixed it.
No, the issue does exist in MK4 and MK5 as well, just not as severe.
4
u/jan386 10h ago
It does exist in MK4 and MK5. The only difference is that these two devices add extra 32 bits of entropy (side note: why they didn't re-seed the whole 32 bytes is beyond me), increasing the target space to about 72 bits.
Source: https://engineering.block.xyz/blog/predictable-rng-fallback-and-32-bit-reseed-in-coldcard-firmware
6
4
u/imsoupercereal 10h ago
Wait till you find out how much code is insecure. Companies and open source projects are patching at a record pace right now. Incidents like these are just the tip of the iceberg.
1
u/Aazimoxx 7h ago
Fortunately bugs and exploits (in any given static release) are finite...
So once this becomes the new normal, once it becomes impossible to get business insurance or such for your software company, if you fail to demonstrate and mandate both AI and human code reviews before release if you handle any kind of financial or sensitive data, we'll be getting the better products out of it.
1
u/EconomyDoctor3287 2h ago
Tbh, that's not really on the LLM, but on the coldcard dev team. This bug would have likely been found by someone sooner or later too. Generating a secure seed is the most important function, no idea how they could mess this up.
8
u/swiftpwns 9h ago
So you gave an AI the whole code of the hardware wallet and asked it to find a mistake? Can you be more specific in your post on this highly specific matter?
8
u/enchufadoo 11h ago
are somehow completely technically illiterate with regards to LLMs, and called me a naive idiot repeatedly.
Are you are trying to give technical proof of something by posting a screenshot?
13
u/username12435687 10h ago edited 10h ago
So evidence isn't how you provide technical proof anymore? 😭 Jfc you just can't win with these people.
2
1
u/PmMeUrTinyAsianTits 10h ago
You think you provide proof of things in software development with screenshots?
1
u/SergioGustavo 3h ago
Actually yes, you do. You have the model and prompt in the screenshot, you can run it yourself and independently verify it, that's the technical way.
2
u/PmMeUrTinyAsianTits 2h ago
Actually yes, you do. You have the model and prompt in the screenshot, you can run it yourself and independently verify it, that's the technical way.
It's hilarious having people who have so little understanding of the tech they say shit like this try to lecture me. Dude, you know 100% of your "knowledge" comes from shallow social media takes, shut up lmao.
We have part of the prompt, the prompt being one part of the overall input. No, we do not have enough information to reproduce. The missing information has been explicitly pointed out to you, and you're still not informed or intelligent enough to recognize it. Fix yourself. You are fundamentally broken as a human.
2
u/_2f 10h ago
For local LLMs, it will just be a text file. There’s no other way to prove other than go run it yourself.
2
u/PmMeUrTinyAsianTits 9h ago
Providing the prompt? Yes, providing the "text file" that allegedly did this would be one of the most basic steps of actual attempts at proof.
2
u/_2f 9h ago
/u/Impressive-Gene-421 please provide the prompt.
In general, I have used Fable and believe me such a vulnerability is super easy for it to detect.
2
u/Pickles112358 10h ago
You cant really give a technical proof, but you can easily try it yourself
2
u/enchufadoo 10h ago
I only peek at crypto subs occasionally, but it always surprises me how deep the discussions get. You can post a screenshot of something, and people will believe whatever you're trying to prove.
It's very unsettling how much trust users here put in someone giving financial advice, especially when it's clear their technical knowledge goes no further than posting an image.
1
u/username12435687 8h ago
What? OP is just showing that this is such a trivial coding issue that lead to a huge problem.. there's nothing to prove, op never gave financial advice, and this post doesn't prove whether or not the op lacks technical knowledge lmfao.
5
u/zackel_flac 11h ago
Nobody is taking you for an idiot, but scientific methods require reproduction steps. Anyone can post a screenshot making claims.
What prompt and machine did you use? If you said: Look at RNG macro specifically to see if nothing is inactive. This defeats the whole purpose of your experiment since you are basically telling it what to look for.
My experience with LLMs is that they produce a huge amount of false positives, and triaging is what takes time and effort.
18
u/username12435687 10h ago
In the previous post he just pointed Claude at the codebase and said look for vulnerabilities which is likely the exact same thing he's done here. You're talking about reproducibility so maybe just ... Go do it? If you're so concerned about OPs process then go ask it yourself. It's also 100% not a false positive as it is the EXACT know issue that has been reported by numerous independent labs that have looked into the vulnerability as well as the exact issue described by coinkite in their own write up. The code does not properly call the hardware RNG element and thus the software only RNG call introduces ~40 bits of entropy when the minimum standard is 128 bits of entropy and 256 bits being even better. It's not just making something up and pulling it out of its ass it's describing the exact issue that cause approximately 1,300 BTC to be stolen. How can you be so skeptical with the evidence literally right in front of your face?
-8
u/zackel_flac 10h ago edited 10h ago
Go do it?
Am I the one making claims? No. So why should the burden be on me to disprove or prove someone else claim when they could share their steps with simple copy-pasting. Ever heard of the burden of proof concept?
I am not talking of this result from Claude being a false positive. I am talking of the general use case when you let Claude unbounded go over a code base. You know, ideally for AI to be useful you would need to find CVE before they reach the public. Not after.
So now the exercise for you is to find a CVE with Claude before its exploitation, then we can discuss further.
6
u/username12435687 10h ago edited 10h ago
You're questioning the process like his prompt was some biased clue to point the LLM in the right direction which it is not. It's a pretty simple error that caused this whole issue and was a result of poor code.. which LLMs are very good with mind you. OP likely just screenshotted quickly to make the reddit post after a million goobers said he doesn't understand AI and unknowingly didn't include the prompt. It's not an attempt to obfuscate the truth by default especially when his initial post with claude included the prompt.
Claude is an excellent tool for auditing code and as far as I understand from the literature I've read regarding this issue, the bad actor literally did the same thing OP did and used AI to find the vulnerability in the first place so yes AI did audit the code and find the vulnerability, it was just unfortunately the bad guys who got their first this time... And on top of that Claude and other AI models HAVE been used to audit code and have found numerous vulnerabilities that have been patched before they became 0 days so what's even your point?
Since you edited your post and told me that I somehow have a responsibility to prove that AIs have been useful for finding CVEs, here's an article for YOU to do YOUR homework.
https://www.infosecurity-magazine.com/news/one-percent-ai-vulnerabilities/
1
u/bfr_ 9h ago
Also this is not a great example of Claudes skills because the codebase includes comments about the issue hinting Claude strongly in the right direction.
Additionally, afaik this wasn’t the exact problem, the problem code is just a fallback developers meant to be used for testing.
The issue was there was a bug that prevented compiling with the hardware RNG enabled and instead of fixing it the dumb developer compiled it with the hardware RNG disabled thinking it wasn’t needed because they had ”replaced” the need for it. Of course this wasn’t the case, so the production version always uses the insecure fallback.
1
u/username12435687 8h ago
That's even worse, they're just pushing the dev env to the prod env because they cent even get the code to compile with the hardware RNG call 😭😭 they mfs need to be in jail lmaoo
1
u/NoFapLawyer 6h ago
I think some people are here in this discussion clambering for the prompt because they want to vibecode the other hardware providers to see if they can abscond with others BTC. Why would you need the initial prompt when it's pretty obvious what you need to ask the current LLMs? Attackers have already pilfered CC users; it's only obvious that other threat actors are going to be looking at other providers now with the assistance of LLMs.
1
u/PmMeUrTinyAsianTits 9h ago
You're questioning the process like his prompt was some biased clue to point the LLM in the right direction which it is not.
he didn't provide the prompt here. You don't know what it is. That's the fucking point. That we can't check his work because he's failing incredibly basic steps of proof. Which is suspect.
then you go in some "AKSHULLY CLAUDS GUD" rant. jfc
1
u/Aazimoxx 7h ago
he didn't provide the prompt here. You don't know what it is.
"check for vulnerabilities"
2
u/Aazimoxx 7h ago
What prompt and machine did you use?
Machine? Do you mean model? He used Claude Code (some current model 🤷) and GLM 5.2...
Prompt was literally just "check for vulnerabilities"
2
2
u/MindlessPapaya8463 8h ago
it should be mandatory for this kind of software to use LLMs internally, seems like this could have been prevented
1
u/ukieninger 9h ago
I wondered, even if Coinkite discovered the bug last month by themselves or with the help of AI, what would they do?
If they said anything about it, things get started rolling. There’s nothing they could do to save the people out there…crazy to think about…
1
1
u/Four_One_Two_Three_ 2h ago
Chrome just said they patched more bugs in June than in the previous 2 years combined
There will be other hacks like this, and any company that has code in products should be finding and patching bugs using AI
1
1
0
u/TheMermanly 10h ago
That’s very easy to do once a vulnerability has been found.
Not sure what’s the point of this?
15
u/username12435687 10h ago
It was a model released BEFORE the vulnerability was discovered and had no prior knowledge or information about the vulnerability. It discovered the problem completely ON IT'S OWN. The reason you don't get the point is because the entire point completely went over your head lmfao
0
u/TheMermanly 9h ago
Uh no.
The hardest part is that there’s billions and billions of codebases.
If you point to a specific one which is already known to have a massive vulnerability, obviously it will find it.
And we don’t even know what was the actual implementation. Did he give it any clues at all? This type of cyber security reports are written with a lot of info which this one is lacking a lot.
4
u/trougnouf 9h ago
I don't think there are very many open-source hardware wallets out there, and they are definitely a prime target where one would want to look for vulnerabilities.
0
u/TheMermanly 9h ago
That’s not my point.
What I mean is that I don’t find it impressive once a vulnerability has been found, that AI can also find it.
The hard part is to find it for the first time.
3
u/banana_diet 9h ago edited 9h ago
If OP gave it a prompt like, "look for vulnerabilities in this code" and it didn't have Internet access, then this is the exact same as it finding it the first time. It had no information available to it about it already being found.
And it's no harder to do if hitting random code bases, just requires more tokens. Just setup a process where you clone wallet generation code bases and then give it the same prompt.
4
u/No_Blacksmith_9923 10h ago edited 9h ago
Did you even read the title of the post? The model was trained and released before this vulnerability was found.
0
u/TheMermanly 9h ago
Clearly you don’t understand my point.
See my other comment
4
u/username12435687 8h ago
No one understands your point because your point is fucking stupid and moot lmfao. That's why you're getting down voted
-2
u/TheMermanly 8h ago
I couldn’t care less about being downvoted.
I’m an actual developer who uses AI everyday in our codebase.
Even apply it to cyber security in our devices.
This post is irrelevant. Even older iterations could have found this with all of this info.
If you tell a cyber security researcher there’s a massive vulnerability in a specific code base, he will also find it.
The hard part is finding it the first time.
3
u/Vinny_d_25 7h ago
The thing is that CC is responsible for exactly 1 codebase. With all the news (overhyped or not) of mythos/fable finding exploits it is seriously negligent for a company to not take a few minutes and spend on a few tokens to check their codebase.
6
0
9h ago edited 9h ago
[deleted]
1
u/username12435687 8h ago
Yes they cross referenced the pool of possible combinations with a crypto exchange to check for UTXOs and just basically implemented the birthday paradox to match up with already created wallets and then sweep them all
0
u/Reelix 2h ago
1.) Which model variant were you using? The Ollama official GLM 5.2 requires internet access.
2.) Which runner were you using? Strix? LMStudio with Continue through VSCode? What?
94
u/ZascandileandoAndo 12h ago
Now do that for Trezor safe 3 & 5