Skip to content
Account takeover Write-up Intermediate

Wow a deep link? Let’s hijack it to ATO

The target Android app exported a password-reset activity that accepted a web link containing a reset token, and its assetlinks.json did not list the legitimate app, so a malicious app could register the same link and appear in the chooser. An attacker could then capture the reset token and take over the account.

medium.com

Published on medium.com

Hi everyone — it’s CANITEY again. After a little break from writing, I’m back with my first finding in the Android bug-bounty world.

CANITEY, 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 password-reset activity accepted a web link with a token, and the domain's assetlinks.json did not include the legitimate app's signing certificate, so Android did not auto-verify the link and showed a chooser.

Impact

An attacker could capture the password-reset token and take over the victim's account, but the attack requires the victim to choose the malicious app from the chooser.

What the attacker needed

Victim clicks a reset link; malicious app installed; victim chooses malicious app

The fix

The app should either not export the reset-password activity or ensure the domain's assetlinks.json includes the legitimate app's signing certificate so Android auto-verifies the link and does not show a chooser.

How it was found

  1. Reverse the APK and inspect AndroidManifest.xml to find the exported reset-password activity with a web link intent filter.
  2. Check the domain's assetlinks.json and confirm the legitimate app is not listed.
  3. Create a new Android app with an activity that registers the same intent filter.
  4. In that activity, read the incoming intent's data (the reset URL) and display it.
  5. Install the malicious app and trigger a password reset to receive the link.
  6. Tap the reset link and observe the malicious app appear in the chooser.

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.

A deep link is a web address that opens a specific screen inside an app. Here, the app allowed any other app to claim the same password-reset link, and because the official app was not verified for that link, Android showed a chooser. A malicious app could be picked and steal the reset token, letting the attacker change the victim's password.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.