com.reddit.frontpage vulernable to Task Hijacking (aka StrandHogg Attack)
The Reddit Android app is vulnerable to task hijacking, where a malicious app can set its taskAffinity to match the legitimate app's package, causing the victim to open the malicious app instead. An attacker could then phish the victim's login credentials or gain additional permissions in the name of the legitimate app.
- Disclosed after 3 months
Summary:
The app com.reddit.frontpage is vulnerable to Task Hijacking used by widespread Android trojans. Task hijacking allows malicious apps to inherit permissions of vulnerable apps and is usually used for phishing login credentials of victims.
Impact:
Assuming a malicious actor want's to grab the login credentials of an app user they can hijack the main tasks by overriding the taskAffinity to the vulnerable android package. When the victim then tries to open the legitimate app the malicious app can inject their own activities and phish credentials of the victim.
Steps To Reproduce:
- Victim installs malicious app
- Victim starts malicious app (could also be a background service)
- Victim opens legitimate app which the malicious app can intercept.
This does NOT require root nor any permissions in the malicious app. To prevent this attack you will need to set taskAffinity property of the application activities to ""(empty string) in the <activity> tag of the AndroidManifest.xml to force the activities to use a randomly generated task affinity, or set it at the <application> tag to enforce on all activities in the application.
This vulnerability applies to all Android Versions before Android 11.
Supporting Material/References:
- https://promon.co/security-news/strandhogg/
- https://arstechnica.com/information-technology/2019/12/vulnerability-in-fully-patched-android-phones-under-active-attack-by-bank-thieves/
- Found by: https://ostorlab.co/ Mobile App scanner
Impact
An attacker could phish the victims user credentials or get additional permissions in the name of the legitimate app which then again could be abused for eavesdropping etc.
Attachments
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The app does not set taskAffinity to an empty string or a unique value, allowing other apps to hijack its tasks.
Impact
An attacker could phish the victim's user credentials or get additional permissions in the name of the legitimate app, which could then be abused for eavesdropping etc.
What the attacker needed
Victim installs malicious app; Victim starts malicious app; Victim opens legitimate app; Android version before 11
The fix
Set the taskAffinity property of the application activities to an empty string in the <activity> tag of the AndroidManifest.xml, or set it at the <application> tag to enforce on all activities.
How it was found
- Victim installs malicious app
- Victim starts malicious app (could also be a background service)
- Victim opens legitimate app which the malicious app can intercept.
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 report has not been written yet. The Original tab links to the source.
Android apps can share a 'task' (a stack of screens) if they declare the same task affinity. A malicious app can set its task affinity to match the Reddit app's package name, so when the user taps the Reddit icon, the malicious app's screen appears instead. This lets the attacker show a fake login page and steal credentials.
What is Mobile?
Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.