Trusting-Trust Attack against an Entire Linux Distribution
Posted by signa11 3 days ago
Comments
Comment by Jach 1 day ago
Comment by wood_spirit 18 hours ago
Comment by fwlr 1 day ago
A utility such as strip sustains the attack whenever a tampered instance participates in the rebuild, even after the compiler seed shrinks to a few hundred bytes.
Well, yes, if you presuppose your modified binary is used, then you will find that your attack continues, but that’s only because “P iff P” is a logical tautology. It would be true even when the seed shrinks to 0 bytes, or shrinks to a negative number of bytes, or shrinks into a miniature poodle and tap-dances across your keyboard.The question that should have been addressed is “does the tampered instance participate in the build?”, and the whole point of these minimal-byte “seed” bootstraps is that they are just enough bytes of executable to do everything else from the source. So, no, the tampered instance won’t be participating in the build. We might even deploy our own tautology and say that if a pre-existing tainted binary participates in a build, then that build was not a bootstrap build, and therefore all bootstrap builds are in fact perfectly and definitionally immune to the attack.
Honestly, this whole paper kinda reads like an academic version of a slop CVE.
Comment by yayachiken 18 hours ago
It is precisely about showing that you can still propagate backdoored code if the compromised binary in your seed is NOT the compiler.
Comment by fwlr 15 hours ago
Then why have section 7.3 'Bootstrappable Builds', that briefly surveys a type of trusting-trust mitigation, and concludes that their method "sustains the attack [...], even after the compiler seed shrinks to a few hundred bytes"?
>It is precisely about showing that you can still propagate backdoored code if the compromised binary in your seed is NOT the compiler.
Whatever this paper is about, it is certainly not precisely about it. But quibbles aside, if that truly is what the authors set out to show, they should probably re-read the transcript, where Ken says "[For demonstration purposes], I picked on the C compiler. I could have picked on any program-handling program such as an assembler, a loader, or even hardware microcode."
Comment by tetha 13 hours ago
But that seems like quibbling about semantics. Thompson says that if a compromised binary generates a binary, you cannot trust the generated binary.
This does not even have to be gcc, it could be vim. Or strip. Or cat. Or dd.
Or an iop to write data to persistent storage if the firmware of your SSD is compromised.
Comment by gleenn 1 day ago
Comment by wizzwizz4 1 day ago
Just write a new OS. It's a weekend project to get enough groundwork that you can bootstrap a clean system from clean source code.
> And wouldn't there be difficulty comparing binaries built from significantly different environments?
Not really. Starting from stage 0, compile the compiler under test (stage 1), then use the compiled compiler to compile the compiler (stage 2), and compare the stage 2 artefacts. Provided that your comparison program is known-good, and the stage 2 build is deterministic (not the case for some real-world programs, but true for things like tcc), this lets you verify that the two compilation procedures work identically.
Comment by gleenn 1 day ago
Comment by jdiff 1 day ago
Comment by tosapple 1 day ago
get ready.
the effort required for a complete infiltration has been lowered a great deal.
Comment by jdiff 16 hours ago
Comment by tosapple 9 hours ago
simple single bit changes are enough to blast your private keys out to the ether of the public facing internet.
that big fat LLM does know how to make tentacles and eyes.
Comment by jdiff 9 hours ago
Comment by PhilipRoman 20 hours ago
Comment by cure_42 19 hours ago
Comment by podocarp 15 hours ago
Comment by wizzwizz4 14 hours ago
But they're not going to backdoor an Apple ][e, or a random 80m¢ microcontroller, for basically any value of "they"; so you can just use one of those instead, and save yourself the hassle.
Comment by lioeters 13 hours ago
Comment by Brian_K_White 13 hours ago
Individual cpu instructions, even of a crude old 8-bit cpu with no embedded minix os like today, are both simple enough for a human to manually understand what they do, and useful enough to build crude versions of useful things like an editor, interpreter, or compiler.
You can write a forth-like language or even a c-like language starting from individual cpu instructions that a human can read, understand, and write totally manually, and then use that to build up rapidly all the way to a full modern desktop.
If you were really paranoid about the very act of the initial typing-in, there are any number of ways to store data in a totally brainless eprom or record it to tape or something, and examine it with nothing but some leds, no cpu at all, to verify the bytes are the bytes you want. And you only need to do that for a pretty small number of initial bytes. After that it's all just regular source code which could be written on paper.
Bootstrapping is only an inconvenience problem, not a real problem.
It's not convenient for most people to assemble some bytes into some storage medium and then verify them without simply using a normal untrust-able computer to do it. But it's no problem really if you had some reason to be that careful.
Comment by charcircuit 1 day ago
Comment by colinsane 1 day ago
if you're concerned about this and not on x86, i encourage you to extend this to other platforms! i believe it's possible to generalize this to every linux platform musl itself supports, in time.
Comment by hannula 11 hours ago
Comment by fjfaase 1 day ago
[1] https://fransfaase.github.io/Emulator/tdiagram.html
[2] https://fransfaase.github.io/MES-replacement/
[3] https://fransfaase.github.io/MES-replacement/Tdiagram.html
Comment by hardwaresofton 1 day ago
https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-...
Comment by tenthirtyam 19 hours ago
Comment by signa11 19 hours ago
Comment by rep_lodsb 1 day ago
Comment by kragen 14 hours ago
However, anything in the build toolchain that someone uses to build those widely-executed executables necessarily does have permission to write to them!
This is certainly not novel, having been the subject of a Turing Award speech, but it is something that many people haven't thought through.
Comment by krater23 1 day ago
Comment by wiml 1 day ago
> Ken Thompson's trusting-trust attack [...] is widely regarded as a threat specific to compilers. We show that it is not
And yet, from Reflections On Trusting Trust:
> In demonstrating the possibility of this kind of attack, I picked on the C compiler. I could have picked on any program-handling program such as an assembler, a loader, or even hardware microcode.
The paper is certainly a nice worked-out example of the attack, which is worthwhile, but it's not novel.
Comment by nickpsecurity 1 day ago
Comment by stephenlf 1 day ago
Comment by chr15m 1 day ago
Comment by Joel_Mckay 18 hours ago
If you know, than you know why RISCV was fast-tracked in some places... =3
Comment by nickpsecurity 1 day ago
So, your program that combines source files or checks dependencies would be fully specified in its success and failure states. Only combinations of functions leading to a provably-secure state are even allowed. If you can't do that, the feature is too complex to allow. Human pentesters review it from design to algorithms to building it to spot ways attacks might happen.
That's what it takes to build software that usually resists subversion. Most software isn't built that way. It can't be because the priorities of developers and customers work against it. So, we'll continue to see clever attacks that exploit systems not designed to high security standards.
For this topic, I recommend David A. Wheeler's page on Software, Configuration Management Security because it covers many issues with it in mostly-centralized systems.
Comment by hansvm 1 day ago
Comment by mmooss 1 day ago
The most significant such priority may be the costs of paying developers and of time to delivery.
The dramatic reductions in those costs due to LLMs enable us to produce much more quantity and/or quality. Many complain now about quantity, so perhaps we are finally at a stage where we don't need much more software, and can focus on quality. Also, LLM attackers create demand for higher quality.
In other words, LLMs might enable us to some of these things that were impossible before.
Comment by nickpsecurity 1 day ago
Comment by mmooss 1 day ago
The LLM might take longer than otherwise, but still be fast enough. The new technology, like every useful one, changes the tradeoff equation.
Comment by charcircuit 1 day ago
If you have malware on your CI machine it can infect the artifacts it creates.
In this paper the malware was a strip trojan, but it could have been just as well a normal piece of malware which starts a service and then waits for the final artifact to be generated after which it infects it.
Comment by nulltrace 1 day ago
Comment by charcircuit 1 day ago
Comment by krater23 1 day ago
Comment by krater23 1 day ago
But this one is crippled because there is only one file that can infect other files.
Comment by jijji 1 day ago
Comment by LaunchGate 1 day ago
Comment by EGreg 1 day ago
Ken Thompson's Trusting Trust is an interesting conundrum... there are ways to minimize the need to trust however, if you can express everything in the same language or common runtime:
Comment by shevy-java 1 day ago
Comment by Legend2440 1 day ago
Comment by fwlr 1 day ago
Comment by OroPla 1 day ago
Comment by tosapple 1 day ago
Comment by hackingonempty 1 day ago
Comment by cpburns2009 1 day ago
Comment by aka-rider 1 day ago
It would take at least some knowledge to hack, not just a random script from a forum.
Now, with LLMs, it's the '90s all over again.
Comment by HDBaseT 1 day ago
If its easy enough to find exploits, its likely similarly easy to scan code for exploits, or use AI-based anti-virus technologies. The only thing holding us back is the cost of compute. We can't all run the latest models against everything.
Comment by jacquesm 1 day ago
Comment by cpburns2009 1 day ago