Back

M1:2016 Improper Platform Usage - Overview

What is Improper Platform Usage?

Improper Platform Usage is the top risk in the OWASP Mobile Top 10 (2016). It covers every case where an app misuses a mobile operating-system feature or fails to use a platform-provided security control correctly. The mobile OS ships a rich set of safety mechanisms—permission models, the Keychain and Keystore, secure IPC, App Transport Security, biometric APIs, WebView sandboxing—and this category is what happens when the app fights, ignores, or misapplies them instead of leaning on them.

The distinguishing idea is direction. The platform already offers the secure way to do a thing; the app takes a different, weaker path. It stores a secret in SharedPreferences instead of the Keystore. It exports an Activity that should have stayed private. It disables App Transport Security to make a cleartext call work. It gates a screen with a biometric callback that returns a boolean instead of unlocking a real cryptographic key. Each of these is not an exotic bug—it is the platform's guardrail being bypassed by the developer's own configuration or code.

Core Concept

Correct Platform Usage:
  Permissions  -> request the minimum, at the moment of use, degrade gracefully
  IPC          -> components not exported unless required, protected by permissions
  Secrets      -> Keychain / Keystore, hardware-backed, correct accessibility flag
  Biometrics   -> unlock a cryptographic key; result bound to a real operation
  Transport    -> App Transport Security on; cleartext disallowed by default
  WebView      -> JS disabled unless needed; no broad native bridge; file access off
  Backup       -> sensitive data excluded from cloud/local backup

Improper Platform Usage:
  Permissions  -> over-request; custom permission with signature -> normal
  IPC          -> exported Activity/Service/Receiver reachable by any app
  Secrets      -> SharedPreferences / UserDefaults / plist in plaintext
  Biometrics   -> callback returns true/false, no key, trivially bypassed
  Transport    -> ATS disabled globally; usesCleartextTraffic = true
  WebView      -> addJavascriptInterface + file access + loadUrl(untrusted)
  Backup       -> allowBackup = true, tokens land in adb backup / iCloud

Why It's Critical for Mobile

Mobile concentrates several conditions that make platform misuse especially damaging:

Why Does This Matter?

Business Impact

Technical Impact

Technical Context

Common Improper-Platform-Usage Scenarios

1. Exported Components and Unprotected Intents (Android)

<!-- Any app on the device can launch this Activity directly -->
<activity android:name=".TransferActivity" android:exported="true" />

<!-- Receiver with no permission: any app can broadcast to it -->
<receiver android:name=".AdminReceiver" android:exported="true">
    <intent-filter><action android:name="com.app.DO_ADMIN"/></intent-filter>
</receiver>

Risk: A component that has an intent-filter is exported by default (pre-Android 12) and reachable by any installed app, allowing screen bypass, privileged actions, or an Intent-redirection confused-deputy attack.

2. Insecure Local Storage of Secrets

// Android: token in plaintext SharedPreferences
prefs.edit().putString("auth_token", token).apply()

// iOS: token in UserDefaults (a plist, unencrypted at rest)
UserDefaults.standard.set(token, forKey: "auth_token")

Risk: Neither store is meant for secrets. Both are recoverable from backups and from the file system on a compromised device. The platform provides the Keystore/Keychain precisely so this never has to happen.

3. Weak Keychain / Keystore Usage (iOS & Android)

// iOS: item survives even without a passcode and is included in backups
kSecAttrAccessible: kSecAttrAccessibleAlways   // wrong accessibility flag

// Android: software-backed key, no user-authentication requirement
KeyGenParameterSpec.Builder(...)               // isStrongBoxBacked not requested
    .setUserAuthenticationRequired(false)      // key usable with no unlock

Risk: The secret is stored in the right place but with the wrong policy—overly permissive accessibility, no hardware backing, or no requirement that the device be unlocked—so it survives conditions it should not.

4. Biometric Authentication Without Cryptographic Binding

// The gate is only a boolean callback - nothing is unlocked
BiometricPrompt(activity, executor, object : AuthenticationCallback() {
    override fun onAuthenticationSucceeded(result: AuthenticationResult) {
        showSecrets()   // no CryptoObject; a hook forcing 'succeeded' wins
    }
})

Risk: If the biometric result does not unlock a Keystore/Keychain key that is actually required to decrypt data or sign a request, the check protects nothing and is bypassed by instrumentation.

5. Ignoring App Transport Security / Allowing Cleartext

<!-- iOS Info.plist: ATS turned off globally -->
<key>NSAppTransportSecurity</key>
<dict><key>NSAllowsArbitraryLoads</key><true/></dict>

<!-- Android manifest: cleartext HTTP permitted app-wide -->
<application android:usesCleartextTraffic="true" />

Risk: The platform defaults to HTTPS-only for a reason. Turning the guardrail off globally to fix one endpoint exposes all traffic to interception and tampering.

6. WebView Misconfiguration

webView.settings.javaScriptEnabled = true
webView.settings.allowFileAccess = true            // file:// reachable from JS
webView.addJavascriptInterface(NativeBridge(), "android")  // native methods to JS
webView.loadUrl(untrustedUrl)                      // attacker content + bridge

