π What Is It?
Improper Platform Usage covers every case where an app misuses a mobile operating-system feature or fails to use a platform security control correctly. The OS ships permission models, the Keychain and Keystore, secure IPC, App Transport Security, biometric APIs and WebView sandboxing - and this category is what happens when the app fights, ignores, or misapplies them.
The distinguishing idea is direction: the platform already offers the secure way to do the thing, and the app takes a weaker path. A secret in SharedPreferences instead of the Keystore. An exported Activity that should have stayed private. ATS disabled to make one cleartext call work. A biometric prompt whose callback returns a boolean instead of unlocking a real key.
β οΈ Common Exploits
- Exported IPC: Activities, Services, Receivers, Providers reachable by any installed app
- Wrong Secret Store: tokens in
SharedPreferences/UserDefaults/plist - ATS / Cleartext Enabled:
usesCleartextTraffic=true, global ATS exceptions - Boolean Biometrics: auth result not bound to a cryptographic key
- WebView Bridges:
addJavascriptInterfaceplus file access and untrusted URLs - Backup Leakage: sensitive files included in cloud or ADB backups
- Over-Requested Permissions: broad grants that widen the blast radius
- Weak Custom Permissions:
signaturedowngraded tonormal
π΄ Attack Flow
β
2. List exported components, permissions, ATS and backup settings
β
3. Invoke exported components from a malicious app
β
4. Read secrets from preferences, plists, or a device backup
β
5. IMPACT: Data theft or privileged actions from a zero-permission app!
β Vulnerable Code
β Secure Code
β Prevention Checklist
- Export components only when required, and protect them with signature permissions
- Store secrets in the Keystore/Keychain - never in preferences, plists, or files
- Choose the strictest workable Keychain accessibility class
- Keep ATS on; disallow cleartext traffic app-wide
- Bind biometric authentication to a cryptographic key, not a boolean
- Disable JavaScript, file access, and native bridges in WebViews unless required
- Load only fixed, validated origins into a WebView
- Exclude sensitive data from backups
- Request the minimum permissions, at the moment of use
- Validate every input arriving over IPC and deep links
- Re-review the manifest / Info.plist on every release
π Detection & Tools
Static:
Dynamic:
How to Test:
- Enumerate exported components and invoke each from a test app
- Dump
shared_prefs, plists, and the app sandbox for secrets - Check ATS/cleartext, backup, and debuggable flags in the built artifact
- Hook the biometric callback and see whether data still decrypts
- Feed hostile deep links and IPC extras to every entry point
π Real-World
These are documented incident classes - recurring patterns rather than single CVEs.
- Exported content providers: another installed app queries private notes, messages, or account rows with no permission at all.
- Tokens in plaintext preferences: a device backup or a rooted-device dump yields long-lived session tokens.
- Global ATS exceptions: disabling transport security "for one legacy endpoint" downgrades the entire app to interceptable traffic.
- Boolean biometrics bypassed: a runtime hook flips the success callback and the app unlocks without any real authentication.
- WebView bridges reached from untrusted pages: a JavaScript interface exposed to attacker-controlled content leads to file or account access.
π Quick Tips
- DO NOT export components you do not need to
- DO NOT keep secrets outside the Keystore/Keychain
- DO NOT disable ATS or allow cleartext globally
- DO tie biometrics to a real cryptographic key
- DO lock WebViews down and pin their origins
- DO audit the manifest every release
π Compliance
Related Standards:
- OWASP Mobile Top 10 2016 - M1
- Maps to M8:2024 Security Misconfiguration
- OWASP MASVS PLATFORM-1 β¦ PLATFORM-3
- CWE-926 Improper Export of Android Application Components
- CWE-276 Incorrect Default Permissions