Native dependency cache
Native dependency cache
Posted Feb 6, 2025 12:54 UTC (Thu) by bluca (subscriber, #118303)In reply to: Native dependency cache by Cyberax
Parent article: Vendoring Go packages by default in Fedora
> Nope. It will get the locked versions of packages that are specified in the dependency list (go.mod and go.sum). They are cryptographically verified to be the same (go.sum contains the hashes of packages). If you think that the package author is malicious, then don't package the software in the first place.
Aged like a fine wine:
https://arstechnica.com/security/2025/02/backdoored-packa...
> A mirror proxy Google runs on behalf of developers of the Go programming language pushed a backdoored package for more than three years
lol, lmao
Posted Feb 6, 2025 13:35 UTC (Thu)
by excors (subscriber, #95769)
[Link] (1 responses)
The novel part is that the attacker removed the malicious code from the corresponding GitHub repository, after publishing the module. Since Go modules are immutable (unlike Git repositories), the mirror kept serving the original code that was first published, and everything was successfully cryptographically verified against that.
The lesson is that anyone wanting to audit a module's code needs to download the crytographically-verified version and read that, instead of downloading the same tag name from the same repository URL and assuming it's still the same code. And of course you also need to be careful of typosquatting, which is a non-trivial problem, but that's nothing new or Go-specific.
Posted Feb 6, 2025 15:16 UTC (Thu)
by bluca (subscriber, #118303)
[Link]
How about "do not allow anyone to upload whatever they want with no gatekeeping whatsoever and requiring just an email address", instead? Like every Linux distro has been doing for 30 years? Just a thought!
Posted Feb 6, 2025 21:30 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Feb 7, 2025 17:50 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link] (7 responses)
The attack won't work unless you use the proxy service _and_ ignore the sumdb validation.
Posted Feb 7, 2025 18:38 UTC (Fri)
by excors (subscriber, #95769)
[Link] (6 responses)
Posted Feb 7, 2025 20:32 UTC (Fri)
by Cyberax (✭ supporter ✭, #52523)
[Link] (5 responses)
Posted Feb 8, 2025 0:54 UTC (Sat)
by excors (subscriber, #95769)
[Link] (4 responses)
Posted Feb 10, 2025 3:55 UTC (Mon)
by raven667 (subscriber, #5198)
[Link]
I think a lot of people hold illusions that they wouldn't fall for this, that of course they'd know right away and have a good laugh, but i don't think this is true, a GitHub project with all the assets cloned from the original with just the URL changed is very difficult to spot if you have no prior familiarity and a shallow interaction with the project. The hall of mirrors can be pretty comprehensive and convincing, how could a packager know for sure in a way that would never fail or be missed, or skipped, that wouldn't be subject to human fallibility?
Posted Feb 10, 2025 19:22 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
I was thinking of a case where you would push malicious code to a project's repo, tag it, and let users download it. Then you can force-push a "clean" version, erasing the trace. Go will detect this, once the next person tries to download the module, the Go module proxy will complain about different hashes for the same tag.
It won't help with pure typosquatting.
Posted Feb 11, 2025 15:47 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Feb 11, 2025 15:53 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
Native dependency cache
