1. Attack principle
Interface hijacking, divided into click Hijacking, drag-and-drop hijacking, touch screen hijacking. Is our click, drag and drop, touch screen operation was hijacked, and to operate the other transparent hidden interface. The principle is to use the transparent layer +iframe, using the CSS opacity and Z-index properties, to reach the transparent and above other interfaces, and then use the IFRAME to embed the hijacked page. It's not what he sees, it's not the interface he thinks it is, it's the transparent interface on the upper level.
2. Defense Methods
Interactive pages with important sessions are not allowed to embed with IFRAME, or values allow embedding in an IFRAME of the same domain.
2.1 X-frame-options
Add a x-frame-options header to the HTTP response header on the Web server side, with a value of "DENY" and "Sameorigin", which indicates that the IFRAME cannot be used and only the IFRAME with the same domain can be used.
2.2 Frame Busting Scripting defense
if (top.location! = self.location) {= self.location;}
3. Valuable Reference links
http://blog.csdn.net/hfahe/article/details/8138728
http://bbs.pediy.com/showthread.php?p=1360094
http://blog.avlyun.com/2014/03/254/%E8%AD%A6%E6%83%95%E5%8F%A6%E7%B1%BBactivity%E5%8A%AB%E6%8C%81/
4. Web-safe bibliography
Analysis and defense of XSS cross-site scripting attacks
"The secret of Web front-end hacker technology"
"White hat speaks web security"
The attack principle and defense method of interface Operation hijacking