The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: tuhs@tuhs.org
Subject: [TUHS] trusting trust code
Date: Wed, 25 Oct 2023 21:55:33 -0400	[thread overview]
Message-ID: <CADSkJJWwQxgt6rUFFn3SOuc+B+WpD1rm_eseSRsgW31UYMkMbA@mail.gmail.com> (raw)

Hi all,

Ken mailed me the code for the compiler backdoor.
I have annotated it and posted it at https://research.swtch.com/nih.

As part of the post, I wrote a new simulator that can run V6 binaries.
The simulator is a halfway point between the designs of simh and apout.
It is running a translation of the V6 kernel to Go (with no hardware)
and running user binaries on a simulated PDP11 CPU. The result combines
apout's "easy to run" with simh's "v6-specific system calls work".
In particular, it is good enough to run the backdoored login command,
which apout simply cannot due to host OS tty handling not being like V6,
and without having to fuss with disk pack images like in simh.

If you have Go installed locally, you can run the new simulator with
    go run rsc.io/unix/v6run@latest
You can also run it in your browser at https://research.swtch.com/v6.

Finally, it turns out that the backdoor code was published this summer
in the TUHS archive, but no one noticed. It is in dmr_tapes.tgz [1] in the file
dmr_tapes/ken-sky/tp/nih.a. It is also visible in the dmr_tapes/ken/bits
tape image, although not in the extracted files.

Enjoy!

Best,
Russ

[1] https://www.tuhs.org/Archive/Applications/Dennis_Tapes/

             reply	other threads:[~2023-10-26  1:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26  1:55 Russ Cox [this message]
2023-10-26  4:31 ` [TUHS] " A. P. Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADSkJJWwQxgt6rUFFn3SOuc+B+WpD1rm_eseSRsgW31UYMkMbA@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).