Exploiting an Exported Android Activity via Intent Injection
An exported Android activity accepts unsanitised Intent extras and displays them directly in a popup dialog. An attacker can use ADB to launch the activity with arbitrary text, causing UI spoofing, phishing messages, or denial of service.
medium.com
Published on medium.com
Android applications often rely on Intents for communication between components. While this mechanism is powerful, improper handling of Intent data can introduce serious security vulnerabilities.
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
The activity is exported and trusts external Intent input without validation or sanitisation before rendering it in the UI.
Impact
An attacker could trigger popup spam, perform UI spoofing, display phishing messages, or cause denial of service; if the data is rendered in a WebView without encoding, it could lead to JavaScript injection or XSS.
What the attacker needed
ADB access to the device; the target app installed
The fix
The activity should be set to android:exported="false" if external access is not needed, or protected with a custom permission and validated input if it must remain exported.
How it was found
- Load the APK into JADX and search for sensitive keywords such as getIntent(), getExtras(), or getString().
- Trace the data flow to see how external input is used.
- Review AndroidManifest.xml to check if the activity is exported and lacks permission protection.
- Confirm the retrieved Intent data is rendered directly into the UI without validation.
- Connect to the device using adb connect.
- Trigger the exported activity with adb shell am start, adding a message extra.
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 expose parts of themselves (called activities) so other apps or tools can start them. If such an activity takes extra data (an 'Intent extra') and shows it without checking, anyone can send their own text. Here, an attacker with access to the device via ADB can make the app display a fake message.
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.