Android Capability-Composition Chain
android_capability_composition_chain HARD
| Category | Improper Platform Usage |
| OWASP Mobile (2024) | M4 |
| MASVS | MASVS-PLATFORM-1MASVS-AUTH-1 |
| MASWE | MASWE-0032MASWE-0018 |
| CWE | CWE-441CWE-862CWE-668 |
| Platform | Android |
Description
No single hop is the bug - the COMPOSITION is. A notification action carries a mutable PendingIntent -> it fires an exported BroadcastReceiver -> the receiver binds an exported Binder service -> the service performs a privileged transfer, and each hop trusts its predecessor instead of re-checking the original caller. An attacker who can trigger the notification action (or send the broadcast directly) laundered an untrusted request through four individually-benign links into a privileged operation. The secure path re-authorizes the ORIGINAL caller at the privileged sink and uses immutable/explicit intents + per-method authorization so the chain breaks at the first untrusted hop (capability-composition / confused-deputy chain).
How it works
No single hop is the bug, the composition is. A notification action carries a mutable PendingIntent, which fires an exported BroadcastReceiver, which binds an exported Binder service, which performs a privileged transfer. Each hop trusts its immediate predecessor instead of re-checking the original caller, so an attacker who triggers the first hop launders an unauthenticated request through four individually-benign links into a privileged operation (a confused deputy). This is an offline, deterministic simulation. The secure path propagates and re-authorizes the original caller at the sink and uses immutable and explicit intents plus per-method authorization, breaking the chain at the first untrusted hop.
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 Improper Platform Usage 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,frida. - Locate the target. From the home index, open Android Capability-Composition Chain (
android_capability_composition_chain). 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. From a co-resident/attacker context (
adb shell am start/drozer, or a crafted deep link / QR), send the untrusted input to the exported component or WebView and confirm the app performs the unsafe action (navigation, JS execution, file/URI access) with no validation. - 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)
Attack inputs
Payloads/artifacts you author for the on-device attack. The demo already ships and simulates these in-process (e.g. the malicious companion app / crafted intent is emulated inside the screen), so you only need to craft them to reproduce the exploit on a real device:
crafted notification-action broadcast
Real-world references
Concrete public disclosures that match this vulnerability class: