<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SQL Injection Hack using CAST from 1.verynx.cn</title>
	<atom:link href="http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html</link>
	<description>rtraction blog</description>
	<lastBuildDate>Fri, 12 Mar 2010 17:29:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alex</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-33246</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 17 Dec 2009 19:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-33246</guid>
		<description>Hi!

I created a video tutorial about SQL injection.
Take a look:

http://www.webmastervideoschool.com/blog_item.php?id=7</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I created a video tutorial about SQL injection.<br />
Take a look:</p>
<p><a href="http://www.webmastervideoschool.com/blog_item.php?id=7" rel="nofollow">http://www.webmastervideoschool.com/blog_item.php?id=7</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-31144</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 02 Nov 2009 16:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-31144</guid>
		<description>Hi Sandy,

There are some scanners available that will scan the website and tell you if they&#039;ve detected any type of weakness (injection, XSS, etc...).  If you search around online you should be able to find some free ones and some others that require you to purchase a license.  There&#039;s one called Acunetix that allows you to do XSS scanning for free but you must buy a license to do the other scans.  The other option you have is to hire someone who has experience with testing a solution and providing detailed reports on security concerns.  Typically a scan of a website isn&#039;t enough to ensure it&#039;s secure. (As secure as it can be)  A code review should be undertaken as well as security scans.  

Hope that helps - good luck.

Thanks,
Dave</description>
		<content:encoded><![CDATA[<p>Hi Sandy,</p>
<p>There are some scanners available that will scan the website and tell you if they&#8217;ve detected any type of weakness (injection, XSS, etc&#8230;).  If you search around online you should be able to find some free ones and some others that require you to purchase a license.  There&#8217;s one called Acunetix that allows you to do XSS scanning for free but you must buy a license to do the other scans.  The other option you have is to hire someone who has experience with testing a solution and providing detailed reports on security concerns.  Typically a scan of a website isn&#8217;t enough to ensure it&#8217;s secure. (As secure as it can be)  A code review should be undertaken as well as security scans.  </p>
<p>Hope that helps &#8211; good luck.</p>
<p>Thanks,<br />
Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandy</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-30774</link>
		<dc:creator>sandy</dc:creator>
		<pubDate>Thu, 29 Oct 2009 10:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-30774</guid>
		<description>hi,

I am a QA person and after reading your post i applied to above code to some website created in PHP, i am testing these days (server is placed soemwhere else).

e.g., www.mywebsite.com/home.php?declare ;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=&#039;u&#039; 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(&#039;update [&#039;+@T+&#039;] set [&#039;+@C+&#039;]=[&#039;+@C+&#039;]+””&gt;&lt;!–”’)FETCH NEXT FROM Table_Cursor INTO @T,@C END CLOSE Table_Cursor DEALLOCATE Table_Cursor

so how would i know if the chnages have taken effect or some error has occured since I clicked enter and normal page opened against that URL of my website under test as if nothing had happened. Please tell me how to check if something wrong has occured or not or tell me of some tool that records and shows what&#039;s happening at the back end</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>I am a QA person and after reading your post i applied to above code to some website created in PHP, i am testing these days (server is placed soemwhere else).</p>
<p>e.g., <a href="http://www.mywebsite.com/home.php?declare" rel="nofollow">http://www.mywebsite.com/home.php?declare</a> ;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=&#8217;u&#8217; 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(&#8216;update ['+@T+'] set ['+@C+']=['+@C+']+””&gt;&lt;!–”’)FETCH NEXT FROM Table_Cursor INTO @T,@C END CLOSE Table_Cursor DEALLOCATE Table_Cursor</p>
<p>so how would i know if the chnages have taken effect or some error has occured since I clicked enter and normal page opened against that URL of my website under test as if nothing had happened. Please tell me how to check if something wrong has occured or not or tell me of some tool that records and shows what&#8217;s happening at the back end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandrar</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-28894</link>
		<dc:creator>sandrar</dc:creator>
		<pubDate>Thu, 10 Sep 2009 13:28:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-28894</guid>
		<description>Hi! I was surfing and found your blog post... nice! I love your blog.  :) Cheers! Sandra. R.</description>
		<content:encoded><![CDATA[<p>Hi! I was surfing and found your blog post&#8230; nice! I love your blog.  <img src='http://www.rtraction.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Cheers! Sandra. R.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: niccisweden</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-28040</link>
		<dc:creator>niccisweden</dc:creator>
		<pubDate>Tue, 18 Aug 2009 15:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-28040</guid>
		<description>informative for me, like that

 [url=http://www.injectable-filler.com]injectable filler</description>
		<content:encoded><![CDATA[<p>informative for me, like that</p>
<p> [url=http://www.injectable-filler.com]injectable filler</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zaphod</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-15860</link>
		<dc:creator>Zaphod</dc:creator>
		<pubDate>Mon, 01 Dec 2008 17:32:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-15860</guid>
		<description>This very selfsame injection attack, that was the impetus for me writing a new breed of php and mysql website protecting script, to protect my own website assets.

I am now sharing the script with the world, licensed GNU/GPL V.2 and it does much more than just detect this attack. It also does IP range banning, hostname banning, keyword banning, and a few other cool tricks to protect your website. Give it an eyeball at http://zaphodb777.dyndns.org/zbblockpage.php , and discuss it at http://zaphodb777.dyndns.org/forum.

Thanks! :)</description>
		<content:encoded><![CDATA[<p>This very selfsame injection attack, that was the impetus for me writing a new breed of php and mysql website protecting script, to protect my own website assets.</p>
<p>I am now sharing the script with the world, licensed GNU/GPL V.2 and it does much more than just detect this attack. It also does IP range banning, hostname banning, keyword banning, and a few other cool tricks to protect your website. Give it an eyeball at <a href="http://zaphodb777.dyndns.org/zbblockpage.php" rel="nofollow">http://zaphodb777.dyndns.org/zbblockpage.php</a> , and discuss it at <a href="http://zaphodb777.dyndns.org/forum" rel="nofollow">http://zaphodb777.dyndns.org/forum</a>.</p>
<p>Thanks! <img src='http://www.rtraction.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adil Nawaz Khan</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-15506</link>
		<dc:creator>Adil Nawaz Khan</dc:creator>
		<pubDate>Thu, 27 Nov 2008 14:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-15506</guid>
		<description>Hi All,
  I just wanted to share my work around for this type of sql injection. I applied security at multiple places. First i created a method which takes value of querystring and checks for some malicious text like &quot;Declare&quot;,&quot;Cast&quot;,&quot;Convert&quot;,&quot;Var&quot;,&quot;&#039;&quot;,&quot;,&quot;&quot;,&quot;Drop&quot;,&quot;Delete&quot;,&quot;Update&quot;,&quot;Insert&quot;,&quot;Create&quot;,&quot;Set&quot;,&quot;Database&quot;. If this function finds any of these malicious codes, it will first get an IP# of the requesting machine and stroes it to the MaliciousIP table and rejects the request by just refreshing the page. Showing some kind of message may provide them some kind of hints which they can make use of.
  The IP# which belongs to MaliciousIP would be allowed to enter same data only two more times, after that it will be blocked forever. Again not messages. This helps us to frustrate them a bit. And this is what our tsk is, to frustrate them and make them leave wrong attempt.
  The third security step i took is using a &quot;Check&quot; constraint. I have some very important tables in my database, which i needed to make sure should not be affected at all. I attached &quot;Check&quot; constraint with the help of expression including keywords like &quot;&quot;,&quot;/&quot;,&quot;.js&quot;,&quot;!&quot;,&quot;--&quot;. These chck constraint can reject data coming in with these words.
  Similar kind of security blocks you can follow according to your requirement. I would appreciate suggestions if any is available for this concern.
  Hackers are among us, and we can defeat them, just keep your spirit up.

Thanks
Adil</description>
		<content:encoded><![CDATA[<p>Hi All,<br />
  I just wanted to share my work around for this type of sql injection. I applied security at multiple places. First i created a method which takes value of querystring and checks for some malicious text like &#8220;Declare&#8221;,&#8221;Cast&#8221;,&#8221;Convert&#8221;,&#8221;Var&#8221;,&#8221;&#8216;&#8221;,&#8221;,&#8221;",&#8221;Drop&#8221;,&#8221;Delete&#8221;,&#8221;Update&#8221;,&#8221;Insert&#8221;,&#8221;Create&#8221;,&#8221;Set&#8221;,&#8221;Database&#8221;. If this function finds any of these malicious codes, it will first get an IP# of the requesting machine and stroes it to the MaliciousIP table and rejects the request by just refreshing the page. Showing some kind of message may provide them some kind of hints which they can make use of.<br />
  The IP# which belongs to MaliciousIP would be allowed to enter same data only two more times, after that it will be blocked forever. Again not messages. This helps us to frustrate them a bit. And this is what our tsk is, to frustrate them and make them leave wrong attempt.<br />
  The third security step i took is using a &#8220;Check&#8221; constraint. I have some very important tables in my database, which i needed to make sure should not be affected at all. I attached &#8220;Check&#8221; constraint with the help of expression including keywords like &#8220;&#8221;,&#8221;/&#8221;,&#8221;.js&#8221;,&#8221;!&#8221;,&#8221;&#8211;&#8221;. These chck constraint can reject data coming in with these words.<br />
  Similar kind of security blocks you can follow according to your requirement. I would appreciate suggestions if any is available for this concern.<br />
  Hackers are among us, and we can defeat them, just keep your spirit up.</p>
<p>Thanks<br />
Adil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen Harkleroad</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-12729</link>
		<dc:creator>Allen Harkleroad</dc:creator>
		<pubDate>Sat, 25 Oct 2008 10:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-12729</guid>
		<description>We blocked SQL injections at our Cisco router (anything running Cisco IOS should block it). We built a class-map called http-hacks, set it to null route and put:

Match protocol http url &quot;*;DECLARE*&quot;
Match protocol http url &quot;*DECLARE%20*&quot;
Match protocol http url &quot;*=CAST*&quot;

We applied the class-map to the external facing interface (incoming). You could also apply it on the other interface as well to stop any outgoing attacks if you are worried about such things.

in it, drops all incoming http containing those. You can do similar for nearly any http request. We did the same thing with the Storm worm crud and a few other things we got tired of script kiddies trying to hit (like cmd.exe, default.ida, etc.)</description>
		<content:encoded><![CDATA[<p>We blocked SQL injections at our Cisco router (anything running Cisco IOS should block it). We built a class-map called http-hacks, set it to null route and put:</p>
<p>Match protocol http url &#8220;*;DECLARE*&#8221;<br />
Match protocol http url &#8220;*DECLARE%20*&#8221;<br />
Match protocol http url &#8220;*=CAST*&#8221;</p>
<p>We applied the class-map to the external facing interface (incoming). You could also apply it on the other interface as well to stop any outgoing attacks if you are worried about such things.</p>
<p>in it, drops all incoming http containing those. You can do similar for nearly any http request. We did the same thing with the Storm worm crud and a few other things we got tired of script kiddies trying to hit (like cmd.exe, default.ida, etc.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aman</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-12365</link>
		<dc:creator>aman</dc:creator>
		<pubDate>Mon, 20 Oct 2008 06:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-12365</guid>
		<description>hi,

this side Aman....my blog is hacked and i want to get it back....plz tell me any sloution if you have ..plz help me.</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>this side Aman&#8230;.my blog is hacked and i want to get it back&#8230;.plz tell me any sloution if you have ..plz help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joet</title>
		<link>http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html/comment-page-2#comment-11907</link>
		<dc:creator>joet</dc:creator>
		<pubDate>Tue, 14 Oct 2008 01:32:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.rtraction.com/blog/devit/sql-injection-hack-using-cast.html#comment-11907</guid>
		<description>hackers are back and were able to overwrite a file despite permissions denying write</description>
		<content:encoded><![CDATA[<p>hackers are back and were able to overwrite a file despite permissions denying write</p>
]]></content:encoded>
	</item>
</channel>
</rss>
