Protection against ClickJacking by IE 8

Source: Internet
Author: User

PairClickjackingIf you still don't understand, google

RecentIE 8 RC1Released and added a new feature to defend against ClickJacking.

For details, refer:
Http://blogs.msdn.com/ie/archive/2009/01/27/ie8-security-part-vii-clickjacking-defenses.aspx

Since IE is a browser, Microsoft has made full use of its inherent advantages by creating an HTTP header to defend against ClickJacking.

X-FRAME-OPTIONS

The original text is as follows:

Web developers can send a HTTP response header namedX-FRAME-OPTIONSWith HTML

Pages to restrict how the page may be framed. If the X-FRAME-OPTIONS value contains the tokenDENY,

IE8 will prevent the page from rendering if it will be contained within a frame. If the value contains the tokenSAMEORIGIN, IE will block rendering only if the origin of the top level-browsing-context is different

The origin of the content containing the X-FRAME-OPTIONS directive. For instance, if http://shop.example.com/confirm.asp contains a DENY direve ve, that page will not render in a subframe,

No matter where the parent frame is located. In contrast, if the X-FRAME-OPTIONS directive contains the SAMEORIGIN token, the page may be framed by any page from the exact http://shop.example.com origin.


If you do not like watching birds, you can view my summary:
1. If the returned HTTP header is X-Frame-OPTIONS: DENY, the page cannot be embedded.

In iframe, IE reports an error message.

2. If the returned HTTP header is X-Frame-OPTIONS: SAMEORIGIN, the page can only be embedded

In the "Same as TOP page" page. (Familiar with the same-origin policy should be well understood)


For programmers: add the HTTP return header to an important page.

Which has the same effect:Frame bustingSkills
We often see the following JavaScript code:

<script type="text/javascript">
If (top! = Self) top. location. href = self. location. href; </script>

The purpose is to prevent pages from being referenced by iframe. For example, many pages of baidu contain this section of js,
This is frame busting.

However, because this code is written in JS, there are many methods to bypass or possibly bypass.


If the HTTP header is used, it is more reliable. In general, Microsoft has done a good thing.

However, there are still some voices indicating defects:
Http://ha.ckers.org/blog/20090128/ie80-and-clickjacking/

Noscript authors are clamoring to say that he is the best.
Http://hackademix.net/2009/01/28/ie8s-clickjacking-protection-exposed/


In my opinion, it may take some time to popularize IE8, but it is worth looking forward. We hope MS can be better promoted.

In addition, we are worried that this defense scheme still relies on the skills of programmers and cannot be implemented.Secure by default

Bless!

Related Article

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: info-contact@alibabacloud.com 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.