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
GNOME Celebrates Non-Binary People's Day

The largest Linux Desktop Environment says "Non-binary people are valid and welcome", but Conservatives are banned.

Get on The Wall with a Massively Discounted Lifetime Sub:
https://lunduke.substack.com/p/50-off-yearly-and-massively-discounted

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

00:25:04
German Tech Journalist Attacks Lunduke... and it's Awesome

"He refers to a trans woman as a man in a dress," says Tech Journalist in hit piece that makes Lunduke sound amazing.

NeXTStep, Emacs, Desqview/X, & TRS-80 Model 100 Walls:
https://lunduke.locals.com/post/8056105/trs-80-model-100-joins-the-lunduke-journal-lifetime-wall-party

Get on The Wall with a Massively Discounted Lifetime Sub:
https://lunduke.substack.com/p/50-off-yearly-and-massively-discounted

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

00:13:35
40% of LinkedIn (& Sneako) Publishing AI Generated Posts

Dead. Internet. Theory. It's real.

NeXTStep, Emacs, Desqview/X, & TRS-80 Model 100 Walls:
https://lunduke.locals.com/post/8056105/trs-80-model-100-joins-the-lunduke-journal-lifetime-wall-party

Get on The Wall with a Massively Discounted Lifetime Sub:
https://lunduke.substack.com/p/50-off-yearly-and-massively-discounted

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

00:15:02
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
12 hours ago

Popcorn time: Bun, Zig, Rust, AI - public cat fight

Zig is a cool, fast, small language and its Founder/leader hates AI.

Bun is a wildly popular, brutally fast JavaScript and TypeScript runtime (designed as a drop-in replacement for Node.js). Created by Jarred Sumner.

Bun is far and away the most popular application written in Zig. Bun was bought by Anthropic and it wasn't long before "rewrite the whole app in Rust".

Oooh...so tasty for us here. Zig/non-AI standard barrier vs Rust Infestation AND AI infestation.

I'm going to ignore the mud slinging - but OOH BOY - the Zig guy went full on personal attack against Jarred.

What I'm interested in -- one million or so lines of code rewritten by 64 instances of Claude in 11 days! $165k of tokens if you had to pay for that. Nice to be owned by Anthropic.

Still, if you are using Claude Code, you are already using the Rust version and didn't miss a beat. 11 Days!

Someone put for the notion that AI can't be used on large code bases. Whelp,...

Anyone else going to the SE Michigan Vintage Computer Club meeting on July 18th?

(I already posted this on the forum.)

Next weekend, I’m traveling across the state to check out the SE Michigan Vintage Computer Club. I’m going to be bringing a couple of my retro systems, including a TRS-80 Model III and my Compaq Portable. Anyone else planning to go? We could have a mini Lunduke meeting in the corner.

https://semichiganvcc.blogspot.com/2026/05/se-michigan-vintage-computer-club-ver.html

Seems that Elon is not scared of showing the source code...
Use AI to find and fix vulnerabilities if you want, but saying that because AI can hack better, the source code has to be closed is nonsensical (AI could as well disassemble the binaries, and generate source code anyway).
https://x.com/elonmusk/status/2077361679034118271?s=20

post photo preview
TRS-80 Model 100 joins The Lunduke Journal Lifetime Wall party!

Buckle up, Buttercup. Because The Lunduke Journal is about to blow your mind.

  1. The “BeOS” Wall Lifetime Subscriber Wall is now full (see all of them on Lunduke.com)!

  2. We’ve added a new “TRS-80 Model 100” Wall (because we can)! That’s the 19th Lifetime Subscriber Wall! 19!

  3. The discounted Lifetime Lunduke Journal Subscriptions are still available through to the end of this month (July).

Which means there are, as of this exact moment, 4 Walls with space available (see Lunduke.com for the full list of Walls). But these fill up wicked fast.

  1. Emacs (only a few spots left)

  2. Desqview/X (a little less than 2/3rd’s full)

  3. NeXTStep (still plenty of space)

  4. TRS-80 Model 100 (just launched)

 

Nice, right?

Worth noting: The “TRS-80 Model 100” has very limited screen resolution (240 x 64), which means only a small number of names can fit on that wall. If you want on it, I’d let me know right away.

Grab a discounted Lifetime Subscription (if you don’t already have one), then let me know (email “bryan at lunduke.com”) which Wall you’d like to see your name on.

Huge high five to everyone who has already added their name to a Wall. At the current rate, we’ll have over 20 retro computer themed walls, filled with all of your names, by the end of the month.

And, doggone it, that’s amazing.

-Lunduke

Read full Article
Vim beats Emacs!

Well, we’ve done it.

We’ve answered the eternal question: “Which Lunduke Journal Lifetime Subscriber Wall would fill with names quicker? Emacs or Vim?”

The answer, it turns out, is “Vim”. And it takes just 8 days.

 

A hearty “Thank You” to everyone who supports The Lunduke Journal by getting Lifetime Subscriptions (massively discounted throughout July) and getting on these walls! You make all of this possible!

Now. How long will it take for Emacs to fill up (matching the same number of names as the Vim Wall)?

Well, right now the Emacs Wall is a hair over 2/3rds of the way full. So we’ll find out!

Welcome NeXTStep Wall!

With the closing of the “Vim” Wall (and the BeOS Wall only having the space for 1 name left), now seemed like a good time to add a new retro computer wall: The NeXTStep 1.0 Wall.

Right now, there are 4 Walls available to add your name to (*cough* massive discount *cough*).

  • NeXTStep (just opened)

  • Emacs (about 2/3rds full)

  • BeOS R5 (1 spot left)

  • Desqview/X (1/2 full)

 

Once again, huge thanks to everyone who supports The Lunduke Journal!

-Lunduke

Read full Article
Lunduke's Week in Tech : June 28 - July 4, 2026

Lunduke’s Thoughts of The Week

Yesterday was the 4th of July.

As such, time that I normally would have spent writing up some thoughts on the Tech News of the Week (tm) was, instead, spent eating hamburgers, watching fireworks, and generally goofing off with my kids.

So allow me to briefly summarize my thoughts using as little effort as possible:

Rust is weird, Sony sucks, and America is awesome.

… Yup. That just about covers it.

I hope all of my fellow Americans had a truly splendid Independence Day.

Biggest Tech Stories - June 28 - July 4, 2026

Here are the major stories from the last week, with direct links to X and Substack.

See Lunduke.com for all other platforms (Rumble, RSS Audio Podcast, etc.).

  • Git Takes Another Step Towards Making Rust Mandatory (X, Substack)

  • 74 Million User Accounts Exposed in Breaches During June (X, Substack)

  • BCacheFS Adding Rust Dependency Even Though “Rust doesn’t have a stable ABI” (X, Substack)

  • Git Without Rust From Dev of XLibre (X, Substack)

  • Sony Says No More Physical PlayStation Games (X, Substack)

  • Ubuntu Sponsors Rust Clone Foundation (X, Substack)

  • Like Computers? Thank America. (X, Substack)

Huge thank you to all of The Lunduke Journal’s subscribers. You make all of this possible.

-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