Firefox for Android: Location Bar Spoofing Risk - The Location Bar remains hidden using scroll event and another website is loaded during this scroll event (Patch for Bug 1293463 doesn't prevent completely Location Bar Spoofing risks)
The patch for an earlier location bar spoofing bug only restores the real address bar when the user taps an editable field, so a page that hides the bar during scrolling and then slowly loads a second page can keep a fake address bar on screen. An attacker could show a forged URL and padlock while a victim types banking credentials on a fake keypad.
Originally disclosed on Mozilla
- Fixed in 3 days
- Paid in 9 days
- Disclosed after 3 days
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131
Steps to reproduce:
I noticed that the patch for Bug 1293463 does not prevent all Location Bar Spoofing risks because this patch consists to show the real location bar only when the user clicks on a HTML editable tag (<input type=text> ; <input type=password> ; <textarea>).
The essential problem of patch for Bug 1293463 is that the fake location bar continues to replace the real location bar.
Multiple websites, especially the bank websites allowing access to users' bank accounts using a numeric keypad or a web virtual keyboard to write its user credentials (customer-ID and Password).
So, a click on an input tag isn't used by these bank websites (leading to the fake location bar continue to be displayed and the real location bar remains hidden during the writing of user credentials by a numeric keypad or a web virtual keyboard).
NOTE: it's also possible to use fake Android Keyboard to write user credentials needed into a fake <input> tag.
Steps:
Step 1: Go to http://www.alternativ-testing.fr/Research/Mozilla/android/~h5fh85f9j03ftrK9-Location%20Bar%20Spoofing%20with%20scroll%20event%20and%20another%20webpage%20with%20a%20long%20time%20for%20loading~/index-start-1.html and click on the link (a Google search webpage will be opened into a new tab)
Step 2: Scroll down into this webpage (the location bar disappears) , during this scroll event a malicious webpage will load slowly without that the real Location Bar appears leading to Location Bar Spoofing risks (The real Location Bar remains hidden and a fake location bar will replace this real Location Bar).
<!>Step2 INFO : The loading time of the malicious webpage is 9 seconds when you go on the Google search webpage but this loading time can be changed by a bigger loading time. (The PHP code of "redirect-and-sleep().php" can be changed by a bigger or smaller loading time).<!>
Info about the malicious webpage: The malicious webpage, a numeric keypad should be used to write the Customer ID and the Password (like it is used on the login webpage in a bank website.
Actual results:
The fake location bar continue to be displayed and the real location bar remains hidden during the writing of user credentials by a numeric keypad or a web virtual keyboard.
The Location Bar remains hidden when the malicious webpage is loaded and this malicious webpage contains a fake Location Bar leading to a Location Bar URL / SSL Spoofing Risk.
Expected results:
The Location Bar should reappear when another webpage is loaded.
When the user scroll down into a first webpage and a 2nd webpage/website is loaded during this scroll event, the real location bar should reappear when the 2nd webpage is completely loaded.
Solution: The Location Bar should be always visible when another webpage is completely loaded.
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
Likely the browser only re-shows the real location bar on interaction with an editable field, so a page that hides it via scrolling and then loads a second page keeps the fake bar displayed.
Impact
A victim could be tricked into entering banking credentials into a page showing a forged URL and SSL indicator, though the report only demonstrates the spoofing on Firefox for Android.
What the attacker needed
Firefox for Android; victim scrolls the page; victim enters credentials on a fake keypad
The fix
The location bar should always reappear once another page has fully loaded, regardless of whether the user tapped an editable field.
How it was found
- Open the provided test page and click the link, which opens a search page in a new tab.
- Scroll down so the location bar disappears; during the scroll a second, slow-loading page is loaded.
- Observe that the real location bar stays hidden and a fake one is shown while credentials are entered on a numeric keypad.
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.
On mobile browsers the address bar often slides away as you scroll to give more room to the page. This report says that if a new page starts loading during that scroll, the browser never brings the real address bar back, so a fake one drawn by the page stays visible. A victim could then believe they are on their bank's site and type their login details into a fake keypad.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.