The attack principle and defense method of interface Operation hijacking

Source: Internet
Author: User

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

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.