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
Open Source Exemption Added to Colorado Age Verification Bill

According to System76's CEO, who has seen the amended Colorado SB26-051, Linux, GitHub, and other Open Source projects and systems would not require Age Verification.

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

00:20:15
Illinois Operating System Age Verification Law Passes House, Moves to Senate

Illinois HB 5511, which would require all Operating Systems (Linux, Windows, etc.) to include Age Verification, is moving closer to becoming law. And it's a really WEIRD one.

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

00:16:18
Arch Linux Deletes XLibre Wiki Page, Cites "Code of Conduct"

"The XLibre project goes against [Arch Linux Code of Conduct] and should not be listed on ArchWiki."

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

00:17:16
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
Last call for the "Amiga" Lifetime Subscriber Wall. It's almost full!

Holy smokes, that was fast.

The 6th Lunduke Journal Lifetime Subscriber Wall (aka the “Amiga OS 3.1” Wall) was introduced… what… a week ago?

I kid you not, the darn thing is already almost full! I was wildly unprepared for how popular this would be!

There’s enough space left for maybe 5 or 6 more names. Tops. Then I’ve gotta declare “Wall 6 (Amiga) is Full” and start Wall Number 7!

Here’s what all of the Lifetime Subscriber Walls look like (each shown at the end of every Lunduke Journal video):

 

If you want to get onto the Lifetime Subscriber Wall (and have any chance of making it onto the Amiga Wall before it’s full) here’s what you need to do (and do it quickly):

  1. Grab a Lifetime Subscription to The Lunduke Journal (if you don’t already have one).

    1. A Lifetime Sub includes all the standard perks (plus a few) and can be picked up via Locals, Substack, or Bitcoin (whichever you prefer).

  2. Email “bryan at lunduke.com” and let me know how you would like your name displayed (“Joe A.”, “Joseph Arnold”, “JoeyPants”, “SirJJMcManly”, etc.)

It’s first come, first served.

If you’ve already emailed me about being added to the wall, your spot is secured.

For the rest of you: Chop chop. At the current rate, I would be very surprised if the “Amiga Wall” wasn’t full by some time this weekend.

“Lifetime Wall 7” will be unveiled after the final name is added to the Amiga Wall. And, yes, it will be a different (awesome) retro computing platform.

As always, a huge thank you to every subscriber to The Lunduke Journal. Absolutely none of this would be possible without your support.

-Lunduke

Read full Article
post photo preview
Amiga Lifetime Wall & March Lunduke Journal Stats!

Hello all of you amazing Lunduke Journal subscribers!

With March now behind us, I wanted to give you crazy kids a quick “behind the scenes” look at the stats for The Lunduke Journal. Because Inside Baseball stuff is fun.

The Amiga Wall!

But before we dive into charts and numbers… behold! The brand new 6th Lifetime Subscriber Wall of Shame Awesomeness! The AmigaOS 3.1 Wall!

 

Every Lifetime Subscriber Wall (which I show at the end of each video) is a real screenshot from a different computing platform. Mostly retro. All awesome.

 

If you’d like to see your name listed on the new AmigaOS 3.1 wall, grab a Lifetime Subscription (if you don’t already have one) and toss me an email. I update the walls about once each week with new names.

The last few Lifetime Walls filled up incredibly quickly. So if the Amiga Wall interests you, I wouldn’t wait too long. Hint, hint.

March 2026 Stats

The big news: Total “views” were way, way up in March.

A fair bit beyond what was anticipated. A hair over 19 million during the month.

 

That’s in total, across all platforms. As usual, the audio podcast and X lead the way in terms of total views/listens for shows (by quite a lot).

Interestingly, we saw significant “views” growth on even the smallest platforms in March (Facebook and TikTok).

Free subscribers also took a major jump in March, with the largest one month gains ever (I’m pretty sure, certainly the largest this year or last). Up 7,623 over the month before.

 

Again, new subscribers grew across the board. The biggest gains were seen on X, but all platforms saw a significant bump.

Hard to complain about that!

The top 3 shows for March were all focused on the Age Verification laws:

While those were the top 3… it’s worth noting that the top 10 (and, really, the top 15 or so) shows for the month were all incredibly close in terms of viewership numbers.

As always, a huge thank you to all of The Lunduke Journal subscribers. You make all of this possible.

-Lunduke

Read full Article
Lifetime Wall Number 6, Plus How to Access MP4s & Forum

A few quick reminders for all of you amazing Lunduke Journal subscribers:

First: If you have any kind of payed subscription (Monthly, Yearly, or Lifetime) there are a bunch of cool perks available to you. MP4 Downloads, PDF eBooks, and access to the Lunduke Journal Forum. All the details on how to gain access to everything is right here.

Enjoy.

Second: At the end of this next week I’ll be unveiling “Lifetime Subscriber Wall of Shame” number Six at the end of all new Lunduke Journal videos.

 

At that same time I will be updating and permanently locking down Walls 1 through 5.

If you are already a Lifetime Subscriber, and would like to be added to the new Wall number 6 (or to one of the couple remaining spots on Walls 4 and 5), email me (bryan at lunduke.com) with how you would like your name to be displayed (full name, first name only, nick name… any way you like).

  1. CRT Linux Pico Wall: Full

  2. DOS Word Wall: Full

  3. Win 3.11 Notepad Wall: Full

  4. MacOS 9 Wall: 2 Spots Left

  5. PalmOS Wall: 1 Spot Left

  6. Mystery Wall: Open

Those final spots on the MacOS and PalmOS Walls are first come first served. The first people to request those spots get them.

Everyone else will roll over into Wall 6. Which is a secret, retro computer platform. You’ll dig it.

If you have already contacted me regarding being added to one of these walls (or changing the way your name is displayed), I’ve already got you on the list for the changes later this next week.

If you don’t already have a Lifetime Subscription, grab one and get yourself on the wall.

It’s pretty sweet.

-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