<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>beer planet &#187; click jacking</title> <atom:link href="http://beerpla.net/tag/click-jacking/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Fri, 06 Jan 2012 08:50:59 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/> <item><title>Modern-Day Frame Busting With X-FRAME-OPTIONS And &quot;This content cannot be displayed in a frame&quot; Warnings</title><link>http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/</link> <comments>http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/#comments</comments> <pubDate>Fri, 30 Oct 2009 01:10:32 +0000</pubDate> <dc:creator>Artem Russakovskii</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[click jacking]]></category> <category><![CDATA[clickjacking]]></category> <category><![CDATA[deny]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[frame busting]]></category> <category><![CDATA[framebusting]]></category> <category><![CDATA[framekiller]]></category> <category><![CDATA[internet explorer]]></category> <category><![CDATA[same-origin]]></category> <category><![CDATA[sameorigin]]></category> <category><![CDATA[x-frame-options]]></category> <category><![CDATA[xss]]></category> <guid
isPermaLink="false">http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/</guid> <description><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image.png" class="lightview" rel="gallery['1194']" title="image"><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image_thumb.png" width="150" height="150" /></a> Today I found out something entirely new about <a
href="http://en.wikipedia.org/wiki/Framekiller" rel="nofollow">framebusting</a> and specifically <a
href="http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/">clickjacking</a> protection techniques.</p><p>I was working with a site that was using frames. Suddenly, one of the frames (which was hosted on a domain that differed from the one it was embedded in) displayed the following message (in Firefox 3.5.4):</p><div
class="wp_syntax"><div
class="code"><pre>This content cannot be displayed in a frame
&#160;
To protect your security, the publisher of this content does
not allow it to be displayed in a frame.
&#160;
Click here to open this content in a new window</pre></div></div><p><a
href="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image_3.png" class="lightview" rel="gallery['1194']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image_thumb_3.png" width="677" height="221" /></a></p><p>Notice how this is a native Firefox window and not a web page rendering. Quite stumped, I started looking at the frame response and...<div
class=clear></div> <a
href="http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/" class="read_more"><div
class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description> <content:encoded><![CDATA[<p><a
href="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image.png" class="lightview" rel="gallery['1194']" title="image"><img
style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image_thumb.png" width="150" height="150" /></a> Today I found out something entirely new about <a
href="http://en.wikipedia.org/wiki/Framekiller" rel="nofollow">framebusting</a> and specifically <a
href="http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/">clickjacking</a> protection techniques.</p><p>I was working with a site that was using frames. Suddenly, one of the frames (which was hosted on a domain that differed from the one it was embedded in) displayed the following message (in Firefox 3.5.4):</p><div
class="wp_syntax"><div
class="code"><pre>This content cannot be displayed in a frame
&nbsp;
To protect your security, the publisher of this content does
not allow it to be displayed in a frame.
&nbsp;
Click here to open this content in a new window</pre></div></div><p><a
href="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image_3.png" class="lightview" rel="gallery['1194']" title="image"><img
style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://beerpla.net/wp-content/uploads/ModernDayFrameBustingWithXFRAMEOPTIONSAn_F770/image_thumb_3.png" width="677" height="221" /></a></p><p>Notice how this is a native Firefox window and not a web page rendering. Quite stumped, I started looking at the frame response and finally found that it included this little header:</p><div
class="wp_syntax"><div
class="code"><pre>X-FRAME-OPTIONS: DENY</pre></div></div><p>Turns out that modern browsers like <strike>Firefox 3.5</strike> (turns out it&#039;s the <a
href="https://addons.mozilla.org/en-US/firefox/addon/722" rel="nofollow">NoScript addon</a> that does this and not Firefox itself) and IE8 treat this header as a precautionary measure and display a generic &quot;warning&quot; to the user instead of the page content in certain conditions described below. This effort, <a
href="http://blogs.msdn.com/ie/archive/2009/01/27/ie8-security-part-vii-clickjacking-defenses.aspx" rel="nofollow">led, surprisingly, by Microsoft</a>, was really to protect users from clickjacking (I wrote about clickjacking <a
href="http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/">here</a> earlier) but can be viewed as an alternative to framebusting.</p><p>Microsoft introduced the new X-FRAME-OPTIONS header with the following possible values:</p><ul><li>DENY &#8211; prevents the page from being rendered if it is contained in a frame</li><li>SAMEORIGIN &#8211; same as above, unless the page belongs to the same domain as the top-level frameset holder.</li></ul><p><strike>Firefox adopted this technique a few months later</strike> (again, I was wrong here &#8211; it was NoScript that did it), and I expect other browsers to follow.</p><p>So what does it mean to you, the developer?</p><ul><li>setting such a header will essentially render frame busting code unnecessary in modern browsers</li><li>but it has a downside of displaying a relatively ugly warning to the user</li><li>no automatic redirect is done as your page (including any framebusting code) is not loaded</li><li>thus requiring an extra click</li><li>and popping up a new tab or window</li><li>it will work even if the user has Javascript disabled, which is more secure</li></ul><p>Some useful discussion on the issue can also be found in <a
href="http://hackademix.net/2009/01/29/x-frame-options-in-firefox/" rel="nofollow">this post</a> on Hackademix.net.</p><p>So is it good practice to use this new X-FRAME-OPTIONS header instead of the traditional framebusting code? I definitely think so, especially if Firefox and other browsers start supporting it. What do you say?</p><div
class="shr-bookmarks shr-bookmarks-expand"><ul
class="socials"><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-googlebuzz"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a></li><li
class="shr-reddit"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li><li
class="shr-hackernews"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a></li><li
class="shr-delicious"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li
class="shr-stumbleupon"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day+Frame+Busting+With+X-FRAME-OPTIONS+And+%26quot%3BThis+content+cannot+be+displayed+in+a+frame%26quot%3B+Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Modern-Day%20Frame%20Busting%20With%20X-FRAME-OPTIONS%20And%20%26quot%3BThis%20content%20cannot%20be%20displayed%20in%20a%20frame%26quot%3B%20Warnings&amp;link=http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/&amp;notes=%20Today%20I%20found%20out%20something%20entirely%20new%20about%20framebusting%20and%20specifically%20clickjacking%20protection%20techniques.%0D%0AI%20was%20working%20with%20a%20site%20that%20was%20using%20frames.%20Suddenly%2C%20one%20of%20the%20frames%20%28which%20was%20hosted%20on%20a%20domain%20that%20differed%20from%20the%20one%20it%20was%20embedded%20in%29%20displayed%20the%20following%20message&amp;short_link=http://bit.ly/chOjyg&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li></ul><div
style="clear: both;"></div></div> Similar Posts:<ul><li><a
href="http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/" rel="bookmark" title="February 12, 2009">How To Fight Clickjacking (Using The Recent Twitter Hijacking As An Example)</a></li><li><a
href="http://beerpla.net/2009/11/21/meet-firefox-for-mobile-video-feature-highlights-more-info/" rel="bookmark" title="November 21, 2009">Meet Firefox For Mobile [Video + Feature Highlights + More Info]</a></li><li><a
href="http://beerpla.net/2007/08/04/watch-a-useful-linux-command-you-may-have-never-heard-of/" rel="bookmark" title="August 4, 2007">Watch &#8211; A Useful Linux Command You May Have Never Heard Of</a></li><li><a
href="http://beerpla.net/2009/06/09/how-to-make-your-site-lightning-fast-by-compressing-deflategzip-your-html-javascript-css-xml-etc-in-apache/" rel="bookmark" title="June 9, 2009">How To Make Your Site Lightning Fast* By Compressing (deflate/gzip) Your HTML, Javascript, CSS, XML, etc In Apache</a></li><li><a
href="http://beerpla.net/2006/06/12/rendr-a-live-awesome-csshtml-rendering-tool/" rel="bookmark" title="June 12, 2006">Rendr &#8211; a Live Awesome CSS/HTML Rendering Tool</a></li></ul><p><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbeerpla.net%2F2009%2F10%2F29%2Fmodern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings%2F&amp;title=Modern-Day%20Frame%20Busting%20With%20X-FRAME-OPTIONS%20And%20%26quot%3BThis%20content%20cannot%20be%20displayed%20in%20a%20frame%26quot%3B%20Warnings" id="wpa2a_2"><img
src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://beerpla.net/2009/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
