[Local Attack] drag & drop URL into addressbar with a local html file can lead to addressbar URL & SSL Spoofing and Cross Domain URL Stealing
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
People
(Reporter: jordi.chancel, Unassigned)
References
Details
(Whiteboard: [fixed by bug 1542415])
Attachments
(5 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
When user drag & drop URL into AddressBar with a local .html file , this can lead to:
-A) AddressBar Spoofing (URL & SSL Spoofing)
-B) Cross Domain URL Stealing
(A) AddressBar Spoofing STR:
-1) Download the malicious HTML file, open it with Firefox, drag & drop the URL into AddressBar.
-2) Now you are on the HTTPS: attacker web-page, use the Right-Click on the <input type=text > and click "Paste" into the Contextmenu.
Results:
This lead to AddressBar Spoofing (URL & SSL Spoofing)
(B) Cross Domain URL Stealing STR:
-1) Download the malicious HTML file, open it with Firefox, drag & drop the URL into AddressBar.
-2) Now you are on the HTTPS: attacker web-page, use the Right-Click on the <input type=text > and click "Paste" into the Contextmenu.
-3) Press ENTER Key.
Results:
This lead to Cross-Domain URL Stealing.
Actual results:
This Vulnerability can lead to AddressBar Spoofing (URL & SSL Spoofing)
and Cross-Domain URL Stealing.
Explanation:
When user drag & drop an URL into the Address Bar with a local HTML file, The address bar is directly writable.
Expected results:
When user drag & drop an URL into the Address Bar with a local HTML file, The address bar is directly writable
| Reporter | ||
Comment 1•7 years ago
|
||
The AddressBar Spoofing testcase.
| Reporter | ||
Comment 2•7 years ago
|
||
The Cross-Domain URL Stealing TestCase.
| Reporter | ||
Comment 3•7 years ago
|
||
I will upload a video-demo quickly (I only tested these Test Cases on Mac OS).
Updated•7 years ago
|
| Reporter | ||
Comment 4•7 years ago
|
||
| Reporter | ||
Comment 5•7 years ago
|
||
| Reporter | ||
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 7•7 years ago
•
|
||
Since this requires a local file and a "drag & drop" to trigger let's open this up to help get some attention.
Updated•7 years ago
|
| Reporter | ||
Comment 8•7 years ago
|
||
I restricted access to this bug temporarily because:
I think discovered several ways to lead to the same AddressBar Spoofing Vulnerability (working remotely),
(*1): without need to download a local html file and so use it remotely (with http: or https: URL),
(*2): without need a drag & drop into addressbar by user,
(*3): and perhaps without need a Right-Click to click on "paste" into contextmenu by user.
I will quickly add new comment to say if it's possible or not,
(if that is not possible, I will make this bug for public access again).
Please let's me two or three days to define and code a new testcase if it is possible.
Updated•7 years ago
|
Updated•7 years ago
|
Comment 10•7 years ago
|
||
If we get more data we can hide it again. Please mail our security alias if you want the bug hidden (can't remember if the reporter always gets the checkbox or not).
Comment 11•7 years ago
|
||
CC'ing Marco since his opinion would be helpful.
I can reproduce both (A) and (B) on 66 but not on the current Nightly. (I'm on Mac too.) The core of the problem is that the urlbar retains focus after the drag and drop, and even after right-clicking the input and pasting. On Nightly, the urlbar gets focus after the drag and drop, but the alert remains visible after the new page is closed, and there doesn't seem to be a way to dismiss it without making the urlbar lose focus, so the subsequent paste properly pastes into the input.
The alert() on the local page seems to be necessary. When I comment it out, the urlbar does not retain focus, so the paste step doesn't work. So ultimately this looks like a focus problem related to tab-modal dialogs, and retaining or not retaining tab-modal dialogs across page loads.
This doesn't seem like a P1 since it's a little convoluted, unless comment 8 pans out. It might ought to be moved to a tab-modal component (Firefox::Tabbed Browser? Toolkit::XUL Widgets?) but since it features the urlbar so prominently, I'll leave it here for now.
Comment 12•6 years ago
|
||
Drew, I can't reproduce this also with 66, though I only tried on Windows, so it's likely Mac only.
I see you could reproduce the problem, if so it would be very useful to find the fix-range using mozregression, and connect this to the bug that fixed the underlying focus problem, to ensure that is covered by some test.
Comment 13•6 years ago
|
||
mozregression narrowed down this range: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=30b70a449280e6df10496a51e89c01b8c98bb92e&tochange=72be82c6809e2cc187e5cffdff0c3e686c564a57
Unfortunately it couldn't find archived builds between these two Nightlies, so it couldn't narrow it down any further. Nothing stands out, but there are some bugs related to attributes on custom elements. There's also this changeset related to frameloaders: https://hg.mozilla.org/mozilla-central/rev/98adabf295d0bdd1d48cf715fb8ac8ea4ead8766
That changeset got backed out, but outside the revision range in a different Nightly. (It landed again at https://hg.mozilla.org/mozilla-central/rev/dc66462519e1.) I tried running the first Nightly with that changeset, and the bug doesn't happen. I toggled the pref that it created to false, and the bug started happening. I also tried the Nightly before it landed, and the bug happens there too. So it looks like that changeset inadvertently fixed this.
I don't know yet whether there's a test to cover something like this bug, but I doubt it since fixing this bug seems like a happy side effect.
Description
•