[论文解读] Fully Countering Trusting Trust through Diverse Double-Compiling
本文提出Diverse Double-Compiling(DDC)技术,用于检测并抵御‘信任信任’攻击——即编译器被篡改后在编译后的代码中植入后门。通过使用不同编译器对编译器源代码进行两次编译,并验证输出结果在位级别完全一致,DDC确保编译后的二进制文件忠实反映其源代码,从而提供形式化证明,并在包括GCC和恶意变体在内的多种编译器上实现经验验证。
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.
研究动机与目标
- 为解决‘信任信任’攻击带来的关键安全漏洞,此类攻击中编译器可能在编译后的软件中无声植入后门。
- 克服现有对策的局限性,即使在完全检查源代码的情况下,这些对策仍无法检测到恶意编译器。
- 提供一种实用且可验证的方法,确保编译器的二进制输出与源代码完全一致。
- 在多种编译器类型(包括工业级和恶意修改的编译器)上,证明DDC的可行性和正确性。
- 通过验证编译器的完整性,无需信任编译器的源代码或构建过程,从而实现对关键软件系统的信任。
提出的方法
- 使用可信编译器编译父级(可信)编译器的源代码,生成可信二进制文件。
- 使用该可信二进制文件编译目标编译器(可能被恶意篡改)的源代码,生成第二个二进制文件。
- 将第二次编译生成的二进制文件与待测目标编译器的原始二进制文件进行比较。
- 若两个二进制文件在位级别完全相同,且在既定假设下成立,则目标编译器的二进制文件在密码学上与源代码绑定。
- 在两次编译步骤中使用不同编译器(例如不同语言实现或版本),以防止引入相同的后门。
- 应用形式化验证技术,证明DDC能够检测源代码与二进制文件之间的任何差异,从而检测篡改行为。
实验结果
研究问题
- RQ1能否构建一种形式化方法,以验证编译器二进制文件是否忠实实现其源代码,即使该编译器可能被恶意篡改?
- RQ2DDC技术能否检测并防止‘信任信任’攻击,即编译器在编译软件时插入后门?
- RQ3DDC在不同类型的编译器上是否有效,包括小型自定义编译器和大型工业级编译器(如GCC)?
- RQ4DDC成立所必需的假设是什么?这些假设在实践中如何验证?
- RQ5DDC能否在真实世界系统中实际应用,以确保对关键软件和编译工具链的信任?
主要发现
- Diverse Double-Compiling(DDC)技术提供了形式化证明,表明其能够检测编译器源代码与编译后二进制文件之间的任何差异。
- 经验评估证实,DDC成功检测到一个被恶意修改的Lisp编译器,该编译器在编译代码中植入了后门。
- DDC已成功应用于四种编译器:一个小型C编译器、一个小型Lisp编译器、一个被恶意破坏的Lisp编译器以及GCC,证明了其广泛适用性。
- 当未发生篡改时,DDC输出与原始编译器二进制文件之间的逐位二进制比较确认了正确性。
- 即使第二个编译器不可信,只要第一个编译器可信且与第二个编译器不同,该方法依然有效。
- 该方法可在无需访问或信任编译器源代码或构建过程的前提下,实现对编译器完整性的全面验证。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。