Block Oriented Programming: Automating Data-Only Attacks
Kyriakos K. Ispoglou, Bader AlBassam, Trent Jaeger, Mathias Payer
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 57 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 Efficient Protection of Path-Sensitive Control Security
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
- KEPLER: Facilitating Control-flow Hijacking Primitive Evaluation for Linux Kernel Vulnerabilities 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- KEPLER: Facilitating Control-flow Hijacking Primitive Evaluation for Linux Kernel Vulnerabilities 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
- SoK: Shining Light on Shadow Stacks 引用了 Efficient Protection of Path-Sensitive Control Security
- SoK: Shining Light on Shadow Stacks 引用了 The Dynamics of Innocent Flesh on the Bone: Code Reuse Ten Years Later
- xMP: Selective Memory Protection for Kernel and User Space 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- The Dynamics of Innocent Flesh on the Bone: Code Reuse Ten Years Later 引用了 Data-Oriented Programming: On the Expressiveness of Non-control Data Attacks
- SLAKE: Facilitating Slab Manipulation for Exploiting Vulnerabilities in the Linux Kernel 引用了 KEPLER: Facilitating Control-flow Hijacking Primitive Evaluation for Linux Kernel Vulnerabilities
- SLAKE: Facilitating Slab Manipulation for Exploiting Vulnerabilities in the Linux Kernel 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
引用它的顶会 Paper57
- SoK: Shining Light on Shadow StacksNathan Burow, Xinping Zhang, Mathias PayerS&P 2019 · 170 次引用
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 次引用
- xMP: Selective Memory Protection for Kernel and User SpaceSergej Proskurin, Marius Momeu, Seyedhamed Ghavamnia, Vasileios P. Kemerlis 等S&P 2020 · 89 次引用
- SLAKE: Facilitating Slab Manipulation for Exploiting Vulnerabilities in the Linux KernelYueqi Chen, Xinyu XingCCS 2019 · 76 次引用
- KEPLER: Facilitating Control-flow Hijacking Primitive Evaluation for Linux Kernel VulnerabilitiesWei Wu, Yueqi Chen, Xinyu Xing, Wei ZouUSENIX Security 2019 · 75 次引用
它引用的 Paper4
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
- Data-Oriented Programming: On the Expressiveness of Non-control Data AttacksHong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua 等S&P 2016 · 420 次引用
- Efficient Protection of Path-Sensitive Control SecurityRen Ding, Chenxiong Qian, Chengyu Song, William Harris 等USENIX Security 2017 · 123 次引用
- The Dynamics of Innocent Flesh on the Bone: Code Reuse Ten Years LaterVictor van der Veen, Dennis Andriesse, Manolis Stamatogiannakis, Xi Chen 等CCS 2017 · 74 次引用
相关 Paper
- A Generic Technique for Automatically Finding Defense-Aware Code Reuse AttacksEdward J. Schwartz, Cory F. Cohen, Jeffrey Gennari, Stephanie SchwartzCCS 2020 · 8 次引用
- Crashing Through Defenses: Exploiting Segfaults and Chaining Around Intel CETMarcos Bajo, Ritvik Goyal, Apostolos Chatzianagnostou, Christian RossowS&P 2026
- Await() a Second: Evading Control Flow Integrity by Hijacking C++ CoroutinesMarcos Bajo, Christian RossowUSENIX Security 2025
- Burn after reading: a shadow stack with microsecond-level runtime rerandomization for protecting return addressesChangwei Zou, Jingling XueICSE 2020 · 6 次引用
- SpecCFI: Mitigating Spectre Attacks using CFI Informed SpeculationEsmaeil Mohammadian Koruyeh, Shirin Haji Amin Shirazi, Khaled N. Khasawneh, Chengyu Song 等S&P 2020 · 74 次引用