Risk: A native JavaScript bridge exposed to untrusted content lets a web attacker call app methods; enabling file access lets loaded pages read local files.

Layers Where Platform Misuse Hides

SurfaceTypical Improper UsageConsequence
PermissionsOver-requesting; custom permission with wrong protectionLevelExcess access, privilege escalation
IPC / componentsExported Activity/Service/Receiver; unprotected IntentScreen bypass, Intent redirection
Secure storageSharedPreferences/UserDefaults/plist for secrets; wrong accessibilityCredential and token theft
BiometricsCallback-only gate, no CryptoObjectAuthentication bypass
TransportATS disabled; usesCleartextTrafficInterception, tampering
WebViewJS bridge + file access + untrusted contentNative bridge abuse, file read
Backup / clipboardallowBackup=true; secrets on the pasteboardData exfiltration off-device

Real-World Impact

Case Study 1: Exported-Component Screen Bypass (incident class)

Improper Usage:

Impact:

Root Cause: Relying on default export behaviour and forwarding untrusted Intents—using IPC without the platform's protection mechanisms. Android 12+ now forces an explicit exported value specifically because of this pattern.

Case Study 2: Secrets in Insecure Local Storage and Backups (incident class)

Improper Usage:

Impact:

Root Cause: Using general-purpose preference stores for secrets and leaving backup flags at permissive defaults, instead of the Keystore/Keychain with a backup-excluding policy.

Case Study 3: Biometric Gates With No Cryptographic Binding (incident class)

Improper Usage:

Impact:

Root Cause: Treating biometrics as a UI decision rather than as a key-unlock operation—ignoring the platform's CryptoObject/keychain-bound design that makes the result tamper-resistant.

Prevalence and Statistics

Improper Platform Usage sits at M1 in the OWASP Mobile Top 10 (2016) because it is both the broadest and one of the most frequently observed mobile categories. It is an umbrella that touches permissions, IPC, storage, transport, biometrics, and WebViews—so some form of it appears in the majority of mobile assessments.

Rather than cite precise breach counts (which vary by source), the defensible picture is:

Note: exact percentages differ between reports and years. Treat any single figure as illustrative; the durable takeaway is that platform misuse is common, cheap to find with static tooling, and often trivially exploitable on a compromised device.

Common Misunderstandings

Myth 1: "The sandbox already protects my files"

Reality: The app sandbox protects data from other apps on a healthy device. It does nothing against a rooted/jailbroken device, a physical extraction, or a backup. Secrets still belong in the Keystore/Keychain, not in plain files.

Myth 2: "It's only exported so my other app can call it"

Reality: "Exported" means every app can call it, not just yours. Cross-app calls between your own apps should be gated by a signature-level custom permission, not left open.

Myth 3: "The biometric prompt succeeded, so the user is authenticated"

Reality: A success callback is a UI event, not a security boundary. Unless success unlocks a cryptographic key that is actually required to proceed, the check is bypassed by hooking the callback.

Myth 4: "We had to disable ATS to talk to our backend"

Reality: Global NSAllowsArbitraryLoads weakens every connection. If a single legacy endpoint truly needs an exception, scope it with a per-domain ATS exception—never turn the platform default off app-wide.

Myth 5: "UserDefaults / SharedPreferences is basically local, so it's fine"

Reality: Both are unencrypted key-value stores backed by files that land in backups and are readable on compromised devices. They are for preferences, not secrets.

Myth 6: "A JavaScript bridge is convenient and our WebView only loads our site"

Reality: Redirects, mixed content, ad/analytics frames, and open-redirect bugs routinely pull untrusted content into a WebView. Any exposed native bridge then becomes reachable by that content.

How Improper Platform Usage Differs from Related Mobile Risks

AspectM1 Improper Platform UsageM2 Insecure Data StorageM3 Insecure Communication
Root causeMisusing / ignoring a platform controlSensitive data persisted unsafelyData in transit unprotected
Where it livesManifest/plist, IPC, Keystore/Keychain, WebView, biometric codeFiles, DBs, caches, logsTLS setup, pinning, cleartext
Typical fixUse the platform control correctlyEncrypt / don't storeEnforce TLS, validate certs
OverlapUmbrella—often the cause behind M2/M3Storage-specific sliceTransport-specific slice

M1 is deliberately broad: an insecure-storage or insecure-communication finding is frequently also an improper-platform-usage finding, because the underlying mistake was declining the platform's correct mechanism.

Key Takeaways

  1. Lean on the platform, don't fight it—the OS ships permissions, secure storage, secure IPC, ATS, and biometric binding so you don't have to reinvent them.
  2. The device is a hostile environment—design for lost, stolen, rooted, and backed-up phones, not just the happy path.
  3. Secrets go in the Keystore/Keychain with correct accessibility and hardware backing—never in preferences, plists, or backups.
  4. Don't export what doesn't need exporting, and protect required cross-app IPC with signature-level permissions.
  5. Bind biometrics to a key—a boolean callback is not authentication.

How to Identify if You're Vulnerable

Ask these questions about your app:

If you answered "no" or "not sure" to several of these, you likely have exploitable platform misuse today.

Next Steps