So there have been some serious Shenanigans over on the twitter website today. Bizarre text/black blocks that mysteriously have propagated themselves all over users’ streams. Cue mass hysteria and cries of I’ve been hacked! Virus! yargh!
But it is neither of those things. It boils down to this – presumably in their eagerness to roll out some fancy features for the new Twitter some developer(s) were incredibly sloppy.
And this was exploited. The initial exploit used the javascript onHover event, which is triggered when your mouse hovers over something, like an image/weblink to, it seems, redirect you to some Japanese Porn. This was picked up on and persons unknown, who really ought to have known better, started playing around with this to make pretty text and then a blocked out message that is retweeted when hovered over, potentially propagating out of control some what akin to the Morris Worm.
Here is a post on Sophos about the exploit.
This was a human propelled worm – not a virus on your machine and no one had hacked into your account, users of the website’s curiosity/bafflement were used against them.
It also only affected users of the website – as 3rd party client developers had already taken steps to limit what gets rendered/executed with in their applications, users of Tweetdeck have been likened to the ‘equivalent of the smug bastards in ponchos at a rain-soaked festival’ – @alrightit.
The most galling part of this is that it would appear that in the GitHub code respository for the twitter text processing there are changes awaiting deployment to prevent this abuse of the onHover.
It would appear that it is now safe to go back in the water…
The problem has since been addressed suggesting that either the fix was quick to come up with or the month old code mentioned above was hastily deployed.
I remember well when Javascript was considered a dirty work and script kiddies the bane of the internet. With the advent of Web2.0 and the amalgamation of technologies into the very buzzy AJAX, javascript has grown up, and like many of the classic hackers*, found a productive and valuable place in the world. But without adequate appreciation of what these technologies can do, especially now that the web is open to users not savvy , and rigours testing sites, networks and systems are still at risk, if not from corruption then from being rendered effectively unusable due to a proliferation of garbage.
*People like Kevin Mitnick who now advises firms on how to avoid being a victim of the kinds of attacks he perpetrated.
Update:
A 17 year old student in Australia has taken the blame for yesterday’s fracas, you can read the article here. However I believe it is unfair to single him out. The article does not suggest that he was the one who wrote the adapted version which retweets itself, a purely malicious piece of coding, the use of onMouseOver is particularly nasty as it is an event that is triggered without necessarily the explicit or conscious input form the user, unlike onMouseClick where the users makes a conscious decision to click on the link.
Still, at the end of the day, the people who need to hold their hands up and take the blame for this are Twitter who made a very basic mistake of not validating the input to the site and not escaping data. The potential for the abuse of client side scripts is the reason why some free blog hosting companies, such as WordPress do not allow javascript to function; the code is escaped so that it can not actually be executed by the browser.

