Twitter tests XSS attack prevention on its mobile website
Posted on 24 March 2011.
Twitter has been testing and has now implemented Content Security Policy - a new standard developed by Mozilla to block cross site scripting (XSS) attacks - on its mobile website.

How does CSP work? "In a typical XSS attack, the attacker injects arbitrary Javascript into a page, which is then executed by an end-user," explains Twitter. "When a website enables CSP, the browser ignores inline Javascript and only loads external assets from a set of whitelisted sites. Enabling CSP on our site was simply a matter of including the policy in the returned headers under the CSP defined key, 'X-Content-Security-Policy'."

"The policy also contains a 'reporting URI' to which the browser sends JSON reports of any violations. This feature not only assists debugging of the CSP rules, it also has the potential to alert a site’s owner to emerging threats."

The testing executed in the last few weeks revealed situations that have triggered a report without being actually malicious attempts. For example, it turns out that a number of popular Firefox extensions insert Javascript on page load and that various ISP insert Javascript or change image tags so that they point to their caching servers. Twitter resolved this triggering problem by mandating SSL for Firefox 4 users.

Twitter engineers say that this is a big step towards thwarting XSS attacks, and that they hope other browsers will follow suit and adopt the standard. In the meantime, they plan to implement it across the rest of Twitter during the incoming months. "The simple option of being able to disable inline Javascript and limit external sources gives sites the ability to stop the vast majority of today's attacks with minimal effort," says Twitter.






Spotlight

Intentional backdoors in iOS devices uncovered

Posted on 22 July 2014.  |  A researcher has revealed that Apple has equipped its mobile iOS with several undocumented features that can be used by attackers and law enforcement to access the sensitive data contained on the devices running it.


Weekly newsletter

Reading our newsletter every Monday will keep you up-to-date with security news.
  



Daily digest

Receive a daily digest of the latest security news.
  

DON'T
MISS

Wed, Jul 23rd
    COPYRIGHT 1998-2014 BY HELP NET SECURITY.   // READ OUR PRIVACY POLICY // ABOUT US // ADVERTISE //