Earlier quoted context omitted.
I mean, this class of attack is defeated as a matter of course in high reliability applications like aerospace. You just check the compiler output precisely corresponds to the compiler input. You need to do that anyways to prevent miscompilation errors in general (this class of attack is just intentional miscompilation), so it hardly counts as a nightmarish problem, just a annoying one.
> You just check the compiler output precisely corresponds to the compiler input. just is doing a lot of work there.
The Ken Thompson Hack
21–30 of 46 posts
Re: The Ken Thompson Hack
#22Re: The Ken Thompson Hack
#23Earlier quoted context omitted.
I mean, this class of attack is defeated as a matter of course in high reliability applications like aerospace. You just check the compiler output precisely corresponds to the compiler input. You need to do that anyways to prevent miscompilation errors in general (this class of attack is just intentional miscompilation), so it hardly counts as a nightmarish problem, just a annoying one.
How is this normally done? Manual review of machine code?
Generally in these environments you build with optimizations off unless needed to ease this validation process as, obviously, you must validate the released/deployed version.
Re: The Ken Thompson Hack
#24> Acknowledgment. I first read of the possibility of such a Trojan horse in an Air Force critique [4] of the security of an early implementation of Multics. I cannot find a more specific reference to this document. I would appreciate it if anyone who can supply this reference would let me know.
ofc the US Gov was behind this. Incredible.
Re: The Ken Thompson Hack
#25The team at bootstrappable.org have been working very hard at creating compilers that can bootstrap from scratch to prevent this kind of attack (the "trusting trust" attack is another name for it.) They've gotten to the point where they can bootstrap in freestanding so they don't need to trust any OS binaries anymore (see builder-hex0.) I've spent a lot of my spare time the past year or so working on my own attempt a…
What if the trojan is in microcode? No amount of bootstrap in freestanding can protect you here.
Re: The Ken Thompson Hack
#26[1] the monsters normally known as "browsers", witch happen to be something like `less`, `more`, `most` and so on, not much like a JVM "javascript required to view this site" while perfectly classic looking and modern looking websites works very well without js, if you enable js but keep third party contents restricted you get a "page does not exist"...
A critics just to say "please, if your audience is some tech savvy cohort, try to design things for them.
Re: The Ken Thompson Hack
#27The team at bootstrappable.org have been working very hard at creating compilers that can bootstrap from scratch to prevent this kind of attack (the "trusting trust" attack is another name for it.) They've gotten to the point where they can bootstrap in freestanding so they don't need to trust any OS binaries anymore (see builder-hex0.) I've spent a lot of my spare time the past year or so working on my own attempt a…
So bootstrap in freestanding does make this kind of attack much more difficult to pull off, but with contemporary hardware, it does not fully prevent the attack. What if the trojan is in microcode? No amount of bootstrap in freestanding can protect you here.
These are all genuine attack vectors but they are not really solvable from the software side. At least for Onramp I consider these problems to be out of scope. It may be possible to solve these with open hardware but a solution will look very different from the kind of software bootstrapping we're doing.
Re: The Ken Thompson Hack
#28Clicked on the first Bell Labs link hoping to read the original and ended up on some VPN service's landing page. Sigh. :(
Re: The Ken Thompson Hack
#29For more, including information about the "Diverse Double-Compiling" (DDC) countermeasure, see my page: https://dwheeler.com/trusting-trust/