Original URL: http://www.theregister.co.uk/2009/02/26/twitter_clickjack_attack/

Tweet hackers reopen Twitter vuln

Clickjack tit-tat

By Dan Goodin

Posted in Security, 26th February 2009 21:37 GMT

Twitter's tit-for-tat struggle against clickjackers continues.

Two weeks after the micro-blogging site immunized its users against a fast-moving worm that caused them to unintentionally broadcast messages when they clicked on an innocuous-looking button, hackers have found a new way to exploit the clickjacking vulnerability.

The latest attack comes from UK-based web developer Tom Graham, who discovered that the fix Twitter rolled out wasn't applied to the mobile phone section of the site. By the time we stumbled on his findings, the exploit no longer worked. But security consultant Rafal Los sent us a minor modification that sufficiently pwned a dummy account we set up for testing purposes.

"The mobile site currently has no javascript on it at all, which is probably for a good reason as most mobile phones don't support it," Graham writes. "So it begs the question, how should Twitter prevent this click-jacking exploit?"

Screenshot of clickjacking page

Click "Yes" Here ...

Screenshot of clickjacked Twitter page

And this is what you get here

The proof-of-concept page presents the user with the question "Do you have a tiny face?" along with buttons to answer "yes" or "no." Choosing the affirmative while logged in to Twitter causes the account to publicly declare: "I have a tiny face, do you?" and then include a link to Graham's post.

The exploit is the latest reason to believe that clickjacking, on Twitter and elsewhere, is here to stay, at least until HTML specifications are rewritten. No doubt web developers will continue to come up with work-arounds, but hackers can just as quickly find new ways to exploit the vulnerability, it seems.

That's because clickjacking attacks a fundamental design of HTML itself. It's pulled off by hiding the target URL within a specially designed iframe that's concealed by a decoy page that contains submission buttons. Virtually every website and browser is susceptible to the technique.

Two weeks ago, Twitter was able to stifle the attacks by adding code to its site that changed its pages' location. That required the use of javascript that wasn't added to Twitter pages browsed by mobile users, presumably because they may have caused some older handsets not to work.

Readers of Graham's site already have zeroed in on a fix for the problem, but Los isn't sure it's foolproof. That's because it, too, is based on javascript, so it won't be effective against HTML-based attacks. Stay tuned. The clickjacking saga continues. ®

Update

Twitter web developers closed the hole within a few hours of this story being published.