Lunduke
News • Science & Tech
The creator of UNIX built a Trojan Horse which let him log in to any UNIX machine.
And nobody knew about it for years.
May 05, 2024
post photo preview

Back in 1984, the Association for Computing Machinery presented Ken Thompson with a “Turing Award” for his many contributions to the world of computing.

And for good reason.

Ken worked on Multics, co-created UNIX, created multiple programming languages (Bon and B — which directly led to C), co-created the Plan 9 operating system, UTF-8, and on and on.  If anyone deserves an award for advancing computing... it's Ken Thompson.

But we’re not here today to talk about those extraordinary contributions to computing.

No, sir.

We’re here to talk… about his acceptance speech.

Because that speech revealed a truly fascinatin computer virus that Thompson had created years earlier… for the C compiler.  One which gave him a backdoor into UNIX itself.

The Speech

He titled his speech “Reflections on Trusting Trust”, and the basic premise is this:

“To what extent should one trust a statement that a program is free of Trojan horses? Perhaps it is more important to trust the people who wrote the software.”

To prove his point, Ken told the tale of how he had — years earlier — created what was, essentially, a computer virus that infected the C compiler (cc) and the UNIX login program.

Seriously.

This is real.

Ken could gain control of most UNIX systems

It worked, essentially, like this:

Ken modified cc (the C compiler on UNIX systems) so that — only when it was compiling UNIX’s “login” program — it would inject a small “backdoor” (into “login”) that would allow him to log in as any user on the system if he used a predefined “password”.

Which is, obviously, a pretty big security hole.

However…

That sort of "universall password" code would be likely to be found during even a rudimentary code review of the C compiler. Or, heck, even by any casual programmer who happened upon that section of the code.

What Ken did next was… devious.

Hiding his UNIX backdoor

He needed to make sure that, should anyone find his nefarious code in “cc”… that his backdoor would live on.

So he then added functionality to “cc” so that it would detect if it was compiling itself (because the C compiler was compiled… in the C compiler)… and insert code into the compiler that would add… itself.

Which means…

Even if the source code is removed from “cc” project… the code (for adding both the login backdoor and the “keep adding this to the C compiler” bits) would get “invisibly” injected into “cc” every time it got compiled by an already infected build of the compiler.

So… as long as there was an unbroken chain of using the C compiler from that point onward, the UNIX login backdoor was unlikely to be effectively removed.

Brutal.

According to Thompson:

“The actual bug I planted in the compiler would match code in the UNIX "login" command. The replacement code would miscompile the login command so that it would accept either the intended encrypted password or a particular known password. Thus if this code were installed in binary and the binary were used to compile the login command, I could log into that system as any user.”

The Moral of the story

As Ken Thompson put it…

“The moral is obvious. You can't trust code that you did not totally create yourself. (Especially code from companies that employ people like me.) No amount of source-level verification or scrutiny will protect you from using untrusted code. 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. As the level of program gets lower, these bugs will be harder and harder to detect. A well installed microcode bug will be almost impossible to detect.”

Did this make it out into the wild?

I know what you're thinking.  "Is this code still out there?  How many systems were impacted by this?"

What we know: This bit of naughty code was released to at least one machine (used by a UNIX support group). This has been confirmed by Ken, himself.

However, it is believed that the code went no further than that machine.

But... do we know for sure?

Do we actually have a high level of confidence that the modified “cc” and “login” went no further than that support group UNIX box?

No. No, we do not.

In fact, according to Eric S. Raymond

“[I have] heard two separate reports that suggest that the crocked login did make it out of Bell Labs, notably to BBN, and that it enabled at least one late-night login across the network by someone using the login name “kt”.”

BBN.  That's Raytheon.  A critical DARPA researcher -- one which was instrumental in the early days of ARPANET.  A huge amount of software came out of BBN.  Heck, even the first Text Adventure game came from there.

If UNIX machines at Raytheon BBN were infected... the possibility of infected versions of those files making it to other sites is incredibly high.

Truly wild

Which leads to a (rather amusing, and mildly terrifying) bit of historical trivia:

Ken Thompson — one of the co-creators of UNIX — intentionally created a trojan horse that infected both the C compiler and the “login” program of UNIX systems.

What’s more… it went undetected for years.  We wouldn't even have known about it, if he hadn't told us he created it.

And we truly have no clue how widespread that trojan became.

community logo
Join the Lunduke Community
To read more articles like this, sign up and join my community today
22
What else you may like…
Videos
Podcasts
Posts
Articles
November 12, 2025
Stack Overflow Co-Founder to DHH: You Should be Afraid of Me

Jeff Atwood (co-founder of Stack Overflow & Discourse), appears to make a public threat against Omarchy & Ruby on Rails founder, DHH. Threats of violence are a pattern among Open Source Leftists.

More from The Lunduke Journal:
https://lunduke.com/

00:16:33
November 12, 2025
Multiple Vulnerabilities Found in Rust Sudo Clone in Ubuntu

Ubuntu is now shipping with Rust based replacements of core utilities (sudo, date, du, etc.). And the steady stream of bugs, missing functionality, and security vulnerabilities continues.

More from The Lunduke Journal:
https://lunduke.com/

00:18:01
November 12, 2025
4chan's Lawyer Talks to Lunduke

