MASTG-DEMO-0140: Attacker App Registering for Internal Implicit Intent
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.