[论文解读] Cryptographic Path Hardening: Hiding Vulnerabilities in Software through Cryptography
本文提出密码路径加固(Cryptographic Path Hardening)技术,通过将敏感的条件判断替换为可证明安全的混淆加密检查(如哈希比较),隐藏软件漏洞,使攻击者无法通过静态分析逆向推导出利用条件。该方法可在不暴露确切触发条件的前提下实现安全的补丁分发,显著提高攻击者开发利用代码的成本,超出资源受限攻击者的承受能力。
We propose a novel approach to improving software security called Cryptographic Path Hardening, which is aimed at hiding security vulnerabilities in software from attackers through the use of provably secure and obfuscated cryptographic devices to harden paths in programs. By "harden" we mean that certain error-checking if-conditionals in a given program P are replaced by equivalent" we mean that adversaries cannot use semi-automatic program analysis techniques to reason about the hardened program paths and thus cannot discover as-yet-unknown errors along those paths, except perhaps through black-box dictionary attacks or random testing (which we can never prevent). Other than these unpreventable attack methods, we can make program analysis aimed at error-finding "provably hard" for a resource-bounded attacker, in the same sense that cryptographic schemes are hard to break. Unlike security-through-obscurity, in Cryptographic Path Hardening we use provably-secure crypto devices to hide errors and our mathematical arguments of security are the same as the standard ones used in cryptography. One application of Cryptographic Path Hardening is that software patches or filters often reveal enough information to an attacker that they can be used to construct error-revealing inputs to exploit an unpatched version of the program. By "hardening" the patch we make it difficult for the attacker to analyze the patched program to construct error-revealing inputs, and thus prevent him from potentially constructing exploits.
研究动机与目标
- 解决公开补丁或过滤器暴露利用条件的风险,防止攻击者针对未打补丁的系统发起攻击。
- 开发一种方法,使针对错误触发输入的程序分析在计算上变得不可行,其难度等同于破解密码学方案。
- 提供一种实用且可部署的技术,用于加固输入过滤器和补丁,同时保持程序正确性不变。
- 通过隐藏触发漏洞的确切条件,实现软件补丁的安全分发。
- 推动软件安全模型向对攻击者而言漏洞检测计算成本高昂的方向演进,而非依赖隐蔽性或形式化验证。
提出的方法
- 将易受攻击的 if 条件替换为使用可证明安全的哈希函数(如 SHA-256 或混淆的哈希原原子)实现的等价检查。
- 预先计算已知恶意输入(如 '2250738585072011')的哈希值,并通过循环哈希比较来匹配输入子串。
- 使用析取式哈希比较来替代检查是否属于小数值集合(如 x == v_i)的条件判断。
- 通过依赖密码学哈希函数的抗碰撞性来保证正确性,使误报概率极低。
- 通过确保加固版本的运行时间与输入大小呈线性关系,仅引入常数倍的性能开销,从而保持多项式时间效率。
- 利用密码学假设(如离散对数、整数分解)形式化论证:逆向破解加固检查的难度等同于破解标准密码原 primitive。
实验结果
研究问题
- RQ1能否使用密码混淆技术隐藏软件补丁中触发漏洞的确切条件?
- RQ2是否可以设计一种加固后的条件判断,使其在静态分析或黑盒测试下均无法被逆向推导?
- RQ3如何确保加固后的条件判断在引入最小性能开销的同时保持程序正确性?
- RQ4当应用于真实漏洞(如 PHP 浮点数解析错误)时,该方法的实际限制是什么?
- RQ5该技术能否推广用于隐藏程序中除输入过滤器外的其他不可观测常量?
主要发现
- 针对 PHP 漏洞的加固过滤器能以可忽略的误报概率正确识别恶意输入,其上限由所选哈希函数的抗碰撞性决定。
- 加固过滤器的性能开销仅为原始版本的常数倍,且两者运行时间均与输入长度呈线性关系。
- 攻击者无法在不反转 128 位哈希或执行暴力搜索的情况下恢复出恶意子串 '2250738585072011',而这两者在计算上均不可行。
- 该方法成功阻止了半自动分析工具推导出触发利用的输入,因为加固后的条件判断在不知晓预计算哈希值的情况下,与随机计算无异。
- 该方法适用于检查小集合值或子串的任何条件判断,尤其适用于那些难以猜测的值。
- 该技术提供了与现代密码学相同的可证明安全保证,使利用发现的难度等同于破解标准假设(如哈希抗碰撞性)。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。