<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Protection from SQL Injection</title><link>http://blogs.iis.net/tomwoolums/archive/2008/08/29/protection-from-sql-injection.aspx</link><description>I just finished watching a short video on YouTube of a 13-year-old kid showing people how to hack into a retail Web site. It only took him a couple of minutes and one simple technique to gain access to their customers&amp;#8217; personal information&amp;#8212;including</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Protection from SQL Injection</title><link>http://blogs.iis.net/tomwoolums/archive/2008/08/29/protection-from-sql-injection.aspx#2594158</link><pubDate>Tue, 02 Sep 2008 06:09:05 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2594158</guid><dc:creator>bholyfield</dc:creator><description>&lt;p&gt;URLScan is a great defense mechanism for web server attacks, but I have found that it is not flexible enough to defend against web application-level attacks like SQL Injection. &amp;nbsp; The group I work with just released a free module for IIS (called SPF) that provides a flexible mechanism for blocking malicious requests. &amp;nbsp;It provides coverage options for Query Strings, POST data and Cookies (where as URL Scan is limited to just Query Strings). &amp;nbsp;It also supports use of regular expressions to define malicious input sequences.&lt;/p&gt;
&lt;p&gt;SPF for IIS is available for free and can be downloaded from our website: &lt;a rel="nofollow" target="_new" href="http://www.gdssecurity.com/l/b/category/tools/"&gt;www.gdssecurity.com/.../tools&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also find out more about it from the following Blog post: &amp;nbsp;&lt;a rel="nofollow" target="_new" href="http://www.gdssecurity.com/l/b/2008/08/22/iis-secure-parameter-filter-spf-released/"&gt;www.gdssecurity.com/.../iis-secure-parameter-filter-spf-released&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2594158" width="1" height="1"&gt;</description></item><item><title>re: Protection from SQL Injection</title><link>http://blogs.iis.net/tomwoolums/archive/2008/08/29/protection-from-sql-injection.aspx#2592257</link><pubDate>Mon, 01 Sep 2008 07:24:21 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2592257</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;Thanks guys. Very helpful.&lt;/p&gt;
&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2592257" width="1" height="1"&gt;</description></item><item><title>re: Protection from SQL Injection</title><link>http://blogs.iis.net/tomwoolums/archive/2008/08/29/protection-from-sql-injection.aspx#2590946</link><pubDate>Sat, 30 Aug 2008 23:55:47 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2590946</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;If a site is written correctly SQL injection should not be an issue at all. The basic steps that should be taken include...&lt;/p&gt;
&lt;p&gt;1. Always use parameterised Queries or Stored Procedures.&lt;/p&gt;
&lt;p&gt;2. The SQL login used by the scripts in the site should only have access to do what is required and nothing more. For example if the site user only requires access to limited sub-set of stored procedures, ensure that these stored procedures are all it can access.&lt;/p&gt;
&lt;p&gt;All the user input validation in the world cannot fully protect against SQL injection. However if you religiously follow these 2 basic basic principals it will.&lt;/p&gt;
&lt;p&gt;Basically the only reason SQL injection works, is because sites dynamically create arbitrary SQL using hard coded strings combined with user entered data and pass. The problem here is that there's always the possibility that the user entered data can contain SQL commands.&lt;/p&gt;
&lt;p&gt;If instead you use parameterised queries then the user entered data is only ever treated as data, never SQL commands, so basically it can contain whatever it likes and it wont be harmful.&lt;/p&gt;
&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2590946" width="1" height="1"&gt;</description></item></channel></rss>