MediaProjection / Screen-Capture Authorization Bypass
← Privileged System-Provider Activation
mediaprojection_screencapture_authorization_bypass HARD
| Category | Privileged System-Provider Activation |
| OWASP Mobile (2024) | M4 |
| MASVS | MASVS-PLATFORM-1MASVS-PRIVACY-1 |
| MASWE | MASWE-0038 |
| CWE | CWE-20CWE-862CWE-200 |
| Platform | Android |
Description
An attacker-controlled value flows into MediaProjection / screen-capture authorization (a reused/forwarded projection token, a consent-result treated as authoritative without validation), so an app gains unauthorized screen-recording capability or a capture token leaks to another app (Android MediaProjection authorization-bypass CVE-2025-32322 class).
How it works
Screen capture is authorized by a MediaProjection consent token that the user granted to one package. Here the token is treated as authoritative wherever it turns up: a forwarded, reused, or forged token starts recording for a different (attacker) package with no validation, granting unauthorized screen recording or token leakage (Android MediaProjection CVE-2025-32322 class). This is an offline, deterministic simulation. The secure path validates the token is single-use, unexpired, and bound to the same package that obtained consent. The “real state” panel confirms MediaProjectionManager and its createScreenCaptureIntent consent API are present on this device. To fully arm capture, request the token via createScreenCaptureIntent and approve the system consent dialog; the granted token can then be reused across captures.
How to exercise it. DVMA is the harness - open this module from the home index and tap the demo action. The screen ships the malicious input and simulates the attacker (e.g. the companion app, crafted intent, or scanned payload) in-process, and the evidence panel prints the proof. The Tools (optional) and Attack inputs below are only needed to reproduce the exploit end-to-end on a real device.
Exploit steps
- Set up. Build DVMA with a flavor that enables the Privileged System-Provider Activation category (e.g.
--dart-define-from-file=config/flavors/dev.json) and run on an Android emulator you control. The demo needs no external tooling; for the optional on-device reproduction the relevant tools are:adb,drozer,jadx,scrcpy. - Locate the target. From the home index, open MediaProjection / Screen-Capture Authorization Bypass (
mediaprojection_screencapture_authorization_bypass). The How it works section above describes this module’s specific weakness; the screen states the intended-secure behavior and exposes the vulnerable action. - Exploit. Drive the provider-activation / enablement workflow (accessibility, notification-listener, VPN, IME, phone-account, MediaProjection, credential-provider) and confirm the granted capability is invoked on an untrusted caller’s behalf - the enablement flow is the boundary.
- Observe the evidence. Trigger the vulnerable action and read the evidence panel - it prints the concrete proof (leaked value, accepted replay, executed payload, or unauthorized result).
- Contrast with the secure path. Run the module’s secure/hardened action (where provided) and confirm the same attack is rejected - this is what a correct implementation should do.
Tools (optional)
Real-world references
Concrete public disclosures that match this vulnerability class: