Skip to main content
QUICK REVIEW

[Paper Review] Block Oriented Programming: Automating Data-Only Attacks

Kyriakos K. Ispoglou, Bader AlBassam|arXiv (Cornell University)|May 12, 2018
Security and Verification in ComputingComputer Science43 references11 citations
TL;DR

This paper introduces BOPC, a framework that automates data-only attacks on binaries hardened with Control-Flow Integrity (CFI) and shadow stacks by compiling high-level exploit payloads into executable program traces using Block-Oriented Programming (BOP). BOPC maps Turing-complete SPL payloads to valid execution traces through heuristic-guided search over basic blocks, achieving successful exploit generation in 81% of cases across 10 real-world applications.

ABSTRACT

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.

Motivation & Objective

  • To automate the construction of data-only exploits on binaries protected by strong control-flow defenses like CFI and shadow stacks.
  • To reduce the manual effort required to craft complex, path-dependent exploits under CFI constraints.
  • To evaluate the remaining attack surface of modern binaries after deployment of advanced control-flow integrity mechanisms.
  • To enable automatic synthesis of complex exploit behaviors, including loops and conditionals, through a high-level language abstraction.
  • To demonstrate that even with CFI, data-only code reuse attacks remain feasible through systematic, automated payload generation.

Proposed method

  • BOPC uses a high-level, Turing-complete language called SPL (SPloit Language) to express attacker-specified behaviors, abstracting from architecture and program-specific details.
  • It compiles SPL payloads into constraints for individual statements and searches for basic blocks in the target binary that satisfy these constraints, forming candidate functional blocks.
  • BOPC employs a heuristic-driven search to prune infeasible paths and prioritize probable execution traces, guided by resource and state mappings for registers and memory.
  • It constructs end-to-end execution traces by connecting functional blocks through dispatcher blocks that follow valid CFG paths without violating CFI or shadow stack policies.
  • The framework reduces the NP-hard mapping problem by applying configurable upper bounds on payload permutations, block lengths, subgraph sizes, and dispatcher path counts.
  • Symbolic execution is used to validate path feasibility, and exceptions (e.g., null pointer dereferences) are detected and handled by discarding invalid paths.

Experimental results

Research questions

  • RQ1Can data-only code reuse attacks be automatically generated on binaries protected by CFI and shadow stacks?
  • RQ2To what extent can a high-level language like SPL express complex exploit behaviors such as loops and conditionals in a CFI-protected environment?
  • RQ3How effective is a heuristic-guided search strategy in navigating the NP-hard problem of mapping SPL payloads to valid CFG traces under CFI constraints?
  • RQ4What fraction of complex exploit payloads can be successfully synthesized and executed under ideal CFI policies using automated techniques?
  • RQ5Can BOPC discover exploit chains that would be infeasible to find through manual reverse engineering?

Key findings

  • BOPC successfully generated valid execution traces for 13 diverse SPL payloads across 10 popular applications, achieving a success rate of 81% under ideal CFI policies.
  • The framework demonstrated feasibility in automating complex exploit construction, including loops and conditional logic, which are difficult to achieve manually under CFI constraints.
  • The use of a high-level SPL language enabled abstraction from low-level architecture and program-specific details, simplifying exploit specification.
  • BOPC effectively pruned infeasible execution paths and prioritized high-probability traces using heuristics, enabling scalable search within reasonable time limits.
  • The prototype successfully handled exceptions during symbolic execution, such as null pointer dereferences, by discarding invalid paths and exploring alternative routes.
  • The evaluation confirmed that even with strong control-flow defenses, data-only attacks remain a viable threat surface, particularly when combined with automated payload synthesis.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.