MASTG-DEMO-0140: Attacker App Registering for Internal Implicit Intent
Attacker App Disclaimer
This demo includes an attacker app. It's provided by the OWASP MAS project for educational and testing purposes only, to help developers and security testers understand how a weakness can be exploited and to verify that mitigations are effective.
The attacker app is harmless by design. It only uses public, documented platform APIs and the permissions or special access that the user explicitly grants. It doesn't exploit vulnerabilities in the operating system or in apps other than the demo's sample app, and it doesn't use hidden APIs or privilege escalation. It doesn't persist, hide itself, or send data off the device. Its results are only shown in the app or in its logs.
It is possible that Google Play Protect or other security software flags the app as a potentially harmful app; this is normal.
- Only use test data: When using the demo's sample app, make sure you only use dummy data. Do not add any sensitive data to any of the demo apps.
- Only use test devices: install the attacker app only on devices and emulators that you own or are authorized to test on. Never install it on devices used for personal or production purposes. When finished, disable or uninstall the app, and revoke any permissions or special access you granted, such as accessibility services or overlay permissions.
- Only allowed for authorized use: using these techniques against apps, devices, or users without explicit authorization may be illegal. Check the laws that apply to you before using any MASTG material, and see our Code of Conduct.
- No liability: the material is provided "as is", without warranty of any kind. OWASP, the MAS project, and its contributors aren't responsible for any misuse of this material or for any damage resulting from its use.
Download MASTG-DEMO-0140 APK Open MASTG-DEMO-0140 Folder Build MASTG-DEMO-0140 APK
Sample¶
The following attacker app registers an <intent-filter> for the custom action org.owasp.mastestapp.INTERNAL_ACTION, used in the Internal Activity Communication via Implicit Intent demo. When Android presents this app as a candidate handler and it is selected, it receives the victim app's intent and displays/logs the received extras.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Note that this app is not inherently malicious. It illustrates that any app can register for a custom action and be presented to the user as a valid handler. The actual vulnerability lies in the victim app using an implicit intent for internal component communication.
Steps¶
- Use Installing Apps to install the victim app from Internal Activity Communication via Implicit Intent.
- Use Installing Apps to install this attacker app on the same device.
- Launch the victim app and tap Start.
- If Android presents a resolver for
INTERNAL_ACTION, select this attacker app. - Run
run.shto capture the intercepted intent details from logcat.
| run.sh | |
|---|---|
1 2 3 | |
Observation¶
Android presents the attacker app as a candidate for handling INTERNAL_ACTION:

Once selected, the attacker app receives the intent and logs the action and extras sent by the victim app:
| output.txt | |
|---|---|
1 2 | |
Evaluation¶
The test case fails because the attacker app receives an implicit intent that the victim app ( Internal Activity Communication via Implicit Intent) intended for app-internal communication.
The log output confirms that the attacker app handled org.owasp.mastestapp.INTERNAL_ACTION and received the extras sent with the intent.
When the victim app dispatches this implicit intent, Android resolves any installed app with a matching <intent-filter> as a possible handler. If the attacker app is selected, the intent is delivered outside the victim app even though the flow was intended for InternalActivity.
The attacker app therefore controls the receiving component and can read the action and full extras Bundle, including values such as user_id and session_token.