Click Jacking – The new threat on the web?
Posted by johnb | Posted in Uncategorised | Posted on 05-11-2008
Tags: Uncategorised
5
I was listening to a recent episode of Security Now where the guys were talking about Click Jacking. It’s a relatively new threat to emerge, plus since it’s browser based it’s completely OS/Browser independent – in fact it even goes as far as affecting Flash (although the latest update has blocked the threat from occurring).
It’s a remarkably simple exploit – in simple terms by using a combination of CSS and iFrames a ‘layer’ is placed over a legitimate site and when you think you’re clicking on a button you’re actually clicking on something on this ‘layer’. Before Flash was patched the threat even allowed a website to enable your webcam by ‘popping under’ the ‘Do you wish to give Flash access to your webcam’.
The threat gets even worse by playing on what we all do when we browse the internet, the old ‘remember me’ tick box or ‘Do you want Firefox to remember your password’ because it’s using a browser, any site that you’re logged into could be loaded ‘invisibly’ – eg, Facebook, Ebay, MySpace etc (which all have buttons in well known positions) and then a new layer of fake buttons loaded onto the page – there’s an example of such an exploit here www.snipurl.com/clickjack (It’s safe to visit) – it uses MySpace to demonstrate the threat but it does so extremely clearly.
So what can you do about it? Well if you’re using IE, Safari, Chrome (as of the time of writing) then there’s not actually a lot you can do except being vigilant about the sites you’re accessing and not using persistent login sessions to websites. If you’re a Firefox user then you’re in luck because the recently updated NoScript plugin is able to blanket protect you (even if you have script enabled – cos the web just ain’t the same with script disable) and remember this isn’t a Javascript exploit! Once installed go into the options for NoScript and enable the ‘Forbid <IFRAME>’ option (and probably enable JS, Flash, Silverlight whilst you’re there)




Pretty interesting stuff
But doesn’t it still require that you download a dodgy plugin or that the website gets hacked or allows dodgy scripts in it posting areas on the same page as its logins?
in theory – but the website could have been purposely built with an exploit like this in place – we all know how the phishing scams take place and get people to give up their details, click on links etc.
The “legit” site doesn’t need to be hacked. If you look at the example site, they are loading a frame of the real site (myspace) from their dodgy page, causing your clicks on their page to do things on the legit site.
It is all click jacking and we might see more such attacks in future.
The quickest fix for this attack is – DO NOT let your site be loaded in an iframe. Thats it!
if (window.parent.frames.length>0) {
//you are framed.
//Go to your site without frame
window.parent.location=location;
}