<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; xss</title> <atom:link href="http://www.ghacks.net/tag/xss/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Firefox 4 Supports Content Security Policy</title><link>http://www.ghacks.net/2011/05/08/firefox-4-supports-content-security-policy/</link> <comments>http://www.ghacks.net/2011/05/08/firefox-4-supports-content-security-policy/#comments</comments> <pubDate>Sun, 08 May 2011 21:50:10 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Firefox]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Twitter]]></category> <category><![CDATA[clickjacking]]></category> <category><![CDATA[content security policy]]></category> <category><![CDATA[cross site scripting]]></category> <category><![CDATA[csp]]></category> <category><![CDATA[firefox 4]]></category> <category><![CDATA[mozilla]]></category> <category><![CDATA[twitter]]></category> <category><![CDATA[xss]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=44887</guid> <description><![CDATA[Content Security Policy is a standard developed by Mozilla designed to protect against cross site scripting (XSS) attacks. Cross site scripting attacks use vulnerabilities in websites to inject JavaScript code into pages or urls of that site. The injected JavaScript code is then executed when visitors open a specifically prepared link or page on the [...]]]></description> <content:encoded><![CDATA[<p>Content Security Policy is a standard developed by Mozilla designed to protect against cross site scripting (XSS) attacks. Cross site scripting attacks use vulnerabilities in websites to inject JavaScript code into pages or urls of that site. The injected JavaScript code is then executed when visitors open a specifically prepared link or page on the website. Attacks can have serious consequences, it may for instance be possible to steal cookies from users to impersonate them on the site.</p><p>Content Security Policy has been in development for quite some time.. The basic idea behind the standard is to give webmasters a tool at hand to whitelist JavaScript, and other objects and files, that may be executed on the site. This implementation blocks all JavaScript code that is executed on the site and not in the list of allowed sites, which means that attackers cannot exploit possible XSS vulnerabilities on the website or server.</p><p>A browser supporting CSP ignores code that is not in the whitelist. Browsers who do not support CSP ignore the policy.</p><h3>Content Security Protection for Users</h3><p>CSP is currently only supported by Firefox 4, Thunderbird 3.3 and SeaMonkey 2.1. You can test the functionality by visiting this test page.</p><p><a
href="http://engineering.twitter.com/2011/03/improving-browser-security-with-csp.html">Twitter</a> recently announced that they have added CSP to their mobile version, accessible under mobile.twitter.com. Users who use one of the aforementioned browsers are protected from XSS attacks on that website.</p><p>The engineers on Twitter removed all JavaSCript from code and implemented the CSP header. They then restricted the header to Firefox 4 users and created a rule set to allow JavaScript from their assets. This included the content deliver network used to deliver stylesheets and user profiles.</p><p>Unexpected issues were encountered by the developers. They noticed for instance that some Firefox add-ons were inserting JavaScript on page load, which triggered a threat report. The Twitter engineers noticed furthermore that some ISPs inserted JavaScript code or altered image tags for caching reasons.</p><p>They managed to resolve those problems by mandating SSL for all Firefox 4 users who access the mobile Twitter web site.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/05/x-content-security-policy1.png" alt="x-content security policy" title="x-content security policy" width="600" height="331" class="alignnone size-full wp-image-44947" /></p><p>A test with Firebug shows that the mobile version of Twitter is indeed using the policy on site. Please note that Twitter makes a user agent check and is very restrictive about it. Firefox 5 or Firefox 6 users won&#8217;t get the policy currently.</p><h3>Content Security Protection for Webmasters</h3><p>Webmasters may have some work at hand to add support for CSP to their website. JavaScript code that is directly embedded in documents will not be executed anymore, which has several implications. Webmasters need to move the code to external JavaScript files.</p><p>Policies are specified with the <em>X-Content-Security-Policy</em> header. The header <em>X-Content-Security-Policy: allow &#8216;self&#8217; *.ghacks.net</em> for instance allows JavaScript to be loaded from ghacks.net and all subdomains of ghacks.net.</p><p>The <a
href="https://developer.mozilla.org/en/Security/CSP/Using_Content_Security_Policy">using CSP</a> guide on Mozilla offers additional examples on how to set the right headers.</p><p>Browsers that do not support CSP ignore the header.</p><p>CSP offers two additional forms of protection. It mitigates clickjacking attacks. Clickjacking refers to directing a user&#8217;s mouse click to a target on another site. This is often done by using transparent frames on the original website.</p><p>Content Security Policy can also be used to mitigate packet sniffing attacks, as it allows the webmaster to specific protocols that are allowed to be used. It is for instance possible to force HTTPS only connections.</p><p>The CSP Policy directives are accessible <a
href="https://developer.mozilla.org/en/Security/CSP/CSP_policy_directives">here on</a> Mozilla.</p><p>Next to the already mentioned options are parameters to specific hosts where images, media files, objects or fonts may be loaded from.</p><p>Plugins are available for <a
href="https://wordpress.org/extend/plugins/content-security-policy/">WordPress</a> and <a
href="http://drupal.org/project/content_security_policy">Drupal</a> that add the policy to supported websites automatically when activated.</p><h3>Bookmarklet</h3><p>A <a
href="http://brandon.sternefamily.net/posts/2010/10/content-security-policy-recommendation-bookmarklet/">bookmarklet</a> has been created by Brandon Sterne to aid webmasters in defining the correct header. It basically scans the page for JavaScript and displays a suggested policy.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/05/csp-content-security-policy-570x171.png" alt="csp content security policy" title="csp content security policy" width="570" height="171" class="alignnone size-medium wp-image-44888" /></p><h3>Issues and Concerns</h3><p>The biggest problem currently is that CSP is only supported by Firefox 4. Not by Internet Explorer, Chrome, Opera or Safari. But even if it would be supported by all browsers, it would still depend on webmasters to implement the headers on their websites.</p><p>A push in the right direction could come from Twitter, if the decision is made to role out the CSP header to the main Twitter web site as well.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/05/08/firefox-4-supports-content-security-policy/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Cross Site Scripting</title><link>http://www.ghacks.net/2005/10/27/cross-site-scripting/</link> <comments>http://www.ghacks.net/2005/10/27/cross-site-scripting/#comments</comments> <pubDate>Thu, 27 Oct 2005 18:32:42 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Browsing]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[cross site scripting]]></category> <category><![CDATA[hack]]></category> <category><![CDATA[harmful]]></category> <category><![CDATA[malicious]]></category> <category><![CDATA[xss]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=68</guid> <description><![CDATA[Cross site scripting (also known as XSS) occurs when a web application gathers malicious data from a user. The data is usually gathered in the form of a hyperlink which contains malicious content within it. The user will most likely click on this link from another website, instant message, or simply just reading a web board or email message. ]]></description> <content:encoded><![CDATA[<p>Cross site scripting (also known as XSS) occurs when a web application gathers malicious data from a user. The data is usually gathered in the form of a hyperlink which contains malicious content within it. The user will most likely click on this link from another website, instant message, or simply just reading a web board or email message. Usually the attacker will encode the malicious portion of the link to the site in HEX (or other encoding methods) so the request is less suspicious looking to the user when clicked on. After the data is collected by the web application, it creates an output page for the user containing the malicious data that was originally sent to it, but in a manner to make it appear as valid content from the website.</p><p>Many popular guestbook and forum programs allow users to submit posts with html and javascript embedded in them. If for example I was logged in as &#8220;john&#8221; and read a message by &#8220;joe&#8221; that contained malicious JavaScript in it, then it may be possible for &#8220;joe&#8221; to hijack my session just by reading his bulletin board post. Further details on how attacks like this are accomplished via &#8220;cookie theft&#8221; are explained in detail below.</p><p><span
id="more-68"></span>Source: <a
href="http://www.cgisecurity.com/articles/xss-faq.shtml"target="_blank">&#8220;The Cross Site Scripting FAQ&#8221;</a>. Click link to read the whole faq.</p><p>Update: Users who are looking for protection against Cross Site Scripting attacks may want to check out the excellent <a
href="http://www.ghacks.net/2011/12/22/noscript-links-to-security-and-privacy-information/">NoScript</a> add-on for the Firefox web browser. XX protection is automatically enabled after installation. The extension for Firefox blocks untrusted websites from injecting scripts into trusted websites, which is an excellent way of protecting users from XSS attacks.</p><p><a
href="http://www.ghacks.net/wp-content/uploads/2005/10/cross-site-scripting-protection.jpg"><img
src="http://www.ghacks.net/wp-content/uploads/2005/10/cross-site-scripting-protection.jpg" alt="cross site scripting protection" title="cross site scripting protection" width="566" height="546" class="alignnone size-full wp-image-55223" /></a></p><p>Additional information about Cross Site Scripting are <a
href="http://en.wikipedia.org/wiki/Cross-site_scripting">available on</a> Wikipedia. The external links section on the site is especially useful for researchers and security interested users.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2005/10/27/cross-site-scripting/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
