Gray-box runtime enforcement of hyperproperties

Tzu-Han Hsu, Ana Oliveira da Costa, Andrew Wintenberg, Ezio Bartocci, Borzoo BonakdarpourActa Informatica 2025

Introduction

Traditional runtime monitoring typically focuses on trace properties—rules that can be verified by observing a single execution path. However, many critical security requirements, such as non-interference and information-flow control, are hyperproperties. These require comparing multiple system executions to ensure no sensitive information is leaked. Enforcing these properties is notoriously difficult due to high computational costs and the tendency of "black-box" monitors to be overly restrictive.

This research presents a robust new framework for enforcing these complex policies. By moving beyond black-box monitoring and utilizing "gray-box" system knowledge, the authors demonstrate how to automatically synthesize enforcers that are more precise than traditional methods while maintaining a performance overhead as low as 3.5%.

The Problem: Black-Box vs. White-Box

Runtime enforcement faces a trade-off between visibility and overhead. Black-box enforcers lack internal system knowledge and often block safe actions to prevent potential violations, leading to low precision. Conversely, white-box enforcement requires full access to source code, which is not always possible. This paper targets the "gray-box" middle ground: where the enforcer has partial knowledge of the system's possible behaviors, allowing for more precise intervention without requiring full source access.

Methodology: Synthesizing Gray-Box Enforcers

The researchers developed a multi-step pipeline to automatically generate these enforcers:

  1. Formal Specification: Security policies are defined using Nondeterministic Finite-word Hyperautomata (NFH). This formalism is powerful enough to express complex requirements involving quantifier alternation, such as "for every secret execution, there must exist a public execution that appears identical to an observer."
Examples of NFH for non-interference and non-inference policies.
  1. Reduction to Controller Synthesis: The enforcement task is modeled as a "game" between a controller (the enforcer) and a plant (the system). The goal is for the controller to steer the plant's actions to remain within the bounds of the NFH specification.
  2. QBF Encoding: The core technical innovation involves mapping the controller synthesis problem into a Quantified Boolean Formula (QBF). By using a weighted approach, the framework ensures the enforcer interferes as little as possible with the system's intended behavior, maximizing precision.
  3. Implementation: The toolchain utilizes Python, the ExpoSE symbolic execution engine, and the Jalangi dynamic analysis framework for JavaScript. The resulting QBFs are solved using the QuAbS solver to extract the final enforcer logic.

Key Insights

  • The Power of Gray-Box: The paper proves that having even partial knowledge of the system allows the enforcer to be "precise" — meaning it won't modify a system that is already secure. Black-box enforcers cannot guarantee this.
  • Transferability: Because the enforcers are logic-based and synthesized against a model of "monitorable propositions," they are transferable. An enforcer designed for a specific policy can be applied to different systems as long as they share the same observable events.

Evaluation and Key Results

The framework was evaluated against several benchmarks, including JavaScript-based web security scenarios (login pages, ad loading, fingerprinting) and a location privacy case study.

  • Performance: The runtime overhead in JavaScript benchmarks was remarkably low, ranging from 3.5% to 28.64%. This is a significant improvement over techniques like Secure Multi-Execution (SME), which often require running multiple parallel program instances.
  • Precision and Soundness: The authors formally proved that their synthesized enforcers are sound (guaranteeing policy compliance) and precise (never interfering with a system that is already behaving correctly).
  • Efficiency: Synthesis times were practical, often completing in seconds or minutes even for complex hyperautomata.

Conclusion and Future Directions

The gray-box approach demonstrates that partial system knowledge is sufficient to build efficient and precise runtime enforcers for complex hyperproperties. While currently limited to finite-word programs, future work aims to extend this to infinite state spaces using Satisfiability Modulo Theories (SMT) and to address non-determinism in concurrent systems. Additionally, the potential for "probabilistic enforcers" offers a promising path for securing AI-enabled systems.

Summary updated

BibTeX
@article{hsu2025gray,
  author = {Tzu-Han Hsu and Ana Oliveira da Costa and Andrew Wintenberg and Ezio Bartocci and Borzoo Bonakdarpour},
  title = {{Gray-box runtime enforcement of hyperproperties}},
  journal = {Acta Informatica},
  year = {2025},
  doi = {10.1007/s00236-025-00502-1},
}
Figure