<?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>Mike Conley&#039;s Blog &#187; hacking</title>
	<atom:link href="http://mikeconley.ca/blog/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikeconley.ca/blog</link>
	<description>The personal blog of a Toronto based software developer, musician, sound designer, and theatre enthusiast.</description>
	<lastBuildDate>Fri, 11 May 2012 15:23:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Preventing SQL Injection Attacks</title>
		<link>http://mikeconley.ca/blog/2009/02/16/preventing-sql-injection-attacks/</link>
		<comments>http://mikeconley.ca/blog/2009/02/16/preventing-sql-injection-attacks/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 18:48:04 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[web applications]]></category>

		<guid isPermaLink="false">http://mikeconley.ca/blog/?p=125</guid>
		<description><![CDATA[Over the reading week, along with studying for various midterms and assignments, I&#8217;ve decided to brush up on preventing SQL Injection attacks in web applications. Pretty scary/awesome stuff out there on this stuff.  Here&#8217;s a great place to get some SQL Injection training, and here&#8217;s an excellent SQL Injection cheat sheet. I got hit with [...]]]></description>
			<content:encoded><![CDATA[<p>Over the reading week, along with studying for various midterms and assignments, I&#8217;ve decided to brush up on preventing SQL Injection attacks in web applications.</p>
<p>Pretty scary/awesome stuff out there on this stuff.  <a href="http://www.hackthissite.org" target="_self">Here&#8217;s a great place to get some SQL Injection training</a>, and <a href="http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/" target="_self">here&#8217;s an excellent SQL Injection cheat sheet</a>.</p>
<p>I got hit with a pretty bad SQL Injection attack last summer on an application I had written 3 years ago (before I had any clue that SQL Injection attacks were possible).</p>
<p>Here&#8217;s the take home message:  <strong>never trust user input.  Ever. </strong>If you&#8217;re expecting an int, make sure it&#8217;s an int.  <strong>Never insert user input directly into an SQL string.</strong> Use prepared statements instead, or stored procedures.</p>
<p>Luckily, I just did a quick survey of all of my running apps, and I seem to be OK in terms of SQL Injection.  Still, it&#8217;s a common attack vector &#8211; and the consequences of being lazy on user input can be pretty awful.</p>
<p><strong>Update: </strong> Want to see something awesome?  <a href="http://www.milw0rm.com/video/watch.php?id=92" target="_self">Check this out &#8211; a Debian box gets rooted through MySQL injection&#8230;killer soundtrack too.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mikeconley.ca/blog/2009/02/16/preventing-sql-injection-attacks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