Preston Byrne, the attorney representing both 4chan and Kiwi Farms, talks with Lunduke about Ofcom and the United Kingdom's censorship campaign against Americans.

More from The Lunduke Journal:
https://lunduke.com/

00:56:04
November 22, 2023
The futility of Ad-Blockers

Ads are filling the entirety of the Web -- websites, podcasts, YouTube videos, etc. -- at an increasing rate. Prices for those ad placements are plummeting. Consumers are desperate to use ad-blockers to make the web palatable. Google (and others) are desperate to break and block ad-blockers. All of which results in... more ads and lower pay for creators.

It's a fascinatingly annoying cycle. And there's only one viable way out of it.

Looking for the Podcast RSS feed or other links? Check here:
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

The futility of Ad-Blockers
November 21, 2023
openSUSE says "No Lunduke allowed!"

Those in power with openSUSE make it clear they will not allow me anywhere near anything related to the openSUSE project. Ever. For any reason.

Well, that settles that, then! Guess I won't be contributing to openSUSE! 🤣

Looking for the Podcast RSS feed or other links?
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

openSUSE says "No Lunduke allowed!"
September 13, 2023
"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

This episode is free for all to enjoy and share.

Be sure to subscribe here at Lunduke.Locals.com to get all shows & articles (including interviews with other amazing nerds).

"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

I see that this device has a 3.5 inch Floppy Drive....
I'm Going to Assume This Is The REALLY Bad FAIL on IT Security Policy.
😭

post photo preview
November 11, 2025

Security Alert!
Check your libraries!!

November 11, 2025

Nothing like a guy stepping up and calling BS on the whole operation. A guy who got it right before.

Billionaires PANIC AI bubble modern fraud exposed - YouTube

'Big Short' investor Michael Burry accuses AI hyperscalers of artificially boosting earnings
https://www.cnbc.com/2025/11/11/big-short-investor-michael-burry-accuses-ai-hyperscalers-of-artificially-boosting-earnings.html

There are 3 certainties in Tech. One of them is 50% off Lunduke Journal subscriptions today.

Life is filled with uncertainties.

  • Will Valve’s new Steam Machine be reasonably priced?

  • When will Microsoft replace the Windows Calculator with an AI chatbot?

  • Will The Lunduke Journal have a sale next week?

Do you know the answers to any of those questions? Shoot. I sure don’t!

But, within the Tech Industry, there are 3 certainties:

  1. There will be more bugs found in the Rust Core Utility clones.

  2. GNOME will say something stupid before the day ends.

  3. And The Lunduke Journal is having a sale right now.

Why take chances? Embrace what you know for certain and grab a Lunduke Journal subscription, right now, for 50% off.

$3 / Month. Or $27 / Year (which works out to… [does math]… $2.25 / Month). Or $150 for Life (seriously… for life).

Which will then give you all of the perks:

  • DRM-Free MP4 Downloads of all videos.

  • Full access to the exclusive forum.

  • And a bunch of nerdy eBooks.

50% off subscriptions lasts through Friday (November 14th).

Maybe the sale will be extended. Maybe another sale will happen again in the future.

Then again… maybe not.

Can you really take that chance?

-Lunduke

Read full Article
November 12, 2025
Lunduke Journal Update: Nov 12, 2025

Just a few quick Lunduke Journal-y tidbits on this fine Wednesday afternoon!

  1. Two fascinating interviews this week: DHH and Preston Byrne (the attorney for 4chan). Both are worth catching if you haven’t already.

  2. The 50% off Subscriptions deal has been extended through this Friday (Nov 14th). So many of you kept picking up new subscriptions… I figured… what the heck! Why not keep the party going? So Monthly, Yearly, and Lifetime subs are all half off at least through Friday!

  3. The “Lifetime Subscriber Wall” isn’t part of today’s (November 12th) shows. There have been so many requests to be added to the wall this week that I need to update the design a bit to fit everybody. The Lifetime Wall will re-appear at the end of new shows tomorrow or Friday.

Once again, thank you for your support! None of this would be possible without you!

-Lunduke

Read full Article
November 11, 2025
Lunduke taking Veteran's Day off

Today, we honor our veterans and their service to our nation.

Great men, like my grandfather who, during World War II, joined the Navy at 14 years old. He was a big, older-looking teenager… so, as was not unheard of, he lied about his age on the paperwork in order to go fight the Axis.

And his father, who joined in the year leading up to the start of World War I.

I am taking this Veteran’s Day off. In part to spend time helping my children learn about their family’s US military history (which goes back, on multiple lines, to the very beginning of our nation). And in part… to watch one of the greatest movies ever made, The Great Escape. Because, hey, Steve McQueen and James Garner! Pretty sure my Grandpa would approve.

Lunduke Journal shows will resume tomorrow (and I’ve got an awesome one lined up).

In the meantime, if you haven’t watched yesterday’s DHH interview yet, highly recommended. Watch (or listen) to it anywhere you like.

And, in the grand tradition of “Veterans Day Sales”, I’ve extended the 50% off all Lunduke Journal subscriptions discount through this coming Friday. Because I can. Pretty sure my Grandpa would approve of that too.

-Lunduke

Read full Article
See More
Available on mobile and TV devices
google store google store app store app store
google store google store app tv store app tv store amazon store amazon store roku store roku store
Powered by Locals