<?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>The Good, The Bad and the Insecure</title>
	<atom:link href="http://blog.securitee.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.securitee.org</link>
	<description>(Mostly) Security-related thoughts &#38; ideas</description>
	<lastBuildDate>Mon, 17 Jun 2013 14:07:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Detecting Ghostery</title>
		<link>http://blog.securitee.org/?p=277</link>
		<comments>http://blog.securitee.org/?p=277#comments</comments>
		<pubDate>Mon, 10 Jun 2013 16:02:00 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Breaking stuff]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=277</guid>
		<description><![CDATA[I discovered Ghostery in the summer of 2012, when I was researching web-tracking and specifically web-tracking done through web fingerprinting. Ghostery is a really cool browser extension which helped me identify the domains that popular web fingerprinters used to deliver &#8230; <a href="http://blog.securitee.org/?p=277">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_logo.png"><img class="alignright size-thumbnail wp-image-285" alt="ghostery_logo" src="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_logo-150x150.png" width="150" height="150" /></a></p>
<p>I discovered <a href="http://www.ghostery.com/" target="_blank">Ghostery</a> in the summer of 2012, when I was researching web-tracking and specifically web-tracking done through web fingerprinting. Ghostery is a really cool browser extension which helped me identify the domains that popular web fingerprinters used to deliver their code and thus allowed me to isolate and study the fingerprinting code. You can read all about that in our paper titled: &#8220;<a href="http://securitee.org/files/cookieless_sp2013.pdf" target="_blank">Cookieless Monster: Exploring the Ecosystem of Web-based Device fingerprinting</a>&#8220;.</p>
<p>Since then, I&#8217;ve installed Ghostery in all my browsers and use it to quickly find out which third-party trackers, each website uses. For those of you who don&#8217;t use Ghostery (you should definitely check it out after you finishing this post), Ghostery will match network requests and JavaScript/HTML filepaths with third-party-tracker blacklists and notify you when it gets a match. It also has the ability to block specific trackers, from running altogether.</p>
<p><span id="more-277"></span></p>
<p>For instance, on my page, securitee.org, I am using StatCounter, a third-party web-analytics framework which fits the definition of what someone would call a third-party tracker. Thus, if you visit my site with Ghostery installed, you will, by default, get a pretty purple box as follows:</p>
<div id="attachment_279" class="wp-caption aligncenter" style="width: 738px"><a href="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_post_1.png"><img class="size-full wp-image-279" alt="Ghostery's purple box" src="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_post_1.png" width="728" height="299" /></a><p class="wp-caption-text">Ghostery&#8217;s purple box</p></div>
<p>Today, while searching for something completely different, I realized that the way this works is that Ghostery adds a div element (styled as purple box) in the DOM of the webpage. After a couple of seconds, Ghostery automatically deletes the purple box, so that it doesn&#8217;t annoy the user. So, just for a few seconds, the page&#8217;s DOM contains one of those:</p>
<p><a href="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_post_2.png"><img class="aligncenter size-full wp-image-280" alt="ghostery_post_2" src="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_post_2.png" width="528" height="201" /></a></p>
<p>What this means, is that there is a window of time in which the visited webpage has the ability to find out whether the current user is using Ghostery or not, and also to manipulate the contents of that purple box.</p>
<h2>Why should I care?</h2>
<p>There are many reasons why a dodgy site would want to be able to detect Ghostery and thus many reasons why you should care. For instance:</p>
<ul>
<li><span style="line-height: 16px;"><strong>Fingerprinting</strong>. Now, the site knows that you are one of the, say 700,000 users that use Chrome and have Ghostery installed. While this may seem like a lot, Chrome currently has more than 50% of the browser market. Thus, with such a simple trick, we are narrowing down from hundreds of millions to less than a million users. Combine this with other vectors (e.g. screen size, plugins, and fonts), and you are more unique than you would expect. If you don&#8217;t believe me, check out <a href="https://panopticlick.eff.org/" target="_blank">Panopticlick</a> and then read <a href="http://securitee.org/files/cookieless_sp2013.pdf" target="_blank">our paper</a> <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></li>
<li><strong>Misguiding</strong>. Some sites have a list of third-party trackers that almost matches the height of your screen. The ability to modify, or altogether hide, that tell-tale purple box can be very appealing to them. I want to be fair here and say that Ghostery is also using a dedicated box (shown when you click on the little Ghost next to the status bar) which cannot be touched by JavaScript running in the page.</li>
<li><strong>User Discrimination</strong>. If a company really, really, wants to track you, and they detect the presence of Ghostery, they may do all sorts of evil things. For instance, they could on purpose break the page so that you attribute the broken functionality to Ghostery rather than to the page itself.</li>
</ul>
<h2>Detection Methodology</h2>
<p>There are probably many elegant ways to detect that Ghostery &lt;div&gt;. I, however, never claimed to be elegant <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . What I did, is I wrote a small function that is called many times per second, which bruteforces all the possible identifiers of that div element. While this sounds like a lot, it isn&#8217;t. I noticed that all purple boxes have an id equal to &#8220;<strong>ghostery-alert-X</strong>&#8221; where X is an integer from 1 to 9999. Once the page starts, the function will keep on trying to find the ghostery &lt;div&gt;.</p>
<pre class="brush: jscript; title: ; notranslate">
var tries = 0;
var int_id = window.setInterval(function(){
     for(var i=0; i &lt; 10000; i++){
           var cid = &quot;ghostery-alert-&quot; + i;
           var purple_box  = document.getElementById(cid);

            //Ghostery installed
            if (purple_box != null){
                //Do dodgy things

                window.clearInterval(int_id);
            }
            else if(tries &gt;= 1000){
                window.clearInterval(int_id);
            }
     }
     tries += 1;
 },10);
</pre>
<p>Since I&#8217;m running this code every 10 milliseconds, I am also purposefully deleting the function after 1000 tries (should be about 10 seconds) so that it doesn&#8217;t keep on polling the user&#8217;s browser for ever.</p>
<p>If there is a purple box, this script will find it. As I mentioned earlier, you can do all sorts of things once you find it. Since I am not an evil guy, I decided to just make my mark and leave it at that:</p>
<div id="attachment_284" class="wp-caption aligncenter" style="width: 740px"><a href="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_post3.png"><img class="size-full wp-image-284" alt="Hijacking the purple box" src="http://blog.securitee.org/wp-content/uploads/2013/06/ghostery_post3.png" width="730" height="306" /></a><p class="wp-caption-text">Hijacking the purple box</p></div>
<p>Interestingly, in Firefox, the div has a static id equal to &#8220;<strong>ghostery-purple-bubble</strong>&#8221; which makes the whole thing trivial (and me kind of sad&#8230;).</p>
<h2>What can be done?</h2>
<p>If Ghostery decides that, that purple box is a must, then it will need to be recreated using a background page of a Chrome extension instead. Sure, it won&#8217;t be floating as nicely on the page, but it wouldn&#8217;t be detectable (at least in this way) from an &#8220;inquiring&#8221; page. As a matter of fact, Ghostery already has such a page which appears when you click on the little blue ghost (giving you many more details for each tracker), so maybe the purple box should go, altogether. I cannot predict whether tracking companies will pick this up, but if you want to make sure you can, for now, manually <a href="http://purplebox.ghostery.com/?p=1016022385" target="_blank">disable that purple box</a>.</p>
<h2>Conclusion</h2>
<p>I want to repeat, once again, that Ghostery is an awesome tool (I use it daily and I will keep on using it) and thus this post is not meant to be a criticism towards it. I am merely pointing out how minor choices done in a browser context (e.g., &#8220;<em>Wouldn&#8217;t it be nice to add a small floating box?</em>&#8220;) can have later repercussions that may negatively affect a user&#8217;s privacy.</p>
<p>Till next time</p>
<p>Nick Nikiforakis</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=277</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>You are what you include: Large-scale evaluation of Remote JavaScript inclusions</title>
		<link>http://blog.securitee.org/?p=255</link>
		<comments>http://blog.securitee.org/?p=255#comments</comments>
		<pubDate>Sun, 21 Oct 2012 16:18:43 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Paper summaries]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=255</guid>
		<description><![CDATA[Today, I am back to Belgium, after spending one week in the US. I was in Raleigh, NC, to attend the 19th ACM conference on Computer and Communication Security and to present our paper titled You Are What You Include: &#8230; <a href="http://blog.securitee.org/?p=255">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today, I am back to Belgium, after spending one week in the US. I was in Raleigh, NC, to attend the 19th ACM conference on Computer and Communication Security and to present our paper titled <a href="http://www.securitee.org/files/jsinclusions_ccs2012.pdf">You Are What You Include: Large-scale Evaluation of Remote JavaScript Inclusions</a>. KU Leuven had an all time record this year, since we had 4 (!) full papers accepted.</p>
<p>In this post, I want to summarize the findings of our remote inclusions study so that you can get a glimpse of the size of the problem and hopefully get curious enough to read our 12-page paper <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So, about a year ago we were concerned that web-site administrators are including JavaScript code from remote-sources without too much thinking. This can lead to issues because:</p>
<ol>
<li>The remotely included code can be buggy and you are thus introducing vulnerabilities to your own site, when you choose to include it</li>
<li>The remote host can be malicious and use its scripts to attack your users and exfiltrate data from your site</li>
<li>The remote host can be targeted by an attacker, as a way of reaching a harder to get target (e.g. your page)</li>
</ol>
<p>This lead us to conduct the largest, to-date, web crawl with a focus on remote JavaScript inclusions. Based on the top 10,000 Alexa sites, we crawled over 3,300,000 pages and recorded approximately 8.5 million remote inclusions. The findings that I want to share with you, in this blog post are the following:</p>
<ol>
<li>Even though most sites of the Alexa top 10,000 include code from up to 15 remote hosts, there are sites that include code from up to 295 remote hosts. Assuming that only one of these hosts is enough to fully compromise your script-including site, trusting almost 300 of those is, at the very least, worrisome</li>
<li>As far as remote inclusions as concerned, Google is king, owning 5 out of the top 10 most included scripts found in our study</li>
<li> Certain web-tracking and market-research companies (like addthis.com and scorecardresearch.com) have crept their way into the 10 most popular remotely-included JavaScript scripts. This should raise some eyebrows, since these are sites that most users have never directly visited and are not aware of their existence.</li>
<li>A large percentage of JavaScript providers seem to not be too interested in keeping their software and servers up-to-date. This can be problematic, when a motivated attacker targets them and if you include code from them, they are essentially the weakest link in your security chain.</li>
<li>In our logs of remote JavaScript inclusions, we found the following, previously unknown, vulnerabilities:
<ul>
<li><strong> Script inclusions from locahost</strong>: We found over 130 script inclusions which were requesting their &#8220;remote&#8221; JavaScript from localhost or 127.0.0.1. What this means, is that a user&#8217;s browser will try to fetch the necessary JavaScript code from the user&#8217;s own machine. Couple this, with multi-user systems, where users have the ability to run web-server processes (think smartphones) and you have a recipe for disaster. A malicious user can poison the vulnerable page by providing malicious JavaScript for all these requests. We called these <u> Cross-User Scripting</u> attacks</li>
<li><strong> Script inclusions from private-network IP addresses</strong>: Same as above, but now the site tries to include code from hosts such as &#8220;192.168.1.1&#8243;. This means that the attacker now just needs to be in the same local network (<u>Cross-network Scripting</u>).</li>
<li><strong> Script inclusions from non-registered domains</strong>: This is one of my favorites. We found 56 domains that were supposedly providers for JavaScript, but they were not registered!!! This means that an attacker can simply register a domain and start providing malicious JavaScript to anyone who requests it. We registered two of these and recorded about 85,000 requests for JavaScript in two weeks! We called these <u> Stale Domain-name-based Inclusions </u> since these are domains that were once full sites and even-though they expired, other sites kept on requesting scripts from them.</li>
<li><strong> Script inclusions from non-responding IP addresses</strong>: Addressing a remote host directly by its IP address means that if that host gets assigned a new IP address, you should update your records. We found some interesting cases of sites requesting JavaScript from IP addresses that did not even have a web server listening on the appropriate port. While harder to exploit, an attacker who gets hold of a particular IP address will be able to inject code on the victim pages (<span style="text-decoration: underline;">Stale IP-address-based Inclusions</span>)</li>
<li><strong> Script inclusions from typosquatting domains</strong>: That&#8217;s probably my favorite one <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We found some unregistered domains that were actually mistypes of the intended domain (e.g. googlesyndicatio.com, missing the final n). We realized that the developers messed-up when writing the script inclusion and requested code from the wrong domain. By registering googlesyndicatio.com, we actually recorded more than 163,000 requests for JavaScript in two weeks! This goes to show that developers, like all others, are also prone to misspell domains. These misspellings however have the potential to cause much greater damage than a user&#8217;s mistypes in her own browser. We called this attack <span style="text-decoration: underline;">Typosquatting Cross-site Scripting(TXSS)</span>.</li>
</ul>
</li>
</ol>
<p>In total, we found that there are many ways for an application to be attacked based on a remote JavaScript inclusions. In addition to all the findings mentioned above, we also studied script-inclusions over time and we evaluated the practicality of two straightforward countermeasures, i.e., coarse-grained sandboxing and local script copies, and showed how feasible (or not) is each one, given the current popular scripts of the web.</p>
<p>Check out our <a href="http://www.securitee.org/files/jsinclusions_ccs2012.pdf">full paper</a> for all the juicy details <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
Till next time<br />
<br />
Nick Nikiforakis</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=255</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breaking McAfee&#8217;s Social Protection</title>
		<link>http://blog.securitee.org/?p=241</link>
		<comments>http://blog.securitee.org/?p=241#comments</comments>
		<pubDate>Thu, 13 Sep 2012 04:41:12 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Breaking stuff]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=241</guid>
		<description><![CDATA[On my usual daily visit of Slashdot, I read that McAfee introduced a new application called &#8220;McAfee Social Protection&#8221; for Facebook. In a nutshell, you install their plugin, allow their application to control quite a bit of your Facebook and &#8230; <a href="http://blog.securitee.org/?p=241">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>On my usual daily visit of Slashdot, I read that McAfee introduced a new application called &#8220;McAfee Social Protection&#8221; for Facebook. In a nutshell, you install their plugin, allow their application to control quite a bit of your Facebook and then you can start uploading pictures &#8220;safely&#8221;. Here&#8217;s a video of it in <a href="http://hothardware.com/News/Intels-Demos-McAfee-Social-Protection-A-Condom-For-Your-Digital-Life/" target="_blank">action</a>.</p>
<p><span id="more-241"></span></p>
<p>Specifically, when you upload a picture, you can share it with your friends or groups of friends who also need to install the special plugin in order to view your picture. Once they do, the picture is visible, but! McAfee claims that you can&#8217;t save it on your computer or take a screenshot and then paste it in an imaging program. Naturally, I wanted to put their claims to the test <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I started by uploading a picture of myself and sharing it with myself <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . Then I tried to right-click on the image but I couldn&#8217;t get the usual image dialogue. Next stop, &#8220;Print Screen&#8221;. Here&#8217;s what I got when I pasted the contents into mspaint.</p>
<div id="attachment_242" class="wp-caption aligncenter" style="width: 650px"><a href="http://blog.securitee.org/?attachment_id=242" rel="attachment wp-att-242"><img class="size-large wp-image-242" title="screenshot_mcafee_facebook_fullpage" src="http://blog.securitee.org/wp-content/uploads/2012/09/screenshot_mcafee_facebook_fullpage-1024x575.png" alt="" width="640" height="359" /></a><p class="wp-caption-text">First screenshot using &#8220;Print Screen&#8221;</p></div>
<p>I used Window&#8217;s 7 preview on the bottom, so that you can see that we are indeed on McAfee&#8217;s application page on Facebook. Then I tried going back to my slashdot tab and taking a screenshot of that.</p>
<div id="attachment_243" class="wp-caption aligncenter" style="width: 650px"><a href="http://blog.securitee.org/?attachment_id=243" rel="attachment wp-att-243"><img class="size-large wp-image-243" title="screenshot_mcafee_slashdot_fullpage" src="http://blog.securitee.org/wp-content/uploads/2012/09/screenshot_mcafee_slashdot_fullpage-1024x575.png" alt="" width="640" height="359" /></a><p class="wp-caption-text">Print-Screening Slashdot doesn&#8217;t work while my McAfee tab is open</p></div>
<p>Unsurprisingly, McAfee&#8217;s funky plugin starts messing up other tabs. In order to get your print-screening abilities back, you need to close their tab and then either resize your browser or minimize it and then maximize it (otherwise the blackness remains put).</p>
<p>So, ok you say, it kind of sucks, but what about breaking it? Well, I am not good at reverse-engineering binaries so reverse-engineering their plugin was out of the question. I started experimenting with moving the browser to various places of the screen or maximizing and then immediately hitting &#8220;Print Screen&#8221;. None of them worked&#8230; and then.. lightbulb! I remembered that there are screen-capturing extensions for Firefox.So, I installed <a href="https://addons.mozilla.org/en-US/firefox/addon/abduction" target="_blank">Abduction!</a> and tried again.</p>
<p>Here is the extra menu item when I right-clicked on McAfee&#8217;s page:</p>
<div id="attachment_244" class="wp-caption aligncenter" style="width: 650px"><a href="http://blog.securitee.org/?attachment_id=244" rel="attachment wp-att-244"><img class="size-large wp-image-244" title="abduction_dialogue" src="http://blog.securitee.org/wp-content/uploads/2012/09/abduction_dialogue-1024x575.png" alt="" width="640" height="359" /></a><p class="wp-caption-text">&#8220;Save Page as Image&#8221; option by the abduction plugin</p></div>
<p>I clicked it, chose the part of the image that I wanted to capture and then saved the resulting file to my desktop. Result?</p>
<div id="attachment_245" class="wp-caption aligncenter" style="width: 650px"><a href="http://blog.securitee.org/?attachment_id=245" rel="attachment wp-att-245"><img class="size-large wp-image-245" title="McAfee Social Protection on Facebook" src="http://blog.securitee.org/wp-content/uploads/2012/09/McAfee-Social-Protection-on-Facebook-840x1024.png" alt="" width="640" height="780" /></a><p class="wp-caption-text">Success <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p></div>
<p>You see my smile? This, is the smile of success! <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Of course, you can save just the picture, but I wanted to show that it is indeed McAfee&#8217;s page on Facebook.</p>
<h2>Conclusion</h2>
<p>If it comes to your computer, it&#8217;s yours <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers<br />
Nick</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=241</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Google AdChoices&#8230;</title>
		<link>http://blog.securitee.org/?p=229</link>
		<comments>http://blog.securitee.org/?p=229#comments</comments>
		<pubDate>Tue, 26 Jun 2012 17:55:39 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Miscellanea]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=229</guid>
		<description><![CDATA[They say a picture is worth a thousand words. How about, two pictures? So, the important points of the above text are: &#8220;It&#8217;s our goal to make these ads as relevant and useful as possible for you. Google doesn&#8217;t create &#8230; <a href="http://blog.securitee.org/?p=229">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>They say a picture is worth a thousand words. How about, two pictures?</p>
<div id="attachment_230" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.securitee.org/?attachment_id=230" rel="attachment wp-att-230"><img class="size-medium wp-image-230" title="Screenshot from 2012-06-26 10:35:28" src="http://blog.securitee.org/wp-content/uploads/2012/06/Screenshot-from-2012-06-26-103528-300x74.png" alt="" width="300" height="74" /></a><p class="wp-caption-text">AdChoices &quot;pledge&quot;</p></div>
<p>So, the important points of the above text are:</p>
<p>&#8220;It&#8217;s our goal to make these ads as relevant and useful as possible for you. <span style="text-decoration: underline;">Google doesn&#8217;t create categories, or show ads, based on sensitive topics such as race, religion, sexual orientation, or health.</span> &#8221;</p>
<p>Sounds reasonable. Let&#8217;s see the ad that actually got me here.</p>
<div id="attachment_233" class="wp-caption aligncenter" style="width: 499px"><a href="http://blog.securitee.org/?attachment_id=233" rel="attachment wp-att-233"><img class=" wp-image-233" title="Screenshot from 2012-06-26 10:34:29" src="http://blog.securitee.org/wp-content/uploads/2012/06/Screenshot-from-2012-06-26-103429.png" alt="" width="489" height="344" /></a><p class="wp-caption-text">An AdSense ad about dating, based on religion, while watching a video-clip from a popular Christian band</p></div>
<p>One can claim that the ad is targeting single people, but it is actually targeting the intersection of Christian and Single, thus effectively targeting both.</p>
<p>Google, <a href="http://en.wikipedia.org/wiki/Don%27t_be_evil">don&#8217;t be evil</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=229</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>To Google Chrome: Relax less&#8230;</title>
		<link>http://blog.securitee.org/?p=208</link>
		<comments>http://blog.securitee.org/?p=208#comments</comments>
		<pubDate>Fri, 23 Mar 2012 15:18:48 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Breaking stuff]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=208</guid>
		<description><![CDATA[I&#8217;ve been recently reading Michal Zalewski&#8217;s &#8220;The Tangled Web&#8221;, a book which tries to map the whole security landscape around browsers and Web applications in about 300 pages&#8230; it does a pretty good job Now, in Chapter 9, he talks &#8230; <a href="http://blog.securitee.org/?p=208">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been recently reading Michal Zalewski&#8217;s <a href="http://lcamtuf.coredump.cx/tangled/">&#8220;The Tangled Web&#8221;</a>, a book which tries to map the whole security landscape around browsers and Web applications in about 300 pages&#8230; it does a pretty good job <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, in Chapter 9, he talks about &#8220;Content Isolation Logic&#8221; and in one specific section he touches on the <span style="text-decoration: underline;">document.domain</span> property of the DOM of a page. So, in short, when two pages,<span style="color: #000000;"> foo.example.com</span> and <span style="color: #000000;">bar.example.com</span> want to communicate through JavaScript, by default they cannot since the Same Origin Policy allows accesses only when the protocol, domain and port fully match. Since, <span style="color: #000000;">&#8220;foo.example.com&#8221;</span> !== <span style="color: #000000;">&#8220;bar.example.com&#8221;</span> the check fails and thus the domains can&#8217;t communicate. Since this is somewhat too rigid, a developer can choose to relax the domain of his page from <span style="color: #000000;">foo.example.com</span> to <span style="color: #000000;">example.com</span>. In JavaScript, this is a simple assignment to the document.domain property:<span id="more-208"></span></p>
<pre>document.domain = "example.com";</pre>
<p>If both pages first do the same relaxation and then attempt to communicate (e.g. read each others&#8217; cookies, read content in the DOM and add/remove nodes) all is well. Now obviously &#8220;<span style="color: #000000;">foo.example.com</span>&#8221; can&#8217;t relax its domain to &#8220;<span style="color: #000000;">www.google.com</span>&#8220;. The new relaxed domain must be a higher-level domain from where it already is. For the same reason, the page &#8220;<span style="color: #000000;">foo.example.com</span>&#8221; can&#8217;t relax its domain to &#8220;<span style="color: #000000;">foo.foo.example.com</span>&#8221; since that is not really relaxing <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Relaxing more than you should</h2>
<p>Now, as a web developer you have about a thousand ways in which you can screw up the security of your site. One of them is to relax your domain too much. What would happen if &#8220;<span style="color: #000000;">foo.example.com</span>&#8221; relaxes its domain to &#8220;<span style="color: #000000;">com</span>&#8220;? That is a valid higher-level domain after all. Well&#8230; there is no good reason for a person to do that, other than a severe misunderstanding of how the whole thing works. For this reason, all modern browsers disallow the setting of <span style="text-decoration: underline;">document.domain</span> to a TLD value&#8230; well, all except Chrome that is.</p>
<p><a href="http://blog.securitee.org/?attachment_id=215" rel="attachment wp-att-215"><img class="aligncenter  wp-image-215" title="goofy_chrome_relax" src="http://blog.securitee.org/wp-content/uploads/2012/03/goofy_chrome_relax.png" alt="" width="203" height="234" /></a></p>
<p>I decided to make a simple experiment. I resolved locally two domains, <span style="color: #000000;">myattacker.com</span> and <span style="color: #000000;">myvictim.com</span>. <span style="color: #000000;">myattacker.com</span> first relaxed its domain to<span style="color: #000000;"> &#8220;com&#8221;</span> and then loaded <span style="color: #000000;">myvictim.com</span> in an iframe which also <span style="text-decoration: underline;">wrongly</span> relaxes it&#8217;s domain to <span style="color: #000000;">&#8220;com&#8221;</span>. A short script in <span style="color: #000000;">myattacker.com</span> attempts to reach in the iframe and read the HTML of the body of the loaded page, containing a secret value. If it succeeds, it dumps the contents of that iframe in its own page.</p>
<h2>Testing the browsers</h2>
<p>So, we start with Firefox, version 10. Here is a screenshot of the page:</p>
<div id="attachment_209" class="wp-caption aligncenter" style="width: 479px"><a href="http://blog.securitee.org/?attachment_id=209" rel="attachment wp-att-209"><img class=" wp-image-209" title="ff_dom_relax" src="http://blog.securitee.org/wp-content/uploads/2012/03/ff_dom_relax.png" alt="" width="469" height="508" /></a><p class="wp-caption-text">FF stops the scripts from setting their domain to a TLD</p></div>
<p>As it should be, Firefox says no and the earth keeps spinning. How about Internet Explorer, the usual black sheep of the web?</p>
<p><a href="http://blog.securitee.org/?attachment_id=210" rel="attachment wp-att-210"><img class="aligncenter size-large wp-image-210" title="dom_relax_ie" src="http://blog.securitee.org/wp-content/uploads/2012/03/dom_relax_ie-1024x681.png" alt="" width="640" height="425" /></a>Who would have thought? Internet Explorer 8 doesn&#8217;t like the thing&#8230;</p>
<p>Opera?</p>
<div id="attachment_214" class="wp-caption aligncenter" style="width: 562px"><a href="http://blog.securitee.org/?attachment_id=214" rel="attachment wp-att-214"><img class=" wp-image-214" title="opera_sop" src="http://blog.securitee.org/wp-content/uploads/2012/03/opera_sop.png" alt="" width="552" height="656" /></a><p class="wp-caption-text">Opera, as expected, blocks the TLD domain set</p></div>
<p>How about Google Chrome (version 18.0.1025.108 beta), the source of all sunny, funny and nice?</p>
<p><a href="http://blog.securitee.org/?attachment_id=211" rel="attachment wp-att-211"><img class="aligncenter  wp-image-211" title="chrome_dom_relax" src="http://blog.securitee.org/wp-content/uploads/2012/03/chrome_dom_relax.png" alt="" width="481" height="554" /></a>Aha! And that&#8217;s how the cookie crumbles. Chrome says &#8220;sure, go on&#8221; and the attacker reaches in the victim&#8217;s iframe. Game over! This behavior can also be abused to hack a site that&#8217;s vulnerable to XSS. Instead of injecting the full malicious payload, you simply relax its domain and then proceed to inject code which will never be visible at the server-side of the vulnerable Web application, thus making detection and mitigation much harder. More on that, <a title="here" href="http://kuza55.blogspot.com/2007/03/non-persistent-untraceable-xss-attacks.html">here</a>.</p>
<h2>Closing words</h2>
<p>Now why is that, you may ask? These guys implement process per tab, client-side xss filters and what not, to protect the user from harm, even if it is the fault of a specific website. Short answer, I don&#8217;t know. The argument that <a href="http://code.google.com/p/chromium/issues/detail?id=103384">changing it is hard</a>, seems a bit flimsy to me, especially given Google&#8217;s prior engineering track record.</p>
<p>Till next time</p>
<p>Nick Nikiforakis</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=208</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>El cheapo hosting, le open redirect&#8230;</title>
		<link>http://blog.securitee.org/?p=176</link>
		<comments>http://blog.securitee.org/?p=176#comments</comments>
		<pubDate>Wed, 14 Mar 2012 01:53:42 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Breaking stuff]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=176</guid>
		<description><![CDATA[Did you know that if you use a popular cheap web hosting product and you haven&#8217;t changed the default error pages of your sites, you are most likely hosting an open redirect? If not, read on Suppose for a second &#8230; <a href="http://blog.securitee.org/?p=176">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Did you know that if you use a popular cheap web hosting product and you haven&#8217;t changed the default error pages of your sites, you are most likely hosting an open redirect? If not, read on <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Suppose for a second that you are a loyal customer of babyhow.com, an eshop selling stuff for your baby. One beautiful day you receive an email letting you know that babyhow.com has moved its business and providing you with a link to read more:</p>
<p><span id="more-176"></span></p>
<pre>http://www.babyhow.com/We_Have_Moved?%27%7d%3b%7d%74%6f%70%2e%6c
%6f%63%61%74%69%6f%6e%2e%72%65%70%6c%61%63%65%28%27%68%74%74%70
%3a%2f%2f%77%77%77%2e%63%6e%6e%2e%63%6f%6d%27%29%3b%66%75%6e%63
%74%69%6f%6e%20%64%75%6d%6d%79%28%29%7b%76%61%72%20%66%6f%6f%3d
%7b%31%3a%27%31%a</pre>
<p>If you&#8217;ve read more posts from my blog you already know that the fact that I am hiding something from you by turning it into hex isn&#8217;t a good sign. But suppose, that you don&#8217;t know that. You click on that link, expecting to read more (copy-paste the thing and try it&#8230;its fun, I promise <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). For a second you see the banner of &#8220;Bluehost.com&#8221;, a cheap shared hosting business which claims to host &#8220;millions of domains&#8221;. A second later however, you are suddenly at the main page of cnn.com. What happened? Welcome to the world of open redirects&#8230; with a twist.</p>
<h2>Open redirects</h2>
<p>According to OWASP, an open redirect is &#8220;an application that takes a parameter and redirects a user to the parameter value without any validation. This vulnerability is used in phishing attacks to get users to visit malicious sites without realizing it.&#8221;</p>
<p>Sounds dangerous, doesn&#8217;t it? Now you may think&#8230; these stupid people at babyhow.com should fix their stuff. But you&#8217;d be wrong. Babyhow.com doesn&#8217;t have an open redirect. Its their hosting provider that has!</p>
<h2>Ads instead of errors</h2>
<p>I recently realized that the majority of the cheap and popular shared hosting companies (verified on bluehost.com and fatcow.com) are a bit sneakier than they should be. By default, when you host a website on their servers and a user requests a page that doesn&#8217;t exist, instead of sending a vanilla 404 message, they decide to capitalize on the opportunity and serve some ads while they&#8217;re at it.  Look what happens when I ask for <a title="http://www.gordonpage.net/i_dont_exist" href="http://www.gordonpage.net/i_dont_exist">http://www.gordonpage.net/i_dont_exist</a>, a domain hosted on fatcow.com and a non-existent page:</p>
<p><a href="http://blog.securitee.org/?attachment_id=177" rel="attachment wp-att-177"><img class="aligncenter size-large wp-image-177" title="open_red1" alt="" src="http://blog.securitee.org/wp-content/uploads/2012/03/open_red1-1024x520.png" width="640" height="325" /></a></p>
<p>I am pretty sure that Mr. Page doesn&#8217;t know that his site is serving random ads. If he did, he would have disabled this <strong>default </strong>behavior. To add insult to injury, the script responsible for creating the iframe that displays the ads, uses the URL of the error page in an insecure way, allowing an attacker to inject arbitrary JavaScript code. The only downside is that the injected code runs within the iframe and thus you can&#8217;t access resources of the site (like session cookies). What you can do however, is redirect the whole browser to a destination of your choice. In my earlier example, the injected code was redirecting the user from babyhow.com to cnn.com, but think in terms of phishing credentials or brand wars and you get the point <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s the link that I showed you earlier without the use of hex:</p>
<pre>http://babyhow.com/We_Have_Moved?'};}top.location.replace('http://
www.cnn.com');function dummy(){var foo={1:'1</pre>
<h2>Big picture:</h2>
<p>If you are using a cheap shared hosting provider and haven&#8217;t changed the default way of responding to 404 messages, your site is most likely &#8220;hosting&#8221; an open redirect that can damage both your business and your users. The sad thing is that it isn&#8217;t even your fault&#8230; its your hosting provider&#8217;s fault that tries to squeeze every last penny out of you and your visitors.</p>
<p>Till next time</p>
<p>Nick Nikiforakis</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bluehost.com made me feel blue&#8230;</title>
		<link>http://blog.securitee.org/?p=160</link>
		<comments>http://blog.securitee.org/?p=160#comments</comments>
		<pubDate>Sun, 19 Feb 2012 19:38:30 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Miscellanea]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=160</guid>
		<description><![CDATA[Two years ago I decided to get a personal site. I was after two things: flexibility and low cost. I didn&#8217;t want to get a VPS but I also didn&#8217;t want the hosting packages of one domain and 350MB of &#8230; <a href="http://blog.securitee.org/?p=160">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Two years ago I decided to get a personal site. I was after two things: flexibility and low cost. I didn&#8217;t want to get a VPS but I also didn&#8217;t want the hosting packages of one domain and 350MB of space. So I found <a title="IPage.com" href="http://www.ipage.com" target="_blank">IPage.com</a> a shared hosting provider that was giving me unlimited hosted sites, unlimited databases, unlimited bandwidth and unlimited disk space for about 35 euros for a year&#8230; that in my book was a great deal! So I went ahead and bought it. In that year I was generally happy with them. My pages where occasionally a bit slow but still fast enough for my sites&#8217; needs. The problem was that the 35 euro price was an introductory price and the next year IPage asked me for triple that amount&#8230; Since I didn&#8217;t feel like that was a good thing (now that you are a customer we&#8217;ll suck you dry) I decided to look elsewhere. A colleague at work recommended <a title="Bluehost.com" href="http://www.bluehost.com" target="_blank">Bluehost.com</a>. Bluehost offered me the same things as IPage plus SSH access for about 50 euros per year. I went for that and I was quite happy&#8230;. until this week&#8230;<span id="more-160"></span></p>
<p>On Wednesday night I suddenly received an email that my Bluehost account was deactivated due to &#8220;performance problems&#8221;. I went to my site and indeed it was down. So that was really a &#8220;<em>shoot first, ask questions later</em>&#8221; move from Bluehost. I started an online chat session with them where they were telling me that my sites cause performance problems to the Bluehost servers. The first tech support didn&#8217;t really know what he was talking about so for about 10&#8242; I was on a wild goose-chase for problems. Finally I thought I knew what had happened. One of my pages performed some logging when it was visited. That file was becoming a bit big, so I thought that, that was the problem. I cleaned up my logs, told them I fixed it and asked them to reactive my account. The guy said sure and he re-enabled it.</p>
<p>Ten minutes later I get another email saying that my account was disabled again. After chatting online and getting nowhere, I decided to call them on the phone (international call to the US from Belgium). Eventually I discovered that the aforementioned logging site became so popular that it was bringing &#8220;too much&#8221; traffic to their servers (you remember the &#8220;unlimited bandwidth&#8221; feature, right?). I promised the guy to change the DNS records of that domain to <span style="text-decoration: underline;">localhost</span> so that traffic would stop reaching their servers. He said &#8220;ok&#8221; and that I should call them in a few hours to get things re-enabled. While waiting for these two hours to pass, I received another email from my dear friends at Bluehost telling me that they decided not to reactivate my account. I quickly called them and explained that I had already fixed the issue. Their response was that the administrators at Bluehost had reviewed my site and had decided not to re-enable. That was that&#8230; no matter how hard I tried, I couldn&#8217;t convince them otherwise. To add insult to injury they refused to give me a small migration period, to allow me to take one or two days to find a replacement and then move everything, without all my websites experiencing downtime.</p>
<p style="text-align: center;"><a href="http://blog.securitee.org/?attachment_id=170" rel="attachment wp-att-170"><img class="aligncenter  wp-image-170" title="nelson-laughing" src="http://blog.securitee.org/wp-content/uploads/2012/02/nelson-laughing.jpg" alt="" width="320" height="240" /></a></p>
<p>And that was it&#8230; I was left high and dry with about 8 sites offline (my personal site, my experiments, my blog and professional sites of friends and family) at 2:30 in the morning. That&#8217;s who Bluehost.com are&#8230; people who don&#8217;t care about you because you are a single guy in a sea of customers. One less fish is not really an issue for them. That&#8217;s why I write this post. I promised their representative on the phone that I would do all in my power to let the world know about their shenanigans.</p>
<p>That&#8217;s me keeping my promise. My advice to you&#8230; don&#8217;t choose Bluehost. They are very nice as long as you are within what they consider &#8220;normal&#8221;. Even if I did do something wrong (which I didn&#8217;t), there should still be room for discussion and reconciliation.  I am currently on <a title="Fatcow.com" href="http://www.fatcow.com" target="_blank">Fatcow.com</a> . It feels a bit like IPage but it was the best thing I could find in such a short notice. Lets see how they turn out.</p>
<p>Till next time</p>
<p>Nick Nikiforakis</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=160</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Stored XSS on Statcounter!!!</title>
		<link>http://blog.securitee.org/?p=154</link>
		<comments>http://blog.securitee.org/?p=154#comments</comments>
		<pubDate>Tue, 14 Feb 2012 19:55:06 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Miscellanea]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=154</guid>
		<description><![CDATA[Stored XSS on popular Web statistics framework Statcounter. Log yourselves out of Statcounter and if possible disable JavaScript for the domain (possible in Chrome, not sure about Firefox)&#8230;  Will give more details when Statcounter fixes it. The only reason I &#8230; <a href="http://blog.securitee.org/?p=154">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Stored XSS on popular Web statistics framework Statcounter. Log yourselves out of Statcounter and if possible disable JavaScript for the domain (possible in Chrome, not sure about Firefox)&#8230;  Will give more details when Statcounter fixes it. The only reason I am saying it here is because my Statcounter logs just started popping alert boxes!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=154</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What do you call?</title>
		<link>http://blog.securitee.org/?p=146</link>
		<comments>http://blog.securitee.org/?p=146#comments</comments>
		<pubDate>Wed, 01 Feb 2012 22:34:48 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Miscellanea]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=146</guid>
		<description><![CDATA[Joke I just made up: What do you call a woman who first says to you &#8220;I love you&#8221; but ten minutes later she adds &#8220;I actually don&#8217;t, but don&#8217;t feel bad because I say that to all men&#8221;? Oakland12]]></description>
				<content:encoded><![CDATA[<p>Joke I just made up:</p>
<p><a href="http://blog.securitee.org/?attachment_id=147" rel="attachment wp-att-147"><img class="aligncenter size-full wp-image-147" title="breakup" src="http://blog.securitee.org/wp-content/uploads/2012/02/breakup.png" alt="" width="273" height="204" /></a></p>
<p>What do you call a woman who first says to you &#8220;I love you&#8221; but ten minutes later she adds &#8220;I actually don&#8217;t, but don&#8217;t feel bad because I say that to all men&#8221;?</p>
<p><span id="more-146"></span></p>
<p>Oakland12</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=146</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox and Self-XSS</title>
		<link>http://blog.securitee.org/?p=114</link>
		<comments>http://blog.securitee.org/?p=114#comments</comments>
		<pubDate>Wed, 04 Jan 2012 14:38:32 +0000</pubDate>
		<dc:creator>nikifor</dc:creator>
				<category><![CDATA[Breaking stuff]]></category>

		<guid isPermaLink="false">http://blog.securitee.org/?p=114</guid>
		<description><![CDATA[I still remember the good old days when I would just write &#8220;javascript:alert(document.cookie)&#8221; in my address bar and the browser would happily show me the JavaScript-accessible cookie values for the current domain. These were simpler days&#8230; Mid-2011 the developers of &#8230; <a href="http://blog.securitee.org/?p=114">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I still remember the good old days when I would just write &#8220;javascript:alert(document.cookie)&#8221; in my address bar and the browser would happily show me the JavaScript-accessible cookie values for the current domain. These were simpler days&#8230;</p>
<p>Mid-2011 the developers of Firefox decided that allowing the &#8220;javascript&#8221; directive in the URL bar was being abused by attackers to conduct <strong>self-XSS</strong> attacks more than it was being used for legitimate purposes. If you are not familiar with self-XSS fear not&#8230; they are quite easy to explain. <span id="more-114"></span></p>
<p>In short, self-XSS happens when an attacker convinces a user to copy-paste some malicious JavaScript code in his URL bar and hit &#8216;Enter&#8217;. This was used a lot in Facebook, since people there are usually very willing to follow instructions in order to get access to some sort of &#8220;video&#8221;, or &#8220;application&#8221; or information about how many people checked-out their profile today. Matt Jones has made a nice video demonstrating the attack which you can check out right <a href="https://www.facebook.com/photo.php?v=956977232793" target="_blank">here</a>. The effect of this, is exactly the same as an attacker injecting malicious JavaScript by exploiting the usual and well-known XSS bugs (reflected, stored, DOM-based).<br />
<div id="attachment_139" class="wp-caption aligncenter" style="width: 305px"><a href="http://blog.securitee.org/?attachment_id=139" rel="attachment wp-att-139"><img src="http://blog.securitee.org/wp-content/uploads/2012/01/manInTree.jpg" alt="Self-XSS before the Internet" title="manInTree" width="295" height="295" class="size-full wp-image-139" /></a><p class="wp-caption-text">Self-XSS before the Internet</p></div></p>
<p>Back to Firefox&#8230; so Firefox decided to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=527530#c6" target="_blank">disallow the use of JavaScript in the URL bar</a>. So no more self-XSS right? Wrong! In the newer versions of Firefox, there is a pretty &#8216;Web console&#8217; which a user can access and type in arbitrary JavaScript that will again run in the context of the current domain.</p>
<p><a href="http://blog.securitee.org/?attachment_id=118" rel="attachment wp-att-118"><img class="aligncenter size-medium wp-image-118" title="Firefox_WebConsole" src="http://blog.securitee.org/wp-content/uploads/2012/01/Firefox_WebConsole-300x209.png" alt="Firefox's Web Console" width="300" height="209" /></a></p>
<p>While people have accepted this, they believe that it is a greater hassle to users who will not do it as easily as they used to do the self-XSS through the browser URL bar. <em>The purpose of this post, is to claim that this is not true.</em></p>
<p>The &#8216;Web console&#8217; of Firefox has a handy default keyboard shortcut from which it is accessible: <em>Ctrl+Shift+K</em>. Now compare the list of instructions that an attacker would use to conduct self-XSS in the past, and the list of instructions now.</p>
<p><strong>Old:</strong></p>
<div style="background-color: #f8f8ff;">
<ol>
<li>Select the following text: javascript:alert(&#39;Welcome to a world of pain&#39;);</li>
<li>Hit the following:</li>
<li>
<ol>
<li>Ctrl+C</li>
<li>Ctrl+L</li>
<li>Ctrl+V</li>
<li>Enter</li>
</ol>
</li>
</ol>
</div>
<p><strong>New (you can actually follow along):</strong></p>
<div style="background-color: #f8f8ff;">
<ol>
<li>Select the following text: alert(&#39;Welcome to a world of pain&#39;);</li>
<li>Hit the following:</li>
<li>
<ol>
<li>Ctrl+C</li>
<li>Ctrl+L</li>
<li><span style="text-decoration: underline;">Ctrl+Shift+K</span></li>
<li>Ctrl+V</li>
<li>Enter</li>
</ol>
</li>
</ol>
</div>
<p>The only extra action needed to perform the attack is the Ctrl+Shift+K between the selection of the location bar (Ctrl+L) and the pasting of code (Ctrl+V). If anything I would claim that this is a smoother attack because the word &#8220;javascript&#8221; doesn&#8217;t need to be written as part of the malicious vector since the Web Console expects JavaScript and thus doesn&#8217;t need to be told: &#8220;Interpret the rest as JavaScript&#8221;.</p>
<p>In short I don&#8217;t  believe that this is a step in the right direction. Call me pessimistic but executing an extra step as part of getting access to &#8220;Virtual Carrots&#8221; or &#8220;Hot girls&#8221; doesn&#8217;t look like it would stop the kind of people that would fall for this attack in the first place.</p>
<p>Nick Nikiforakis</p>
<p>P.S. Happy New Year! <img src='http://blog.securitee.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitee.org/?feed=rss2&#038;p=114</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
