<?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; protect</title>
	<atom:link href="http://beerpla.net/tag/protect/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>Tue, 27 Jul 2010 04:25:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/>
		<item>
		<title>How To Fight Clickjacking (Using The Recent Twitter Hijacking As An Example)</title>
		<link>http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/</link>
		<comments>http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 19:43:53 +0000</pubDate>
		<dc:creator>Artem Russakovskii</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[click]]></category>
		<category><![CDATA[clickjacking]]></category>
		<category><![CDATA[combat]]></category>
		<category><![CDATA[fight]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[jacking]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[noscript]]></category>
		<category><![CDATA[protect]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[xss]]></category>
		<guid isPermaLink="false">http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/</guid>
		<description><![CDATA[<h2><img style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image.png" width="150" height="138" /> Introduction</h2>
<p><a href="http://en.wikipedia.org/wiki/Clickjacking">Clickjacking</a> is a malicious technique of tricking web users into revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages. A vulnerability across a variety of browsers and platforms, a clickjacking takes the form of embedded code or script that can execute without the user&#039;s knowledge, such as clicking on a button that appears to perform another function (credit: Wikipedia).</p>
<p>Clickjacking is hard to combat. From a technical standpoint, the attack is executed using a combination of <a href="http://en.wikipedia.org/wiki/Css">CSS</a> and <a href="http://en.wikipedia.org/wiki/IFrame">iFrames</a>, which are both harmless web technologies, and relies mostly on...<div class=clear></div> <a href="http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/" class="read_more"><div class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description>
			<content:encoded><![CDATA[<h2><img style="margin: 0px 10px 10px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image.png" width="150" height="138" /> Introduction</h2>
<p><a href="http://en.wikipedia.org/wiki/Clickjacking">Clickjacking</a> is a malicious technique of tricking web users into revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages. A vulnerability across a variety of browsers and platforms, a clickjacking takes the form of embedded code or script that can execute without the user&#039;s knowledge, such as clicking on a button that appears to perform another function (credit: Wikipedia).</p>
<p>Clickjacking is hard to combat. From a technical standpoint, the attack is executed using a combination of <a href="http://en.wikipedia.org/wiki/Css">CSS</a> and <a href="http://en.wikipedia.org/wiki/IFrame">iFrames</a>, which are both harmless web technologies, and relies mostly on tricking users by means of social engineering. Additionally, the only server side technique against clickjacking known to me is “<a href="http://en.wikipedia.org/wiki/Framekiller">frame breaking</a>”, which would cause a legitemate site to break out of any iFrames it may be embedded in. This is not always the desired behavior and is generally frowned upon.</p>
<p><div class="note"><div class="noteclassic"><a href="http://en.wikipedia.org/wiki/Cross-site_scripting">XSS</a> and <a href="http://www.codinghorror.com/blog/archives/001171.html">CSRF</a> are examples of similar malicious web attacks.</div></div></p>
<h2>Generic Example</h2>
<p>In laymen’s terms, clickjacking means that it is quite possible for websites to trick you into, for example, clicking a button to show a cute kitty while in reality prompting a deletion of all your hotmail email. A malicious site uses an iFrame (which essentially allows embedding sites within other sites) with hotmail loaded inside and hidden using CSS (which is a web language for styling HTML elements). A button named “Show Me The Next Awwww Kitty” is then placed by the malicious site and positioned below the iFrame layer (manipulated by CSS, yet again). However, because the iFrame is hidden, it looks like the “Aww” button is all you’re clicking. Wrong!</p>
<p><a href="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image_3.png" class="lightview" rel="gallery[774]" 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/HowToFightClickjackingUsingTheRecentTwit_8F77/image_thumb.png" width="351" height="92" /></a>&#160;</p>
<h2>Latest Example: Twitter</h2>
<p>This morning a new, though harmless, epidemic hit twitter. Hundreds and thousands of messages saying “Don’t Click: <a href="http://tinyurl.com/amgzs6" rel="nofollow">http://tinyurl.com/amgzs6</a>” started showing up. Clicking the link shows a simple page with 1 button:</p>
<p><a href="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image_4.png" class="lightview" rel="gallery[774]" 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/HowToFightClickjackingUsingTheRecentTwit_8F77/image_thumb_3.png" width="183" height="129" /></a> Clicking (which I of course did) uses clickjacking to repost the message to your own twitter account. Take a look yourself: <a title="http://search.twitter.com/search?q=don%27t+click" href="http://search.twitter.com/search?q=don%27t+click" rel="nofollow">http://search.twitter.com/search?q=don%27t+click</a>.</p>
<p><a href="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image_5.png" class="lightview" rel="gallery[774]" 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/HowToFightClickjackingUsingTheRecentTwit_8F77/image_thumb_4.png" width="504" height="492" /></a></p>
<p>All of these are a result of an experiment by <a href="http://www.korben.info/petit-cours-de-twitt-jacking.html" rel="nofollow">some French guys</a> to mess around with twitter and show the effects of clickjacking. Thank you for that, French guys. Creating awareness via the most social platform on the web is the best thing they could do for us.</p>
<p><div class="note"><div class="notetip">Twitter rolled out a quick fix, using the very “frame breaking” technique I mentioned earlier. Now any site trying to embed twitter in an iFrame will redirect to it.</div></div></p>
<h2>Fight Clickjacking</h2>
<p><img style="margin: 0px 10px 0px 0px; display: inline" title="image" alt="image" align="left" src="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image_6.png" width="150" height="150" /> James Padolsey recently wrote an excellent <a href="http://james.padolsey.com/general/clickjacking-twitter/">blog post about clickjacking</a> and mentioned Twitter specifically. Because clickjacking relies mostly on social hacking (i.e. tricking people into clicking malicious links and buttons), Twitter is nothing but a perfect platform. James gives some nice background info and code examples. He correctly highlights, as I did earlier, that clickjacking is not a software bug – it’s a malicious technique exploiting harmless technologies.</p>
<h4>So how does one fight clickjacking? </h4>
<p>At this point the most reliable way is to use Firefox and the <a href="http://noscript.net/">NoScript extension</a>. NoScript provides a simple, yet amazingly effective feature, called <a href="http://noscript.net/faq#qa7_4">ClearClick</a>. From their site:</p>
<p>“…it&#039;s enabled by default, protecting NoScript users from Clickjacking everywhere: it even remains active if you switch NoScript in the less safe <em>Allow scripts globally</em> mode. How does it work? Clickjacking hides or displaces or partially covers something you wouldn&#039;t want to click, if you could see it in its original context. ClearClick does the opposite: whenever you click a plugin object or a framed page, it takes a screenshot of it alone and opaque (i.e. an image of it with no transparencies and no overlaying objects), then compares it with a screenshot of the parent page as you can see it. If the two images differ, a clickjacking attack is probably happening and NoScript raises a &quot;ClearClick warning&quot;, showing you the contextualized and &quot;clear&quot; object you were about to click, so you can evaluate by yourself if that was really something you wanted to do.”</p>
<p>Did ClearClick work in the earlier twitter attack? Sure did! After I clicked the “Don’t click” button Noscript promptly popped up a warning showing the hidden iFrame (since the original malicious page has been removed, I found <a href="http://www.korben.info/twitter/ohoh.html" rel="nofollow">another similar page</a> from the same author for screenshot purposes).</p>
<p><a href="http://beerpla.net/wp-content/uploads/HowToFightClickjackingUsingTheRecentTwit_8F77/image_7.png" class="lightview" rel="gallery[774]" 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/HowToFightClickjackingUsingTheRecentTwit_8F77/image_thumb_5.png" width="426" height="426" /></a>&#160;</p>
<p>So, even if you don’t want to enable NoScript globally, install it anyway, just for ClearClick.</p>
<p><div class="note"><div class="noteclassic">Using a browser other than Firefox? The best technique you should use is, as a general rule, don’t click on suspicious buttons and links on pages you are not familiar with. Remember: you’re on the Internet and it is full of traps.</div></div></p>
<p>That about covers what I had to say about clickjacking. Stay safe, folks!</p>
<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29+-+http://bit.ly/bXYPgv&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;t=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;t=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;title=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;title=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;title=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29" 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.stumbleupon.com/submit?url=http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/&amp;title=How+To+Fight+Clickjacking+%28Using+The+Recent+Twitter+Hijacking+As+An+Example%29" 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="mailto:?subject=%22How%20To%20Fight%20Clickjacking%20%28Using%20The%20Recent%20Twitter%20Hijacking%20As%20An%20Example%29%22&amp;body=Link: http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A %20Introduction%20%20Clickjacking%20is%20a%20malicious%20technique%20of%20tricking%20web%20users%20into%20revealing%20confidential%20information%20or%20taking%20control%20of%20their%20computer%20while%20clicking%20on%20seemingly%20innocuous%20web%20pages.%20A%20vulnerability%20across%20a%20variety%20of%20browsers%20and%20platforms%2C%20a%20clickjacking%20takes%20the%20form%20of%20embedde" 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/10/29/modern-day-frame-busting-with-x-frame-options-and-this-content-cannot-be-displayed-in-a-frame-warnings/" rel="bookmark" title="October 29, 2009">Modern-Day Frame Busting With X-FRAME-OPTIONS And &quot;This content cannot be displayed in a frame&quot; Warnings</a></li>
<li><a href="http://beerpla.net/2009/12/20/enable-a-twitter-retweet-rt-button-that-lets-you-add-comments-before-retweeting/" rel="bookmark" title="December 20, 2009">Enable A Twitter Retweet (RT) Button That Lets You Add Comments Before Retweeting</a></li>
<li><a href="http://beerpla.net/2010/02/03/how-not-to-implement-a-web-application-that-handles-external-authentication-using-betwittered-com-as-an-example/" rel="bookmark" title="February 3, 2010">How *Not* To Implement A Web Application That Handles External Authentication, Using BeTwittered.com As An Example</a></li>
<li><a href="http://beerpla.net/2009/10/24/are-you-a-stackoverflow-com-superuser-com-serverfault-com-fan-heres-a-greasemonkey-script-to-keep-track-of-your-accounts-on-all-of-them/" rel="bookmark" title="October 24, 2009">StackOverflow.com, SuperUser.com, ServerFault.com Fan? Here&#039;s A Greasemonkey Script To Keep Track Of All Your Accounts</a></li>
<li><a href="http://beerpla.net/2009/06/21/hidden-features-of-perl-php-javascript-c-c-c-java-ruby-python-and-others-collection-of-incredibly-useful-lists/" rel="bookmark" title="June 21, 2009">Hidden Features Of Perl, PHP, Javascript, C, C++, C#, Java, Ruby, Python, And Others [Collection Of Incredibly Useful Lists]</a></li>
</ul><!-- Similar Posts took 10.366 ms --><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://beerpla.net/2009/02/12/how-to-fight-clickjacking-using-the-recent-twitter-hijacking-as-an-example/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
