tapjacking on Custom Tabs using transitioning task
Categories
(Firefox for Android :: General, defect, P2)
Tracking
()
People
(Reporter: sas.kunz, Assigned: marcin)
References
()
Details
(Keywords: csectype-clickjacking, reporter-external, sec-moderate, Whiteboard: [client-bounty-form][adv-main154+])
Attachments
(2 files, 1 external file)
In the permission prompt, there is an anti-tapjacking that appears a few seconds after tapping, but does not immediately allow, but this can be bypassed.
This vulnerability is almost similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 (using makeCustomAnimation transition ), but in this bug occurs when the anti-clickjacking timing can be bypassed when transitioning between an app and a Firefox CT . on the permission dialog. I used the poc https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 with some changes.
Steps to reproduce:
- Grant Firefox permission to access the user's camera
- Install the PoC application (find the source code here)
- do two taps on blue button
- do two taps on red button
The site is now allowed to access the camera
OS : Android 15
Device: Samsung A56
I have reported to chromium vrp : https://issues.chromium.org/issues/425487297
Updated•1 year ago
|
Updated•1 year ago
|
the source code : https://drive.google.com/file/d/1u-OAe20YteF3_lokeRyRKeP39pjTJrHD/view
Comment 4•1 year ago
|
||
The custom tab contents appear to be https://webrtc.github.io/test-pages/src/iframe-video/
I used the poc https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 with some changes.
Could you describe the changes? publish a diff? There's a lot of random code to wade through
I changed the code from poc https://bugzilla.mozilla.org/show_bug.cgi?id=1928334 which is at :(https://gitfront.io/r/philippbeer/PZo34NhDiR1c/tapjacking-browser-poc/) (I read it at https://issues.chromium.org/issues/376491759).
I changed the post delayed section and others on MainActivity.kt:
handler.postDelayed({
button.visibility = Button.INVISIBLE
button2.visibility = Button.INVISIBLE
val intent2 = Intent(this, MainActivity::class.java)
// start with no animations
intent2.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent2)
}, 2700)
from 2700 to 2100
handler.postDelayed({
button.visibility = Button.INVISIBLE
val intent2 = Intent(this, MainActivity::class.java)
// start with no animations
intent2.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION)
startActivity(intent2)
}, 2100)
and on
become :
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="0.01"
android:duration="1000" />
Updated•1 year ago
|
Hi can fix of bugs (https://bugzilla.mozilla.org/show_bug.cgi?id=2040834) (happening in extension dialog) , Can it be applied to the bug here because almost similar ?
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
| Assignee | ||
Comment 7•5 months ago
|
||
| Assignee | ||
Comment 8•5 months ago
|
||
Comment on attachment 9597815 [details]
(secure)
Security Approval Request
- How easily could an exploit be constructed based on the patch?: Moderately I guess? If someone understands that
ExternalAppBrowserActivitymeans "custom tabs", then they know the exploit involves launching a custom tab. And since we modifyonEnterAnimationCompleteand forward it toSitePermissionsDialogFragment, they can deduce that it involves setting an enter animation to bypass protections in site permissions prompt. - Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: No
- Which branches (beta, release, and/or ESR) are affected by this flaw, and do the release status flags reflect this affected/unaffected state correctly?: all branches, would you like me to update the status flags?
- If not all supported branches, which bug introduced the flaw?: None
- Do you have backports for the affected branches?: No
- If not, how different, hard to create, and risky will they be?: I assume this uplifts cleanly to other branches
- How likely is this patch to cause regressions; how much testing does it need?: unlikely
- Is the patch ready to land after security approval is given?: Yes
- Is Android affected?: Yes
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 10•5 months ago
|
||
Updated•5 months ago
|
Comment 11•5 months ago
|
||
The patch landed in nightly and beta is affected.
:mkozinski, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox153towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•5 months ago
|
Updated•4 months ago
|
Comment 12•4 months ago
|
||
This is an automated duplicate detection tool. It suggests that Bug 2036169 should be marked as a duplicate of this bug. The reasoning is: This reproduces the unmodified Chromium-376491759 / bug-1928334 PoC APK against the Custom Tabs site-permission prompt - the same enter-animation timing hole bug 1978587 fixed by forwarding onEnterAnimationComplete. Filed before that fix landed; a retest on ColorOS with the fix is recommended.
Updated•3 months ago
|
Updated•3 months ago
|
| Reporter | ||
Comment 14•3 months ago
|
||
Hi Is this bug eligible for bounty? Thanks
Comment 15•3 months ago
|
||
I don't know until the bounty committee decides, and the bug is already being tracked for that.
Comment 16•3 months ago
|
||
Although this is partly a vulnerability in Firefox, it's not abusable from other web content: it requires a malicious app installed as well. In this example, one you trusted enough to install but didn't trust enough to grant camera access to, so it hijacked Firefox for that? I suspect this is actually an Android vulnerability with their transition to the custom tab
Updated•25 days ago
|
Description
•