[论文解读] Block Oriented Programming: Automating Data-Only Attacks
该论文提出了BOPC,一种针对经过控制流完整性(CFI)和影子栈加固的二进制程序的自动化纯数据攻击框架。BOPC通过块导向编程(BOP)将高级别漏洞利用载荷编译为可执行程序跟踪。BOPC通过在基本块上进行启发式引导搜索,将图灵完备的SPL载荷映射为有效执行轨迹,在10个真实世界应用程序中实现了81%的漏洞利用生成成功率。
With the widespread deployment of Control-Flow Integrity (CFI), control-flow hijacking attacks, and consequently code reuse attacks, are significantly more difficult. CFI limits control flow to well-known locations, severely restricting arbitrary code execution. Assessing the remaining attack surface of an application under advanced control-flow hijack defenses such as CFI and shadow stacks remains an open problem. We introduce BOPC, a mechanism to automatically assess whether an attacker can execute arbitrary code on a binary hardened with CFI/shadow stack defenses. BOPC computes exploits for a target program from payload specifications written in a Turing-complete, high-level language called SPL that abstracts away architecture and program-specific details. SPL payloads are compiled into a program trace that executes the desired behavior on top of the target binary. The input for BOPC is an SPL payload, a starting point (e.g., from a fuzzer crash) and an arbitrary memory write primitive that allows application state corruption. To map SPL payloads to a program trace, BOPC introduces Block Oriented Programming (BOP), a new code reuse technique that utilizes entire basic blocks as gadgets along valid execution paths in the program, i.e., without violating CFI or shadow stack policies. We find that the problem of mapping payloads to program traces is NP-hard, so BOPC first reduces the search space by pruning infeasible paths and then uses heuristics to guide the search to probable paths. BOPC encodes the BOP payload as a set of memory writes. We execute 13 SPL payloads applied to 10 popular applications. BOPC successfully finds payloads and complex execution traces -- which would likely not have been found through manual analysis -- while following the target's Control-Flow Graph under an ideal CFI policy in 81% of the cases.
研究动机与目标
- 自动化构建受强控制流保护机制(如CFI和影子栈)保护的二进制程序的纯数据漏洞利用。
- 减少在CFI约束下手工构造复杂、路径依赖型漏洞利用所需的工作量。
- 评估在部署先进控制流完整性机制后,现代二进制程序仍存在的攻击面。
- 通过高层语言抽象,实现复杂漏洞利用行为(包括循环和条件判断)的自动合成。
- 证明即使在CFI保护下,通过系统化、自动化的载荷生成,纯数据代码复用攻击依然可行。
提出的方法
- BOPC使用一种名为SPL(攻击语言)的高层、图灵完备语言来表达攻击者指定的行为,从而抽象出架构和程序特定细节。
- 它将SPL载荷编译为单条语句的约束,并在目标二进制程序中搜索满足这些约束的基本块,形成候选功能块。
- BOPC采用启发式驱动的搜索策略,通过寄存器和内存的资源与状态映射,剪枝不可行路径并优先选择高概率执行轨迹。
- 通过遵循有效控制流图(CFG)路径且不违反CFI或影子栈策略的分发器块,将功能块连接起来,构建端到端的执行轨迹。
- 通过配置载荷排列数、块长度、子图大小和分发器路径数量的上限,将NP难的映射问题简化。
- 使用符号执行验证路径可行性,通过丢弃无效路径来检测并处理异常(如空指针解引用)。
实验结果
研究问题
- RQ1是否可以在受CFI和影子栈保护的二进制程序上自动生成纯数据代码复用攻击?
- RQ2像SPL这样的高层语言在CFI保护环境下,能在多大程度上表达复杂漏洞利用行为(如循环和条件判断)?
- RQ3在CFI约束下,启发式引导搜索策略在解决SPL载荷到有效CFG轨迹映射的NP难问题中有多高效?
- RQ4在理想CFI策略下,使用自动化技术能成功合成并执行多少比例的复杂漏洞利用载荷?
- RQ5BOPC能否发现通过手动逆向工程难以找到的漏洞利用链?
主要发现
- BOPC在10个流行应用程序的13种不同SPL载荷上成功生成了有效执行轨迹,在理想CFI策略下成功率高达81%。
- 该框架证明了在CFI约束下自动化构建复杂漏洞利用(包括循环和条件逻辑)的可行性,而这类利用手动构造极为困难。
- 使用高层SPL语言使攻击者能够抽象出底层架构和程序特定细节,从而简化漏洞利用的指定过程。
- BOPC通过启发式方法有效剪枝不可行执行路径,并优先选择高概率轨迹,实现在合理时间限制内的可扩展搜索。
- 原型在符号执行过程中成功处理了异常情况(如空指针解引用),通过丢弃无效路径并探索替代路径实现容错。
- 评估结果表明,即使在强控制流防御下,纯数据攻击依然是一个可行的威胁面,尤其当结合自动化载荷合成技术时更为显著。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。