用于点击劫持的嵌套iframe

Nested iframes for clickjacking

本文关键字:嵌套 iframe 劫持 用于      更新时间:2023-09-26

我正在测试一个易受点击劫持的网站,我想在点击"查看"时打开一个链接,但框架中的这个链接是不可点击的,为什么???任何解决方案都将不胜感激。

 <style>
   iframe 
  { 
   width:500;
   height:500;
   position:absolute;
   top:0; left:0;
        filter:alpha(opacity=50); 
   opacity:0.5;
  }  
 </style>
  <iframe src="http://shop.swatch.com/de_ch/" name="testing"> </iframe> 
 <div> why link is not clickable ? </div>
  <p><a href="http://www.w3schools.com/" target="testing"> Check it out! </a></p> 


请参阅jsfiddle 上的此代码

检查新代码:jsfiddle
您必须为Check it out!使用position:absolute和更高的z-index属性

   iframe 
  { 
   width:500;
   height:500;
   position:absolute;
   top:0; left:0;
   filter:alpha(opacity=50); 
   opacity:0.5;
   z-index:-1;
  } 
.a{
    z-index:9999;
}
 <iframe src="http://shop.swatch.com/de_ch/" name="testing"> </iframe> 
     <div> why link is not clickable ? </div>
      <p><a class="a" href="http://www.w3schools.com/" target="testing"> Check it out! </a></p>