Deeplinks and IPC
Mobile apps aren’t islands: they communicate with other apps and with the system through IPC (Inter-Process Communication) and deeplinks (links that open the app on a specific screen). If those entry points don’t validate who invokes them or the input they receive, they become an attack surface: another app —or a web page— can invoke internal functions, pass malicious data, or bypass UI controls. It’s the core of the MASVS-PLATFORM category.
flowchart LR
ATT["Attacker app/web"] -->|"targetapp://..."| OS["System (Intent resolver)"]
OS --> COMP["Exported component"]
COMP --> PARAM["Unvalidated parameters"]
PARAM --> WV["WebView -> XSS"]
PARAM --> QRY["Query -> SQLi/traversal"]
PARAM --> ACT["Sensitive action, no re-auth"]
Threat model
Section titled “Threat model”The attacker here is another installed app or a web page the user visits. It needs no special permissions: it only needs the target app to expose a weak entry point.
- Access to internal functions: invoke screens/actions bypassing navigation and its controls.
- Parameter injection: what arrives via the deeplink ends up in a WebView (XSS), a query (SQLi), a file (path traversal), or a loaded URL (open redirect).
- Sensitive actions without re-authentication: transfers, account changes, deletions triggered from a link.
- Data theft: a deeplink that makes the app send information to a controlled destination.
Deeplinks: types
Section titled “Deeplinks: types”- Android — Custom scheme (
targetapp://screen?param=value): any app can invoke it, unverified. - Android — App Links (
https://target.com/...): domain-verified viaassetlinks.json, more secure. - iOS — URL Schemes (
targetapp://...): like the custom scheme, unverified; also ambiguous resolution if two apps register the same scheme. - iOS — Universal Links (
https://target.com/...): domain-verified viaapple-app-site-association(AASA).
Custom schemes are unverified: any app or web page can invoke them, so whatever the app does with them must be validated.
Enumerating deeplinks
Section titled “Enumerating deeplinks”# Android: from the decoded manifest, find <intent-filter> with <data android:scheme=...>apktool d app.apk -o out/grep -A6 'intent-filter' out/AndroidManifest.xml | grep -E 'scheme|host|android:exported'# iOS: from Info.plist (URL schemes and associated domains)plutil -p App.app/Info.plist | grep -A6 CFBundleURLSchemes# Universal Links: entitlement com.apple.developer.associated-domainsTesting deeplinks
Section titled “Testing deeplinks”# Android: invoke a deeplink and see which screen/action it reachesadb shell am start -W -a android.intent.action.VIEW \ -d "targetapp://admin?debug=1" com.target.app# iOS: with the simulatorxcrun simctl openurl booted "targetapp://admin?debug=1"# on device: open the URL (Notes/Safari) or launch it with FridaIPC components (Android)
Section titled “IPC components (Android)”Beyond deeplinks, exported components are pure IPC:
# Activities, Services, Broadcast Receivers, Content Providers with exported=trueadb shell am start -n com.target.app/.SecretActivity # Activityadb shell am start-service -n com.target.app/.AdminService # Serviceadb shell am broadcast -a com.target.app.ACTION_X # Broadcastadb shell content query --uri content://com.target.app.provider/data # Provider# drozer automates the analysis of this whole surfacedrozer console connectrun app.package.attacksurface com.target.appAn exported Content Provider without permissions can leak data or be vulnerable to SQLi/path traversal; a Receiver can trigger logic with forged intents. See also Android Pentesting.
iOS: IPC and pasteboard
Section titled “iOS: IPC and pasteboard”- URL schemes and Universal Links (above): validate origin and parameters.
- App groups and shared containers: data accessible across apps in the same group.
- General pasteboard: data shared between apps; avoid leaving secrets.
- App extensions (share, widgets): additional entry surface.
Red Team
Section titled “Red Team”Testing against an app you own or have permission to test:
- Enumerate all schemes/hosts and exported components (manifest/Info.plist, drozer).
- Invoke each deeplink and observe which screen it reaches and what parameters it accepts.
- Test unauthorized access:
targetapp://admin,targetapp://transfer?to=attacker&amount=1000to bypass the UI/checks. - Inject via parameters: XSS if it reaches a WebView (see XSS), SQLi/traversal if it reaches a query/file, open redirect if the URL is loaded.
- Check re-authentication on sensitive flows triggered by a deeplink.
# example: check direct access to an internal screenadb shell am start -a android.intent.action.VIEW -d "targetapp://transfer?to=mallory&amount=1000" com.target.appBlue Team
Section titled “Blue Team”- Validate the input of deeplinks/intents (parameters, destinations) like any untrusted input.
- Prefer App Links / Universal Links (domain-verified) over custom schemes.
- Minimise exported components;
exported=falseby default; protect the necessary ones withsignaturepermissions. - Don’t run sensitive actions from a deeplink without re-authentication or user confirmation.
- Secure WebViews if a parameter reaches them: no unnecessary JS, no loading of controllable URLs.
- Validate the origin (
getCallingPackage()on Android, thesourceApplication/domain on iOS) when the caller matters.
Checklist
Section titled “Checklist”- Enumerate deeplinks (manifest / Info.plist / AASA / assetlinks)
- Invoke deeplinks and see which screens/actions they reach
- Unauthorized access to internal functions via deeplink
- Parameter injection (XSS in WebView, SQLi, traversal)
- Exported Android components (
am/content, drozer) - Content Providers: SQLi / path traversal / data leak
- Sensitive flows without re-authentication
- iOS: URL schemes, Universal Links, pasteboard, app groups