NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Execution Integrity with In-Place Encryption

Dean Sullivan, Orlando Arias, David Gens, Lucas Davi, Ahmad-Reza Sadeghi, Yier JinarXiv 2017

Introduction

For years, the security community has engaged in a persistent cat-and-mouse game with exploit developers. Early defenses like Data Execution Prevention (DEP) effectively mitigated simple code injection attacks by preventing the execution of data in memory. However, attackers pivoted to Code-Reuse Attacks (CRAs), such as Return-Oriented Programming (ROP). Instead of injecting new code, these techniques stitch together existing snippets of legitimate code—known as gadgets—to perform malicious actions.

Traditional Instruction Set Randomization (ISR), which encrypts a program’s instructions, was originally designed to stop injection. However, it often fails against CRAs because the reused code is already correctly encrypted. Furthermore, defenses like Address Space Layout Randomization (ASLR) are frequently bypassed by memory disclosure vulnerabilities that "leak" the memory layout. Scylla is a novel security framework designed to address these gaps by enforcing "execution integrity," ensuring that code can only be executed in its intended sequence even if an attacker possesses full read-access to the process memory.

The Scylla Architecture

Scylla employs a multi-layered approach that integrates security into both the build process and the runtime environment. The framework moves beyond global encryption keys to a more granular, context-aware protection model.

The Scylla architecture spans from build-time diversification to runtime decryption within the execution environment.

As shown in the architecture diagram, the process begins with Fine-Grained Diversification. Before encryption, Scylla permutes the order of functions and basic blocks within the binary. It also injects "dummy" instructions, such as NOPs or identity operations, to alter the code's signature and offsets. This prevents attackers from using "known plain-text" attacks to guess encryption keys. Following diversification, Scylla applies Per-Basic-Block Encryption using a stream cipher (AES in Counter Mode), ensuring that every block is uniquely protected.

Enforcing Execution Integrity

The core innovation of Scylla is its method of chaining decryption to enforce control flow. Each instruction within a basic block is decrypted based on its predecessor. The first instruction of a block requires a specific "seed" provided by the previous block's exit. This creates a mathematical dependency: an attacker cannot jump into the middle of a block because doing so would result in the CPU attempting to execute "garbage" data, leading to an immediate crash.

By treating cryptography as a control-flow mechanism, Scylla implicitly enforces integrity without the need for a complex, global Control-Flow Graph (CFG), which is often a performance bottleneck in other systems. Even a "perfect" memory leak—such as those used in JIT-ROP attacks—only provides the attacker with ciphertext. Without the specific seeds and the randomized layout, the leaked data is useless for crafting an exploit.

Experimental Evaluation

The researchers evaluated Scylla using the SPEC CPU2006 benchmark suite, a standard industry collection of CPU-intensive workloads including bzip2, gcc, and h264ref. These benchmarks allowed for a rigorous measurement of performance overhead, branch misprediction rates, and instruction cache (I-cache) misses.

Performance and Hardware Potential

The software prototype implementation demonstrated an average performance overhead of 20%. However, analysis revealed that 71% of this overhead stemmed from the software "wrapper" and kernel transitions required for the simulation. The authors argue that with dedicated hardware support (similar to Intel's ASIST), this overhead could be reduced to as little as 1.5%, making the system viable for high-performance production environments.

Security and Entropy

A key metric for Scylla is the entropy provided by its randomization. The framework makes the probability of an attacker successfully guessing the location of a specific basic block statistically negligible for most binaries.

Probability of successfully guessing a basic block location across various binary sizes within the SPEC CPU2006 suite.

As illustrated in the evaluation results, the probability of a successful guess remains extremely low (often below $10^{-3}$) even for smaller binaries, and decreases further as the binary size increases. This effectively thwarts state-of-the-art attacks, including Just-In-Time ROP (JIT-ROP) and Crash-Resistant Oriented Programming (CROP).

Limitations and Future Work

While Scylla represents a significant leap forward, several challenges remain:

  • Software Overhead: The current 20% overhead is prohibitive for many production environments without hardware acceleration.
  • JIT Compilation: Scylla does not currently support Just-In-Time (JIT) generated code, such as that used in modern web browsers.
  • Data-Only Attacks: The framework protects the execution path but does not defend against attacks that modify non-control data to alter program logic.

Future research will focus on extending protection to C++ virtual tables (vtables) and exploring more efficient methods for load-time randomization to further harden the system against evolving threats.

Summary updated

BibTeX
@misc{sullivan2017execution,
  author = {Dean Sullivan and Orlando Arias and David Gens and Lucas Davi and Ahmad-Reza Sadeghi and Yier Jin},
  title = {{Execution Integrity with In-Place Encryption}},
  year = {2017},
  eprint = {1703.02698},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1703.02698},
}
Figure