HackerPapers

arXiv:1004.5534cs.CR

Fully Countering Trusting Trust through Diverse Double-Compiling

David A. Wheeler

Abstract

An Air Force evaluation of Multics, and Ken Thompson's Turing award lecture ("Reflections on Trusting Trust"), showed that compilers can be subverted to insert malicious Trojan horses into critical software, including themselves. If this "trusting trust" attack goes undetected, even complete analysis of a system's source code will not find the malicious code that is running. Previously-known countermeasures have been grossly inadequate. If this attack cannot be countered, attackers can quietly subvert entire classes of computer systems, gaining complete control over financial, infrastructure, military, and/or business systems worldwide. This dissertation's thesis is that the trusting trust attack can be detected and effectively countered using the "Diverse Double-Compiling" (DDC) technique, as demonstrated by (1) a formal proof that DDC can determine if source code and generated executable code correspond, (2) a demonstration of DDC with four compilers (a small C compiler, a small Lisp compiler, a small maliciously corrupted Lisp compiler, and a large industrial-strength C compiler, GCC), and (3) a description of approaches for applying DDC in various real-world scenarios. In the DDC technique, source code is compiled twice: the source code of the compiler's parent is compiled using a trusted compiler, and then the putative compiler source code is compiled using the result of the first compilation. If the DDC result is bit-for-bit identical with the original compiler-under-test's executable, and certain other assumptions hold, then the compiler-under-test's executable corresponds with its putative source code.

arXiv comments
PhD dissertation. Accepted by George Mason University, Fairfax, Virginia, USA's Volgenau School of Information Technology and Engineering in 2009. 199 single-side printed pages.
Journal reference
DOI
Subjects
cs.CRCryptography and Security cs.PLProgramming Languages

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 3 threads, from Dec 2017 to Apr 2026. Found in 1 HN submission from Mar 2024 to Mar 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • A shell is almost always used to setup the bootstrap environment, so the dependency on a shell is more or less always there. Otherwise, something special with POSIX shell is its large number of independent implementations, making it the ideal starting point for diverse…

      laurenthView on HNParent context

    • Reflect in what way? The primary focus of that talk is that it’s possible to infect the binary of a compiler in a way that source analysis won’t reveal and the binary self replicates the vulnerability into other binaries it generates. Thankfully that particular problem was…

      vlovich123View on HNParent context

  1. Writing a C Compiler, Part 1 1 comment
    • See David Wheeler's work on "Diverse Double Compiling". What the parent describes seems to be similar. https://arxiv.org/abs/1004.5534

      dllthomasView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.