opacity=0
iframe是目標網站 被內嵌了
1.用戶親手操做 盜取用戶
視頻javascript
2.用戶不知情
>* 引導點擊 其實點擊的是覆蓋在下面opacity=0的iframehtml
3.codejava
<body style="background: url(clickhijack.png) no-repeat"> <iframe src="http://localhost:1521/post/15" width="800" height="600"></iframe> </body>
4.點擊劫持防護
>* javascript禁止內嵌
>* X-FRAME-OPTIONS禁止內嵌web
5.防止方法安全
if(top.location !== window.location){ top.location = window.location; }
6.http頭處理
header('X-FRAME-OPTIONS: DENY')web安全