<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dhavalse&#039;s Blog</title>
	<atom:link href="http://dhavalse.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dhavalse.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 06 Jul 2009 13:08:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dhavalse.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Dhavalse&#039;s Blog</title>
		<link>http://dhavalse.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dhavalse.wordpress.com/osd.xml" title="Dhavalse&#039;s Blog" />
	<atom:link rel='hub' href='http://dhavalse.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SQL Injection &amp; Prevention Of SQL Injection</title>
		<link>http://dhavalse.wordpress.com/2009/06/16/sql-injection-prevention-of-sql-injection/</link>
		<comments>http://dhavalse.wordpress.com/2009/06/16/sql-injection-prevention-of-sql-injection/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 08:29:25 +0000</pubDate>
		<dc:creator>Dhaval Shah</dc:creator>
				<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[Dhaval Shah]]></category>
		<category><![CDATA[Dhaval Shah SQL Injection]]></category>
		<category><![CDATA[Dhavalse]]></category>
		<category><![CDATA[Prevention of SQL Injection]]></category>
		<category><![CDATA[What is SQL Injection]]></category>

		<guid isPermaLink="false">http://dhavalse.wordpress.com/?p=3</guid>
		<description><![CDATA[What is SQL Injection? SQL injection is a technique that exploits a security vulnerability occurring in the database layer of an application. This vulnerability is present when user input is manipulated for string literal escape characters embedded in SQL statements or user input is not sufficiently filtered and thereby unexpectedly executed. How SQL Injection looks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dhavalse.wordpress.com&amp;blog=8194301&amp;post=3&amp;subd=dhavalse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration:underline;">What is SQL Injection?</span></strong></p>
<p>SQL injection is a technique that exploits a security vulnerability occurring in the database layer of an application. This vulnerability is present when user input is manipulated for string literal escape characters embedded in SQL statements or user input is not sufficiently filtered and thereby unexpectedly executed.</p>
<p><strong><span style="text-decoration:underline;">How SQL Injection looks like?</span></strong></p>
<p><strong>Basic SQL Injections</strong></p>
<p>If anybody want to pull up the records of particular user name from the user information table and if “username” variable is set as</p>
<p align="center"><img class="alignnone size-full wp-image-8" title="1" src="http://dhavalse.files.wordpress.com/2009/06/1.png?w=161&#038;h=40" alt="1" width="161" height="40" /></p>
<p>By inputting the above code as user name , Let see how’s it work at back end?</p>
<p align="center"><img class="alignnone size-full wp-image-7" title="2" src="http://dhavalse.files.wordpress.com/2009/06/2.png?w=450&#038;h=34" alt="2" width="450" height="34" /></p>
<p>If we use this type of code were in an authentication procedure then this example could be used to force the selection of a valid “username” because the evaluation of &#8216;y&#8217;='y&#8217; is always true and you will be logged in as the user on top of the SQL table</p>
<p>Same way if the “username” variable is set as</p>
<p align="center"><img class="alignnone size-full wp-image-6" title="3" src="http://dhavalse.files.wordpress.com/2009/06/3.png?w=151&#038;h=36" alt="3" width="151" height="36" /></p>
<p>If we use double dashes (–) than at the back end these dashes at the end tell the SQL server to ignore the rest of the query.</p>
<p align="center"><img class="alignnone size-full wp-image-5" title="4" src="http://dhavalse.files.wordpress.com/2009/06/4.png?w=450&#038;h=24" alt="4" width="450" height="24" /></p>
<p>Same way more SQL Injection syntaxes are:</p>
<p><img class="alignnone size-full wp-image-9" title="5" src="http://dhavalse.files.wordpress.com/2009/06/5.png?w=168&#038;h=222" alt="5" width="168" height="222" /></p>
<p><strong><span style="text-decoration:underline;">How can we get free from SQL Injection?</span></strong></p>
<ul>
<li><strong>Validate all input</strong><strong> </strong>before using it.</li>
</ul>
<p style="padding-left:60px;">We can validate the input by this way.</p>
<ul>
<li>
<ul>
<li>
<ul>
<li>Reject the input that contains the following characters:
<ul>
<li>Single Quote(&#8216;)</li>
<li>Dash ( &#8211; )</li>
<li>/* and */</li>
<li>Semicolon ( ; )</li>
<li>Using stored procedures to validate user input.</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><strong>User parameterized input with stored procedures:</strong> Stored procedures may be susceptible to SQL injection if they use unfiltered input. So all the input provided to the stored Procedures is provided in the form of parameters</li>
<li><strong>· </strong><strong>Filtering input: </strong>Replace a Single Quote (‘) with two Single Quotes (‘’) to filter the input.</li>
<li><strong>Limit the database permission: </strong>Use a limited access account to connect to the database</li>
<li><strong>Don’t store secrets in plain text: </strong>Encrypt or hash passwords and other sensitive data; you should also encrypt connection strings</li>
<li><strong>Exceptions should divulge minimal information: </strong>Don&#8217;t expose too much information in error messages; display minimal information in the event of error handling.</li>
</ul>
<p><a href="http://en.wikipedia.org/wiki/SQL_injection">http://en.wikipedia.org/wiki/SQL_injection</a></p>
<p><a href="http://www.secureworks.com/research/articles/sql-injection-attacks">http://www.secureworks.com/research/articles/sql-injection-attacks</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dhavalse.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dhavalse.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dhavalse.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dhavalse.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dhavalse.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dhavalse.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dhavalse.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dhavalse.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dhavalse.wordpress.com&amp;blog=8194301&amp;post=3&amp;subd=dhavalse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dhavalse.wordpress.com/2009/06/16/sql-injection-prevention-of-sql-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eac0a50cd99bb97e4dca02c3b280f7be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dhaval Shah</media:title>
		</media:content>

		<media:content url="http://dhavalse.files.wordpress.com/2009/06/1.png" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://dhavalse.files.wordpress.com/2009/06/2.png" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://dhavalse.files.wordpress.com/2009/06/3.png" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://dhavalse.files.wordpress.com/2009/06/4.png" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://dhavalse.files.wordpress.com/2009/06/5.png" medium="image">
			<media:title type="html">5</media:title>
		</media:content>
	</item>
	</channel>
</rss>
