Task Hijacking
Last updated
Last updated
Task hijacking is a vulnerability that affects Android applications due to the configuration of Task Control features in the AndroidManifest.xml
file. This flaw can allow an attacker or a malicious app to take over legitimate apps, potentially leading to information theft.
Scenario
Security implication (this scenario)
When the back button is pressed on Bank-Main-Activity
, the user will go to the Mal-Activity 2
.
Requirements:
The app can be installed on Android SDK version < 28 (Android 9). Check android:minSdkVersion
is < 28 in AndroidManifest.xml
This vulnerability is patched from Android SDK version 28. [🔗]
android:launchMode="singleTask"
in AndroidManifest.xml
(necessary for this scenario)
You can use malware apk by ivan sincek [🔗].
To hijack a task, modify the task affinity in AndroidManifest.xml
of malware.apk
under MainActivity
. Set it to PackageNameVictim
and rebuild the APK.
Example: