<?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: How to Fix a SQL Injection Attack</title>
	<atom:link href="http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Tue, 24 Jan 2012 10:54:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Madhivanan</title>
		<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/comment-page-1#comment-515</link>
		<dc:creator>Madhivanan</dc:creator>
		<pubDate>Fri, 04 Jun 2010 13:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=814#comment-515</guid>
		<description>Here is derived table approach that can avoid SQL Injection&lt;br&gt;&lt;a href=&quot;http://beyondrelational.com/blogs/madhivanan/archive/2010/05/14/derived-table-new-approach-to-avoid-sql-injection.aspx&quot; rel=&quot;nofollow&quot;&gt;http://beyondrelational.com/blogs/madhivanan/ar...&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Here is derived table approach that can avoid SQL Injection<br /><a href="http://beyondrelational.com/blogs/madhivanan/archive/2010/05/14/derived-table-new-approach-to-avoid-sql-injection.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/ar&#8230;</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/comment-page-1#comment-350</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 11 Apr 2009 21:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=814#comment-350</guid>
		<description>in the previous post, the script got cut out, what I used what the 2nd script and replaced the table name, column name, and injection script I wanted removed.  Sometimes simple is better.</description>
		<content:encoded><![CDATA[<p>in the previous post, the script got cut out, what I used what the 2nd script and replaced the table name, column name, and injection script I wanted removed.  Sometimes simple is better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/comment-page-1#comment-349</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 11 Apr 2009 21:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=814#comment-349</guid>
		<description>I tried a lot of code to rid my ms sql database of these scripts that were put there from an injection attack.  Until now, I had no success, you code saved my DB!  Thanks so much.  I had a lot of different types of scripts and a lot of table to go through.  I ended up using this script:
&lt;pre lang=&quot;sql&quot;&gt;
UPDATE [tableName]
SET columnName = REPLACE(CAST(columnName AS VARCHAR(8000)), &#039;&quot;&gt;&lt;!--%&#039;
&lt;/pre&gt;
I went table by table and column by column to make sure I got it all.  For future reference, how would you rewrite this script so that I can put the table, column, and offending script in as a variable?</description>
		<content:encoded><![CDATA[<p>I tried a lot of code to rid my ms sql database of these scripts that were put there from an injection attack.  Until now, I had no success, you code saved my DB!  Thanks so much.  I had a lot of different types of scripts and a lot of table to go through.  I ended up using this script:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><<span style="color: #0000ff;">|</span>/1/>UPDATE</span> <span style="color: #66cc66;">&#91;</span>tableName<span style="color: #66cc66;">&#93;</span>
<<span style="color: #0000ff;">|</span>/1/>SET</span> columnName <span style="color: #0000ff;">=</span> <span style="color: #ff00ff;">REPLACE</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff00ff;">CAST</span><span style="color: #66cc66;">&#40;</span>columnName <<span style="color: #0000ff;">|</span>/1/>AS</span> <<span style="color: #0000ff;">|</span>/2/>VARCHAR</span><span style="color: #66cc66;">&#40;</span><<span style="color: #0000ff;">|</span> style<span style="color: #66cc66;">=</span>"color: #cc66cc;">8000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">'&quot;&amp;gt;&amp;lt;!--%'</span></pre></div></div>

<p>I went table by table and column by column to make sure I got it all.  For future reference, how would you rewrite this script so that I can put the table, column, and offending script in as a variable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laju</title>
		<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/comment-page-1#comment-348</link>
		<dc:creator>Laju</dc:creator>
		<pubDate>Sun, 05 Oct 2008 11:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=814#comment-348</guid>
		<description>Thank you, it was really useful....</description>
		<content:encoded><![CDATA[<p>Thank you, it was really useful&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SitePoint Blogs &#187; All&#8217;s Quiet on the CF Front&#8230;</title>
		<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/comment-page-1#comment-347</link>
		<dc:creator>SitePoint Blogs &#187; All&#8217;s Quiet on the CF Front&#8230;</dc:creator>
		<pubDate>Thu, 28 Aug 2008 14:03:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=814#comment-347</guid>
		<description>[...] - has hit version 0.8. SQL Injection attacks still bugging you? Simon Whatley has posted on how to fix an SQL Injection hack, and also how to protect against a malicious attack in the first place (hat tip to Steve Bryant). [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; has hit version 0.8. SQL Injection attacks still bugging you? Simon Whatley has posted on how to fix an SQL Injection hack, and also how to protect against a malicious attack in the first place (hat tip to Steve Bryant). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bigric</title>
		<link>http://www.simonwhatley.co.uk/how-to-fix-a-sql-injection-attack/comment-page-1#comment-346</link>
		<dc:creator>bigric</dc:creator>
		<pubDate>Wed, 27 Aug 2008 06:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=814#comment-346</guid>
		<description>Thank you! That really saved me a lot of time.</description>
		<content:encoded><![CDATA[<p>Thank you! That really saved me a lot of time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

