面向遗留密码可执行文件的自动扩充和插装:扩展版本
Towards Automated Augmentation and Instrumentation of Legacy Cryptographic Executables: Extended Version
摘要:
加密库中的实现缺陷、底层加密原语中的设计缺陷以及使用两者的协议中的弱点都可能导致软件中的可利用漏洞。手动修复此类问题具有挑战性且消耗资源,特别是在维护包含损坏或过时的密码学的遗留软件时,并且其源代码可能不可用。虽然存在识别密码原语的现有工作(通常在恶意软件分析的上下文中),但是这些先前的工作都没有集中于在识别出这些原语之后用更强(或更安全)的原语替换这些原语。本文探讨了设计和实现加密可执行文件的增强和遗留软件插装(ALICE)工具链的可行性。ALICE的主要特点是:(i)从二进制文件中自动检测和提取弱的或损坏的密码原语的实现,而不需要源代码或调试符号,(ii)识别使用这些原语的上下文和范围,并执行程序分析以确定用更安全的实现替换这些实现的效果,以及(iii)用更强或更安全的原语的实现替换弱原语的实现。我们证明了我们的方法的实际可行性加密哈希函数与几个流行的加密库和现实世界中的各种复杂程度的程序。我们的实验结果表明,ALICE可以定位和替换不安全的散列函数,即使在大型二进制文件(我们测试的大小高达1.5MB),同时保留现有的功能的原始二进制文件,而在重写的二进制文件中产生最小的执行时间开销。我们还在https://github.com/SRI-CSL/ALICE上开源了ALICE的代码。
英文摘要:
Implementation flaws in cryptographic libraries, design flaws in underlying cryptographic primitives, and weaknesses in protocols using both, can all lead to exploitable vulnerabilities in software. Manually fixing such issues is challenging and resource consuming, especially when maintaining legacy software that contains broken or outdated cryptography, and for which source code may not be available. While there is existing work on identifying cryptographic primitives (often in the context of malware analysis), none of this prior work has focused on replacing such primitives with stronger (or more secure ones) after they have been identified. This paper explores feasibility of designing and implementing a toolchain for Augmentation and Legacy-software Instrumentation of Cryptographic Executables (ALICE). The key features of ALICE are: (i) automatically detecting and extracting implementations of weak or broken cryptographic primitives from binaries without requiring source code or debugging symbols, (ii) identifying the context and scope in which such primitives are used, and performing program analysis to determine the effects of replacing such implementations with more secure ones, and (iii) replacing implementations of weak primitives with those of stronger or more secure ones. We demonstrate practical feasibility of our approach on cryptographic hash functions with several popular cryptographic libraries and real-world programs of various levels of complexity. Our experimental results show that ALICE can locate and replace insecure hash functions, even in large binaries (we tested ones of size up to 1.5MB), while preserving existing functionality of the original binaries, and while incurring minimal execution-time overhead in the rewritten binaries. We also open source ALICE's code at https://github.com/SRI-CSL/ALICE.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。