P-Box: Preventing Unwanted Data Flows using Permission Sandboxes on Android
Lucas Becker (Paper author · Technical University of Darmstadt), David Breuer (Paper author · Technical University of Darmstadt), Matthias Hollick (Paper author · Technical University of Darmstadt)
Privacy Enhancing Technologies Symposium (PETS) 2026 · Day 2 · Beaver
Overview
In an increasingly app-centric world, users are often forced to install applications for essential services, ranging from public transport to healthcare. While Android's existing permission model aims to protect user privacy, it suffers from a critical flaw: once an app is granted a sensitive permission, the user loses all control over how that data is subsequently used or transmitted. This talk, "P-Box: Preventing Unwanted Data Flows using Permission Sandboxes on Android," presented by Lucas Becker from the Technical University of Darmstadt, alongside collaborators David Breuer and Matthias Hollick, introduces a novel framework designed to restore user agency over their data.

Key moments
- 0:20 Problem: Apps upload sensitive data without control
- 2:40 User loses control after granting app permissions
- 3:20 Introducing P-Box permission sandboxes architecture
- 4:00 Sandboxes return data as opaque handles
- 5:00 User explicitly approves specific data flows
- 6:00 Remote rendering for private user interface elements
- 7:00 P-Box summary and Android prototype availability
P-Box: Preventing Unwanted Data Flows using Permission Sandboxes on Android
Speakers: Lucas Becker (Paper author, Technical University of Darmstadt), David Breuer (Paper author, Technical University of Darmstadt), Matthias Hollick (Paper author, Technical University of Darmstadt)
Conference: PETS
YouTube: https://www.youtube.com/watch?v=hj1DSm5PRvA
Overview
In an increasingly app-centric world, users are often forced to install applications for essential services, ranging from public transport to healthcare. While Android's existing permission model aims to protect user privacy, it suffers from a critical flaw: once an app is granted a sensitive permission, the user loses all control over how that data is subsequently used or transmitted. This talk, "P-Box: Preventing Unwanted Data Flows using Permission Sandboxes on Android," presented by Lucas Becker from the Technical University of Darmstadt, alongside collaborators David Breuer and Matthias Hollick, introduces a novel framework designed to restore user agency over their data.
The core problem addressed by P-Box is the "all-or-nothing" nature of current Android permissions. An app might legitimately require access to the microphone for recording audio and internet access for downloading configuration files or displaying ads. However, the current system allows an app with both permissions to surreptitiously upload recorded audio to an external server without explicit user consent for that specific data flow. P-Box fundamentally re-architects how permissions are handled on Android, introducing permission sandboxes and a mechanism for fine-grained, user-controlled data flow authorization, thereby preventing unwanted data exfiltration and enhancing user privacy.
This work is particularly relevant as mobile applications become indispensable for critical daily functions. The inability to trust an app with sensitive data, even when its primary function is benign, creates a significant security and privacy vulnerability. P-Box offers a practical, prototype-implemented solution on Android 15, demonstrating how users can regain control over their personal data, making informed decisions about not just what data an app can access, but how that data can be used and where it can flow.
Background
▶ Watch: Problem: Apps upload sensitive data without control (0:20)
The Android operating system, much like iOS, employs an application sandbox model to isolate apps from one another. Each application runs in its own process with a unique User ID (UID), preventing direct interference or data exchange between unrelated apps without explicit mechanisms. This foundational security measure is robust for inter-app isolation. However, the existing permission system, which gates access to sensitive resources like the microphone, camera, contacts, or location, operates at a coarser granularity.
When an app requests a permission, such as RECORD_AUDIO or INTERNET, the user is presented with a prompt to either grant or deny this permission. If granted, the app then has unfettered access to that resource. For instance, an audio recorder app, once granted microphone access, can record audio. If that same app also possesses the INTERNET permission (perhaps for legitimate reasons like downloading configuration updates or displaying ads), there is nothing in the standard Android security model to prevent it from uploading the recorded audio data to an arbitrary server. The user's consent is given at the point of access to the raw resource, not at the point of data exfiltration or specific data usage. This creates a significant privacy gap, as users lose control over their data immediately after the initial permission grant.
Several factors contribute to this persistent problem:
- Permission Scope: Android permissions are broad. Granting
READ_CONTACTSallows an app to read all contacts, andINTERNETallows connections to any network resource. There's no built-in mechanism to specify "read contacts only for this specific feature" or "access the internet only to download updates from this specific domain." - Lack of Data Flow Control: The current model focuses on resource access, not data movement. Once data is within an app's sandbox, the system generally assumes the app can do what it wants with it, provided it has the necessary permissions for the subsequent operation (e.g., writing to storage, sending over network).
- App Monopolies: As highlighted by Becker, for many critical services (public transport, healthcare), users have no alternative but to use the provider's official app. This removes the option of simply "choosing a more trustworthy app," forcing users into a dilemma where they must either forgo the service or accept significant privacy risks.
- Complexity for Developers: Implementing fine-grained privacy controls within applications is complex and often left to developer discretion, leading to inconsistent privacy practices across the app ecosystem.
Prior work in this area has explored various approaches, including static and dynamic analysis to detect data leaks, or custom Android ROMs with enhanced permission controls. However, many of these solutions either impose significant overhead, require extensive developer modifications, or are not practical for widespread adoption due to system-level changes. P-Box aims to provide a practical, user-centric solution that integrates more seamlessly into the Android ecosystem while offering strong security guarantees.
Key Findings
▶ Watch: Introducing P-Box permission sandboxes architecture (3:20)
The central finding of the P-Box research is the identification of a fundamental disconnect between user intent and system enforcement in current mobile operating system permission models. Users intend to grant permission for a specific function (e.g., recording audio), but the system grants blanket access to the resource, enabling unintended and potentially malicious data flows. P-Box addresses this by introducing a paradigm shift from resource-centric permissions to data flow-centric permissions.
The key contributions and findings are:
- Introduction of Permission Sandboxes: P-Box proposes and implements a new architectural entity called permission sandboxes. Unlike the main app sandbox, which is stripped of all direct access to permission-protected data, these specialized sandboxes are each associated with a single, specific permission (e.g., a microphone sandbox, an internet sandbox). This effectively compartmentalizes an app's functionality based on its permission requirements.
- Isolation of Sensitive Data: By enforcing that only permission sandboxes can directly interact with the operating system service to obtain sensitive data, P-Box guarantees that raw, sensitive data never directly enters the main app sandbox. This prevents the primary app logic from directly accessing and potentially exfiltrating data without explicit user approval for its flow.
- Opaque Handles for Inter-Sandbox Communication: To enable useful computation while maintaining isolation, P-Box introduces the concept of opaque handles. When a permission sandbox processes data (e.g., records audio), it doesn't return the raw data to the app sandbox. Instead, it returns an opaque handle—a reference managed by the operating system. The app can pass this handle between different permission sandboxes, but it cannot directly dereference or inspect the underlying data itself.
- Fine-Grained User Consent for Data Flows: The most critical finding is the ability to prompt the user for consent at the exact moment sensitive data is about to flow from one permission domain to another. For example, if an opaque handle representing microphone data is passed to an internet permission sandbox for upload, the user receives a content prompt asking for permission to "upload this microphone data to the internet." This gives users unprecedented control over specific data flows, preventing generalized permission grants from leading to unintended consequences.
- Secure Remote Rendering for User Interfaces: To ensure that UI elements displaying sensitive data (e.g., location on a map) can be safely rendered without the main app gaining access to the underlying data, P-Box leverages remote rendering. This allows permission sandboxes to render their own UI components directly onto the screen, managed by the privileged
SurfaceFlingerservice, thereby preventing the main app from reading or manipulating this sensitive visual information. - Practical Prototype Implementation: The researchers successfully implemented a full prototype of P-Box on Android 15, demonstrating its feasibility and practicality. This includes adapting sample applications to leverage the new sandboxing model, proving that the concept can be integrated into a modern mobile operating system.
These findings collectively present a robust framework for enforcing data flow sandboxing, giving users true control over their data's lifecycle within applications.
Technical Deep Dive
▶ Watch: Sandboxes return data as opaque handles (4:00)
The architecture of P-Box fundamentally redefines how permissions are managed and how data flows within an Android application. Instead of a monolithic app process holding all granted permissions, P-Box introduces a segmented approach centered around specialized permission sandboxes.
At its core, the P-Box architecture comprises three main components:
- The App Sandbox: This is the traditional Android application process, but with a crucial modification: it is stripped of all direct access to permission-protected data. This means the main app process, by default, cannot directly request microphone data, location data, or access the internet. Its role is primarily to orchestrate the interaction between different permission sandboxes and manage the user interface.
- Permission Sandboxes: These are new, isolated execution environments, each created with a single, specific permission (e.g., one sandbox for
RECORD_AUDIO, another forINTERNET, a third forACCESS_FINE_LOCATION). When an app needs to perform an operation requiring a specific permission, it delegates this task to the corresponding permission sandbox. These sandboxes are isolated from each other and from the main app sandbox. - Operating System Service: This privileged service mediates all access to sensitive resources and manages the lifecycle of permission sandboxes and opaque handles. It enforces the isolation rules and facilitates secure data transfer.
The technical flow within P-Box operates as follows:
1. Initial Permission Grant and Data Acquisition:
When an app is installed, the user still grants permissions at a high level (e.g., "Allow Microphone access"). However, this grant no longer directly empowers the main app sandbox. Instead, it signals to the P-Box system that a microphone permission sandbox can be created and utilized.
If an app wants to record audio, it initiates a request to the P-Box framework. The P-Box system then directs this request to the dedicated microphone permission sandbox. This sandbox, and only this sandbox, is authorized to request audio data from the underlying Android operating system service. The operating system, after verifying the sandbox's specific permission, returns the raw audio data directly to the microphone permission sandbox.
2. Data Processing and Opaque Handles:
Once the data is within its designated permission sandbox, the sandbox can perform arbitrary computations on it. For example, the microphone sandbox might record a segment of audio. Crucially, due to the enforced isolation, this raw data cannot leak into the main app sandbox or any other permission sandbox.
If the app needs to use this processed data (e.g., to display its size, or to prepare it for upload), the permission sandbox does not return the raw data. Instead, it returns an opaque handle. This handle is a reference, managed by the operating system, that points to the actual data which remains securely stored and controlled by the OS. The app sandbox receives this handle and can store it or pass it around, but it cannot dereference it to access the underlying data. This ensures that the app never directly touches sensitive information.
3. Data Flow Authorization with Content Prompts:
The power of P-Box becomes evident when data needs to flow between different permission domains. Consider the scenario where the app wants to upload the recorded audio (represented by an opaque handle) to the internet.
The app passes the audio data's opaque handle to the internet permission sandbox. When this internet sandbox attempts to dereference the handle—meaning it tries to access the actual audio data for transmission—the operating system service intercepts this request.
At this point, a content prompt is presented to the user. This prompt is highly specific, asking for consent to allow "access microphone data and send it to the internet." This is a critical departure from the traditional model, where the user would have already granted both microphone and internet access, and the data flow would occur implicitly. With P-Box, the user provides explicit consent for this specific data flow. If the user approves, the internet sandbox gains temporary access to the audio data to perform the upload. If denied, the data flow is blocked.
This mechanism ensures that:
- An app cannot save microphone data to local storage if it only has microphone and internet permissions, but not storage permission. The content prompt is specific to the requested flow.
- Users have granular control over how their data is used, not just whether an app can access it.
4. Secure User Interface Rendering with Remote Surfaces:
Displaying sensitive data (e.g., location on a map, recorded audio waveform) presents another challenge. If the main app renders this data, it could potentially read it. P-Box solves this using remote rendering capabilities provided by Android.
The main app sandbox owns the overall user interface view. However, sub-parts of this view can be delegated to be rendered by specific permission sandboxes. For instance, a map showing the user's location would be rendered by the location permission sandbox.
This is achieved using Android's remote surfaces, which are managed by the SurfaceFlinger. SurfaceFlinger is a privileged Android system service responsible for compositing all application and system surfaces onto the display. By allowing permission sandboxes to render directly to remote surfaces, the SurfaceFlinger ensures that the main app sandbox never receives pixel data or any other information from these sensitive UI components. Input data (e.g., touch events) can also be securely forwarded to the appropriate sandbox, maintaining interactivity without compromising data privacy. This guarantees that the app itself can never "read" the content displayed by a permission sandbox.
Implementation Details:
Lucas Becker noted that P-Box has been implemented as a full prototype on Android 15. This involved significant modifications to the Android Open Source Project (AOSP) to introduce the permission sandbox abstraction, modify the permission granting mechanisms, and integrate the opaque handle and content prompting logic. The use of existing Android features like SurfaceFlinger and remote surfaces demonstrates an attempt to integrate P-Box within the existing operating system framework where possible, rather than building an entirely new display pipeline. The talk mentions adapted sample apps to showcase the security guarantees, indicating a practical, working system.
Demo / Proof of Concept
▶ Watch: Remote rendering for private user interface elements (6:00)
While the talk itself, due to its brevity, did not include a live demonstration, Lucas Becker clearly articulated the core proof-of-concept scenario that P-Box was designed to address and showed how the system would interact with a user. The primary example used throughout the presentation was an audio recorder application.
In a traditional Android environment, if an audio recorder app requests and receives both RECORD_AUDIO and INTERNET permissions, it can record audio and then upload it to any server without further user intervention. The user's consent is a one-time decision at installation or first use.
With P-Box, this scenario changes dramatically:
- Recording Audio: The user launches the audio recorder app. When the app needs to record, it delegates this task to its dedicated microphone permission sandbox. This sandbox accesses the microphone, records the audio, and then provides an opaque handle back to the main app sandbox. The raw audio data never touches the main app's memory space.
- Preparing for Upload: The app might then present a UI element (rendered by the app sandbox) allowing the user to "Upload" the recorded audio. Upon user interaction, the app passes the opaque handle representing the audio data to the internet permission sandbox.
- User Consent for Data Flow: When the internet permission sandbox attempts to dereference this handle to access the actual audio data for upload, the P-Box system intercepts this. It triggers a content prompt on the user's screen. This prompt is specific and transparent, stating something like: "The app wants to access microphone data and send it to the internet. Allow or Deny?"
- Enforcement:
- If the user allows, the internet sandbox gains temporary access to the audio data and proceeds with the upload.
- If the user denies, the data flow is blocked, and the audio data is not uploaded.
This example highlights P-Box's ability to provide granular control over data flows, not just resource access. The user explicitly decides if this specific piece of microphone data can be sent to the internet. The speaker also mentioned that the system is a full prototype implemented on Android 15, and that "sample apps" have been adapted to work within this system, allowing users to "try out these security guarantees." This implies a functional testbed where such scenarios can be practically demonstrated. The availability of source code and artifacts further supports the claim of a working proof of concept.
Defensive Implications
▶ Watch: P-Box summary and Android prototype availability (7:00)
The P-Box framework introduces profound defensive implications for both users and the broader mobile security ecosystem. By shifting from a permission-centric to a data flow-centric security model, it fundamentally changes the threat landscape for Android applications.
For End-Users:
- Restored Control and Transparency: The most significant benefit for users is the restoration of control over their sensitive data. No longer are they making a blanket "all-or-nothing" decision when granting a permission. Instead, they gain granular control over specific data flows. This means users can confidently use an app for its primary function (e.g., record audio) without fearing that the data will be silently exfiltrated via another legitimate-but-unrelated permission (e.g., internet access). The content prompt for data flows provides unprecedented transparency, empowering users to make informed decisions about their privacy.
- Mitigation of Malicious or Compromised Apps: P-Box significantly reduces the risk posed by both intentionally malicious applications and legitimate apps that may be compromised. Even if an attacker gains control of the main app sandbox, the raw sensitive data is never directly accessible there. To exfiltrate data, the attacker would still need to orchestrate a data flow through a permission sandbox, which would then trigger a user-facing consent prompt, making covert data exfiltration far more difficult.
- Reduced Trust Burden: Users no longer need to implicitly trust app developers with the handling of their sensitive data once permissions are granted. The system itself enforces the boundaries, reducing the cognitive load on users to scrutinize app privacy policies or guess developer intentions.
For Developers:
- Enhanced Security Guarantees: Developers can leverage P-Box to build applications with stronger privacy guarantees, which can be a significant selling point. By designing their apps to explicitly use permission sandboxes and handle opaque handles, they can assure users that sensitive data is managed securely and transparently.
- Architectural Changes: Implementing P-Box would require developers to re-architect parts of their applications. Instead of directly accessing sensitive APIs, they would need to interact with the P-Box framework to delegate tasks to specific permission sandboxes and manage opaque handles. While this adds complexity, it also encourages a more modular and secure application design.
- Potential for New Features: The ability to explicitly control data flows could enable new privacy-enhancing features within apps, such as time-limited data sharing or conditional access based on user-defined policies.
For the Android Ecosystem:
- Elevated Baseline Security: If P-Box or a similar mechanism were integrated into the core Android OS, it would significantly raise the baseline security and privacy posture for all applications. This would make Android a more trustworthy platform, fostering greater user confidence.
- Addressing a Fundamental Flaw: P-Box directly addresses a long-standing, fundamental flaw in permission management that has plagued mobile operating systems. Its adoption could inspire similar changes in other platforms.
- Challenges and Adoption: The primary defensive challenge lies in the adoption of such a system. It requires significant changes at the OS level (as demonstrated by the Android 15 prototype) and potentially changes to how developers write applications. Backward compatibility and the overhead of these changes would need careful consideration for widespread deployment. Benchmarking results, mentioned as being available in the paper/poster, would be crucial for demonstrating practical viability without excessive performance impact.
In essence, P-Box acts as a robust guardian for data flows, ensuring that user consent is not just a gatekeeper for initial access, but an ongoing, active control mechanism throughout the data's lifecycle within an application. This paradigm shift offers a powerful defense against data misuse and unauthorized exfiltration, empowering users in an increasingly data-hungry digital world.
Key Takeaways
- P-Box redefines mobile privacy: It shifts from a coarse-grained, resource-centric permission model to a fine-grained, data flow-centric sandboxing approach on Android.
- Enhanced User Control: Users gain explicit control over how their data flows between different permission domains within an app, rather than just granting blanket access.
- Permission Sandboxes: Core to P-Box, these isolated environments each hold a single permission, preventing the main app from directly accessing sensitive data.
- Opaque Handles: Sensitive data never enters the main app sandbox directly; instead, it's managed by the OS and referenced via opaque handles, preventing direct access and manipulation.
- Content Prompts for Data Flows: Users receive specific, actionable prompts (e.g., "upload microphone data to the internet") when data is about to flow between sensitive domains, allowing for explicit consent or denial.
- Secure UI Rendering: Remote rendering via Android's
SurfaceFlingerensures that sensitive data displayed in the UI cannot be read or captured by the main app sandbox. - Practical Implementation: A full prototype of P-Box has been successfully implemented on Android 15, demonstrating its feasibility and real-world applicability.
About the Speaker(s)
The talk was presented by Lucas Becker from the Technical University of Darmstadt. He is credited as a paper author for this research. The work was a joint effort with David Breuer and their advisor Matthias Hollick, both also associated with the Technical University of Darmstadt. Their collective research focuses on enhancing privacy and security within mobile computing environments, particularly addressing the challenges of data control and transparency in modern app ecosystems.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Becker and the TU Darmstadt crew actually patched AOSP to fix the oldest data-exfiltration trick in the book. It's an elegant, deeply engineered architectural fix to Android's permission model, even if it breaks backward compatibility to do it.
Heather Calloway (CISO) — SOLID
This is academic research proposing a structural fix to Android's permission model by sandboxing data flows rather than just resource access. While it remains a prototype, it clearly signals where mobile OS privacy architecture is heading and gives security teams a framework for how mobile DLP should actually work.
→ Top-rated talks at Privacy Enhancing Technologies Symposium (PETS) 2026
All talks from Privacy Enhancing Technologies Symposium (PETS) 2026