 




<?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>SQL Server with Mr. Denny &#187; SQL Injection</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/sql-server/tag/sql-injection/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/sql-server</link>
	<description></description>
	<lastBuildDate>Fri, 17 May 2013 17:04:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Old Web Based Applications Need To Be Removed</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/old-web-based-applications-need-to-be-removed/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/old-web-based-applications-need-to-be-removed/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 14:00:11 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Data Loss]]></category>
		<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[SELECT statement]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Stored Procedures]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2241</guid>
		<description><![CDATA[What happens to most obsolete web based applications at most companies?  They sit idle on a web server for months, sometimes years.  Why is this a problem? Because many of these old applications can be easily exploited via SQL Injection allowing access into the SQL Server databases which they connected to.  The reason that these old [...]]]></description>
				<content:encoded><![CDATA[<p>What happens to most obsolete web based applications at most companies?  They sit idle on a web server for months, sometimes years.  Why is this a problem? Because many of these old applications can be easily exploited via SQL Injection allowing access into the SQL Server databases which they connected to.  The reason that these old apps are a great way into the SQL Server is because they are old, and were probably written before things like SQL Injection protection became more common place.</p>
<p>This tweet from Daniel (@<a href="http://twitter.com/DaniSQL">DaniSQL</a>) is a perfect example of this.</p>
<p><a href="http://itknowledgeexchange.techtarget.com/sql-server/?attachment_id=2242" rel="attachment wp-att-2242"><img class="alignnone size-full wp-image-2242" src="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/20/files/2012/08/old-app.jpg" alt="" width="301" height="94" /></a></p>
<p>An old application that isn&#8217;t being used anymore is still available on the Internet facing web farm.  Because this application isn&#8217;t being used any more it wasn&#8217;t on any lists of deployed applications, so when security audits were done it wasn&#8217;t seen as it wasn&#8217;t listed as an active application.  However it was apparently able to provide a hacker with a way into the database because it was still connected to a SQL Server instance and it was susceptible to SQL Injection.</p>
<p>The solution to this problem is sadly easy, remove the web based application from the web farm as the application isn&#8217;t being used anywhere.  It&#8217;s a lot easier than fixing the application, and a whole lot cheaper (10 minutes of a system administrator&#8217;s time versus weeks or months of a developers time).</p>
<p>I urge you to audit the applications and websites which are deployed to your web farms, especially the Internet facing web farms and see what&#8217;s on there.  When you audit them, don&#8217;t audit them against the list of what&#8217;s there.  Actually dig into the IIS config of each and every server (yes I&#8217;m well aware that doing this sucks) and actually see what&#8217;s configured on each machine.  If you don&#8217;t know if an application is actually being used ask around.  If it isn&#8217;t, remove it (or at least stop the site in IIS) so that you don&#8217;t have to worry about <a href="http://blog.dynamoo.com/2012/08/xinthesidersdowncom-injection-attack-in.html">scripts breaking into your database and updating your data</a>.</p>
<p>Now thankfully this current attack which is going around is just updating data, but it could easily enough be changed by the attacker to gather data as well, so do yourself a favor and protect yourself.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/old-web-based-applications-need-to-be-removed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security Sessions at SQL PASS 2012</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/security-sessions-at-sql-pass-2012/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/security-sessions-at-sql-pass-2012/#comments</comments>
		<pubDate>Thu, 26 Jul 2012 14:00:34 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Data Encryption]]></category>
		<category><![CDATA[Data Loss]]></category>
		<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database Design]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[SQL PASS]]></category>
		<category><![CDATA[SQL PASS 2012]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2000]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2190</guid>
		<description><![CDATA[The SQL PASS session list for the SQL PASS 2012 Summit has been released.  This year there are 192 sessions being presented at the SQL PASS summit.  Last year at the 2011 summit there were only a couple of sessions on SQL Server Security.  This year there are 4 sessions.  While this appears to be a [...]]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://www.sqlpass.org/summit/2012/Sessions/ConferenceSessions.aspx">SQL PASS session list</a> for the SQL PASS 2012 Summit has been released.  This year there are 192 sessions being presented at the SQL PASS summit.  Last year at the 2011 summit there were only a couple of sessions on SQL Server Security.  This year there are 4 sessions.  While this appears to be a bit better that before (if I remember correctly there were 3 last year), based on the number of large scale data breeches this year we need to be talking more about SQL Server security, and most importantly people need to actually listen.</p>
<p><a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2654">Where Should I Be Encrypting My Data</a> being presented by me</p>
<p><a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2886">SQL Server 2012 Security for Developers</a> being presented by Andreas Wolter</p>
<p><a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3361">The Evolution of Security in SQL Server 2012</a> being presented by Don Kiely</p>
<p><a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3251">SQL Injection: From Website to SQL Server</a> being presented by Mladen Prajdić</p>
<p>There are a couple of other sessions that mention <a href="http://www.sqlpass.org/summit/2012/Sessions/ConferenceSessions.aspx?k=security&amp;p=1&amp;preferred=false">security</a> in the abstract, but based on these abstracts I&#8217;m guessing that security won&#8217;t be mentioned very much during the actual sessions.</p>
<p>Denny</p>
<p>P.S. Don&#8217;t forget about my free <a href="http://itknowledgeexchange.techtarget.com/sql-server/sql-pass-2012-first-timers-webcast/">SQL PASS 2012 First Timer&#8217;s webcast</a> coming up on October 17th, 2012 at 1pm Pacific / 4pm Eastern.  You do need to <a href="https://docs.google.com/spreadsheet/viewform?formkey=dGNXcUw2Y29oZXF4V2NXSnlpRjAzcXc6MQ">sign up</a> for the session, which is FREE so get signed up.  Even if you have attended the SQL PASS summit before, this is worth it as there are some big changes in how PASS will be laid out at the convention center this year.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/security-sessions-at-sql-pass-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing SQL Server 2nd Edition Coming Soon</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/securing-sql-server-2nd-edition-coming-soon/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/securing-sql-server-2nd-edition-coming-soon/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 14:00:41 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Securing SQL Server]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2012]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/securing-sql-server-2nd-edition-coming-soon/</guid>
		<description><![CDATA[In case you missed my announcement earlier this week over on SecuringSQLServer.com&#8230; I&#8217;m pleased to be able to announce that the 2nd edition of Securing SQL Server is going to be available soon.  It&#8217;s just been made available for pre-order on Amazon.com.  The second edition comes in at about 350 pages (according to Amazon, I [...]]]></description>
				<content:encoded><![CDATA[<p>In case you missed my announcement earlier this week over on <a href="http://securingsqlserver.com/securing-sql-server-2nd-edition-coming-soon">SecuringSQLServer.com</a>&#8230;</p>
<p>I&#8217;m pleased to be able to announce that the <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;tag=sesqse-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471">2nd edition of Securing SQL Server </a>is going to be available soon.  It&#8217;s just been made available for <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;tag=sesqse-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471">pre-order on Amazon.com</a>.   The second edition comes in at about 350 pages (according to Amazon, I  don&#8217;t actually have a copy of it yet) while the first edition came in at  about 270 pages so there has been a LOT of material added to the book.</p>
<p>While  a lot of the new information is focused on SQL Server 2012, there is  also a lot of new material which relates to older version of SQL Server  including chapters on SQL Server Analysis Services and SQL Server  Reporting Services, information on Instant File Initialization, EXECUTE  AS, Database Firewalls, SAN Security, Actual Data Security (no idea how  this got missed the first time around, but that&#8217;s to Brent Ozar for  pointing it out).</p>
<p>As far as the SQL Server 2012 information you&#8217;ll  find updated information about the SHA2 hashing algorithms, Securing  AlwaysOn Availability Groups, Security and SQL Server Clustering,  Security and Contained Databases and a lot more.</p>
<p>If you already  have a copy of the 1st edition I encourage you to take a look at the  second edition as well.  I know that it&#8217;s really soon for a second  edition of a book (the first edition just came out February 2011, but  this new edition comes on the release of SQL Server 2012.</p>
<p>Hopefully you <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;tag=sesqse-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471">pre-order</a> you copy today.</p>
<p>Denny</p>
<p>P.S.  Yes this edition will be available for the Kindle as well, that takes a  little time.  As soon as I know that it&#8217;s been posted for the Kindle  (usually happens a little after Amazon gets the physical books) I&#8217;ll  post another announcement here.</p>
<p>P.P.S. If you visit my <a href="http://www.securingsqlserver.com/">SecuringSQLServer.com</a> site I&#8217;ve updated everything there for the new edition.  You can always find the old edition listed on the <a title="Other Books" href="http://securingsqlserver.com/other-books">Other Books</a> page on that site or on the <a href="http://mrdenny.com/books">Books </a>page on <a href="http://www.mrdenny.com/">mrdenny.com</a>.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/securing-sql-server-2nd-edition-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mirroring isn&#8217;t a backup solution</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/mirroring-isnt-a-backup-solution/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/mirroring-isnt-a-backup-solution/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 20:46:55 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Backup & recovery]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[JournalSpace.com]]></category>
		<category><![CDATA[SecurityFightClub]]></category>
		<category><![CDATA[SQL Injection]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=299</guid>
		<description><![CDATA[In case you live under a rock and haven&#8217;t heard about Journalspace.com&#8216;s little mistake, they have gone out of business due to a database problem.  Here&#8217;s a screenshot in case the site is down when you look at it. In a nutshell it appears that they were relying on a RAID1 array as the database [...]]]></description>
				<content:encoded><![CDATA[<p>In case you live under a rock and haven&#8217;t heard about <a href="http://www.journalpace.com" target="_blank">Journalspace.com</a>&#8216;s little mistake, they have gone out of business due to a database problem.  Here&#8217;s a <a href="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/20/files/2009/01/journalspace.jpg" target="_blank">screenshot</a> in case the site is down when you look at it.</p>
<p>In a nutshell it appears that they were relying on a RAID1 array as the database backup.  While we see this all the time in small database shops as noted on <a title="/." href="http://hardware.slashdot.org/article.pl?sid=09/01/02/1546214" target="_self">/.</a> this site has been up since 2002 and had an <a href="http://www.alexa.com/data/details/main/journalspace.com" target="_blank">Alexa page rank</a> of 106,881 with<a href="http://www.quantcast.com/journalspace.com" target="_blank"> 14k monthly visitors</a> (according to Quantcast).  For a site so large to be making such a simple mistake is just unacceptable.<span id="more-299"></span></p>
<p>I can guarantee you that if I see a DBA resume listing journalspace.com as a prevous place on employment I&#8217;ll have to think more than twice about bringing them in.</p>
<p>As it says on the website the business is closed, they are going to be selling the domain name and any trademarks off to the highest bidder.</p>
<p>As DBAs we need to remember that the companies that we work for (or consult for) live and die by our mistakes.  If for example I were to do this same thing and we were to suffor the same fate at Awareness Technologies (my employer) I would be responsible for about 80 people being out of work.</p>
<p>This reminds me of a similar situation that happened when I worked for GameSpy.com.  The development team insisted on having full rights to all the production databases so that they could troubleshoot issues without having to wait for me to give them rights.</p>
<p>We were in the middle of deploying our new backup solution because the file server that we used to backup to couldn&#8217;t hold all the database backups any more.  Everyone had been informed that some databases weren&#8217;t being backed up while we got the new system up and running and that extreme care needed to be taken while working in the databases.</p>
<p>A few days later a developer comes to me asking me to restore the database with all the news articles in it back into production.  I inform him that we don&#8217;t have a backup of that database as it is one of the ones that we weren&#8217;t backing up while going through the transition.  I then ask why he needed it restored.</p>
<p>Apparently he thought that he was connected to the development database and truncated the table with all the articles that the site authors had written for the last several years.  Needless to day, the developers lost their access to the production databases that day.  It took the editors two or three days to get the current stories back into the system from the Microsoft Word copies that they used to do the initial story writting.</p>
<p>Fortunately in my story we were able to recover from the problem without much loss in revenue.  The folks at journalspace.com were not so lucky.  Not only will what ever employees they had be out of work, but all the work of the countless bloggers who blogged on that site have lost everything they wrote, some of them I&#8217;m sure for years.</p>
<p>This also points out the massive amount of trust that we as bloggers must have in the companies which host our blogs on our behalf.  We can only hope that they backup the databases which hold our blogs regularly so that none of what we write is lost.</p>
<p>I won&#8217;t begin to speculate what happened to the database over at journalspace.com, they do a pretty good job of that within the message saying that the site is gone.  What I will do is say that I agree, there was most probably a human element involved which brings up database security and SQL Injection protection.  If there was a human involved (again there probably was) I would assume that additional database security and protection against SQL Injection attacks would have prevented this from happening; although I guess if you aren&#8217;t going to backup the database having everyone with right access to the database isn&#8217;t that much of a leap.  I would be curious to go through the web server logs from the time of the data loss to see if it was an injection attack or an employee logging into the database directly.</p>
<p>A few hours (or possibly minutes) worth of changes to the database configuration could have kept this very popular site up for many more years to come.  It is a shame that they won&#8217;t be with us any more, they will be missed around the intertubes.</p>
<p>This was also talked about by <a href="http://www.brentozar.com/archive/2009/01/why-back-up-ask-journalspace/" target="_blank">Brent Ozar</a> umong others.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/mirroring-isnt-a-backup-solution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>T/SQL Code to remove SQL Injection Values from your tables</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/tsql-code-to-remove-sql-injection-values-from-your-tables/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/tsql-code-to-remove-sql-injection-values-from-your-tables/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 11:00:56 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[T/SQL]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/tsql-code-to-remove-sql-injection-values-from-your-tables/</guid>
		<description><![CDATA[With SQL Injection Attacks being all the rage these days, I&#8217;ve been asked a couple of times for T/SQL code to clean up the database. So I threw this code together to clean up the data. This code will clean all the character and uni-code columns in all the user defined tables in the system. [...]]]></description>
				<content:encoded><![CDATA[<p>With SQL Injection Attacks being all the rage these days, I&#8217;ve been asked a couple of times for T/SQL code to clean up the database.</p>
<p>So I threw this code together to clean up the data.  This code will clean all the character and uni-code columns in all the user defined tables in the system.  You&#8217;ll need to be dbo or sysadmin to run this without error.  If you have TEXT or NTEXT columns it will through an error for those columns.  Cleaning TEXT and NTEXT columns is a little more complex as you can&#8217;t use the REPLACE function on a TEXT or NTEXT datatype.</p>
<p><code></code></p>
<pre>

DECLARE @sql NVARCHAR(4000)
DECLARE @InsertedValue NVARCHAR(1000)
SET @InsertedValue = 'The Script tags which were inserted'
DECLARE cur CURSOR FOR
  	select 'update [' + sysusers.name + '].[' + sysobjects.name + ']
  		set [' + syscolumns.name + '] = replace([' + syscolumns.name + '], ''' + @InsertedValue + ''', '''')'
  	from syscolumns
  	join sysobjects on syscolumns.id = sysobjects.id
  		and sysobjects.xtype = 'U'
  	join sysusers on sysobjects.uid = sysusers.uid
  	where syscolumns.xtype in (35, 98, 99, 167, 175, 231, 239, 241, 231)
  OPEN cur
  FETCH NEXT FROM cur INTO @sql
  WHILE @@FETCH_STATUS = 0
  BEGIN
  	exec (@sql)
  	FETCH NEXT FROM cur INTO @sql
  END
  CLOSE cur
  DEALLOCATE cur</pre>
<p>Hopefully you find this useful.  If you need code for TEXT or NTEXT columns just post a comment and I&#8217;ll throw something together.</p>
<p>This code will work on SQL 2000 and up (it&#8217;ll probably work on SQL 7 as well, but I don&#8217;t have a SQL 7 machine to test against).</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/tsql-code-to-remove-sql-injection-values-from-your-tables/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New Article: Secure SQL Server from SQL injection attacks</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/new-article-secure-sql-server-from-sql-injection-attacks/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/new-article-secure-sql-server-from-sql-injection-attacks/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 11:00:34 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Attack Prevention]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL Injection]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/new-article-secure-sql-server-from-sql-injection-attacks/</guid>
		<description><![CDATA[An article that I wrote about securing your SQL Server from SQL Injection attacks was just published.  It covers information from both a DBAs point of view and a .NET developers point of view. Denny]]></description>
				<content:encoded><![CDATA[<p>An article that I wrote about securing your <a target="_blank" href="http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1318837,00.html" title="Article">SQL Server from SQL Injection attacks</a> was just published.  It covers information from both a DBAs point of view and a .NET developers point of view.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/new-article-secure-sql-server-from-sql-injection-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
