Skip to content
Access control Write-up Intermediate

An interesting Bug that I found in Android Mobile Application

An exported deep-link splash activity accepted an embedded Intent from an extra and passed it to startActivity, letting another app launch a non-exported WebView activity. The WebView activity loaded an attacker-supplied URL, and a javascript URL executed script inside the app's WebView.

jooelsaka Follow

Published on medium.com

I am writing this article to share an interesting bug that i found in one of the private bugbounty programs in hackerone first of all I would like to thank Sayed Abdelhafiz for helping me starting doing android penetration testing and for guiding me and for sure Sergey Toshin for his Writeups

dnelsaka, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the exported activity read a Parcelable Intent from an extra and passed it straight to startActivity without validating the target component, allowing intent redirection into a non-exported WebView activity.

Impact

An attacker app could open a protected WebView screen and run script in it, but attempts to reach private files or unexported content providers were blocked by permissions, so the impact stayed limited.

What the attacker needed

Attacker app installed on the device; no user interaction beyond launching the app

How it was found

  1. Build an Intent targeting the non-exported WebView activity with a URL extra.
  2. Wrap that Intent as the referrerActivity extra of an Intent targeting the exported splash activity.
  3. Start the exported activity from a separate app.
  4. Observe the WebView activity opening with the supplied URL.
  5. Repeat with a javascript URL to get script execution in the WebView.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Android apps can mark some screens (activities) as private so other apps cannot open them directly. Here a public screen took a packaged request from another app and opened a private screen on its behalf, and that private screen showed a web page chosen by the attacker. Because the page ran inside the app, script in it could run with the app's own trust.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.