 




<?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; Security</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/sql-server/tag/security/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>Two Factor Authentication Shouldn&#8217;t Depend on One Factor</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/two-factor-authentication-shouldnt-depend-on-one-factor/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/two-factor-authentication-shouldnt-depend-on-one-factor/#comments</comments>
		<pubDate>Sun, 05 May 2013 14:38:02 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Bank of America]]></category>
		<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Social Commentary]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Two Factor Authentication]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2666</guid>
		<description><![CDATA[Bank of America has decided to implement two factor authentication on their website when doing specific things like adding a remote account to transfer money to, or when doing a wire transfer (basically anything where money is going to leave the account). So far this sounds like an excellent plan. The second factor is that [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.bofa.com">Bank of America</a> has decided to implement two factor authentication on their website when doing specific things like adding a remote account to transfer money to, or when doing a wire transfer (basically anything where money is going to leave the account). So far this sounds like an excellent plan. The second factor is that when I want to send money to another account or send a wire transfer they&#8217;ll send me a text message and I then enter the one time use code they text me into the website.</p>
<p>All this sounds perfect (except for if I&#8217;m out of the country and I can&#8217;t get their text messages), except for one little issue.</p>
<p>Adding a new cell phone to send a text message to is as simple as just logging onto the bank&#8217;s webpage. Once I log into the site I can simply add another cell phone, verify that I have the cell phone via a text message and then I can use that cell phone to approve any wire transfers. All very convenient. The problem is that is someone else figures out my username and password for the website they to can add a cell phone to my bank account, approve it for use, then start sending wire transfers off all my money to their account.</p>
<p>So while <a href="http://www.bofa.com">Bank of America</a> has two factor authentication, the second factor is dependent on knowing the first factor. For this to be actually useful two factor authentication it would need to require that I go into a branch with my ID to prove that I&#8217;m me and that I can add the phone as a two factor authentication phone. Additionally they should be using as an option one of the phone application based two factor authentication processes so that if I have several phones I can just use the one application, or if I&#8217;m not in the country I can still manage my money (which has been a problem a couple of times).</p>
<p>While I applaud the effort that <a href="http://www.bofa.com">Bank of America</a> has put into having two factor authentication, doing it correctly would be a lot more useful.  As currently you have one factor authentication with an annoyance.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/two-factor-authentication-shouldnt-depend-on-one-factor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When Designing Logon Systems, Pay More Attention To Password Questions.</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/when-designing-logon-systems-pay-more-attention-to-password-questions/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/when-designing-logon-systems-pay-more-attention-to-password-questions/#comments</comments>
		<pubDate>Wed, 06 Feb 2013 14:00:29 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Data Loss]]></category>
		<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Database Design]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Identity theft]]></category>
		<category><![CDATA[Laws]]></category>
		<category><![CDATA[Lawyers]]></category>
		<category><![CDATA[Lesson Learned]]></category>
		<category><![CDATA[Mayhem]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Social Commentary]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2233</guid>
		<description><![CDATA[In recent months the Internet has started to wake up to security just a little bit more, and probably forgotten all about it as well (read this, this, this and this if you need a refresher). The big problem that I speak of is those annoying questions that we have to answer when setting up a [...]]]></description>
				<content:encoded><![CDATA[<p>In recent months the Internet has started to wake up to security just a little bit more, and probably forgotten all about it as well (read <a href="http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/">this</a>, <a href="http://asia.cnet.com/hacker-succeeds-forces-apple-and-amazon-to-change-security-policies-62218252.htm">this</a>, <a href="http://news.cnet.com/8301-1009_3-57488759-83/amazon-addresses-security-exploit-after-journalist-hack/">this</a> and <a href="http://news.cnet.com/8301-13579_3-57488782-37/apple-freezes-appleid-password-resets-requested-over-the-phone/">this</a> if you need a refresher). The big problem that I speak of is those annoying questions that we have to answer when setting up a password for a new high security system. Those questions are supposed to be things that only you know. Which was great 20 years ago when we first started building these systems. Today however for most of these systems I can find out all the answers to these questions between Facebook and Twitter.</p>
<p>Recently I was setting up access to just another high security system and I was presented with this list of questions (I had to select three) as my security questions so that I can get my account back if (when) I forget my password.</p>
<p><a href="http://itknowledgeexchange.techtarget.com/sql-server/when-designing-logon-systems-pay-more-attention-to-password-questions/questions/" rel="attachment wp-att-2234"><img class="alignnone size-full wp-image-2234" src="http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/20/files/2012/08/Questions.jpg" alt="" width="620" height="199" /></a></p>
<p>Lets review these questions for a minute.  Now some of these Facebook actually asks you to provide them so that they can put them on your profile (that annoying part at the top of your Facebook profile).   The rest you can probably figure out about most people just by looking at the information that they provide during the course of using social media in their daily lives and with the groups on Facebook that they belong to.  You add access to a public linked in profile and a little searching in public records and getting most if not all of these answers shouldn&#8217;t take you more than a couple of hours.</p>
<p>As the people that build these applications we need to take more notice of just how easy it is to figure out these questions.  The questions that we are putting into the applications shouldn&#8217;t be so annoying as &#8220;Favorite Teacher&#8217;s Last Name&#8221;, which I&#8217;ve actually seen but they need to be stuff that is at least a little harder to figure out if these are the things that we are going to use to ensure that people are who they say they are.</p>
<p>Things like drivers license number or state ID number (for those without a drivers license) are a good start.  They don&#8217;t change all that often (except when you move between states).  Social Security Numbers basically never change so those aren&#8217;t a bad number to use (granted there are other issues with using a persons tax ID here in the US).</p>
<p>When you are designing these sorts of authentication systems, don&#8217;t assume that just because your paranoid ass doesn&#8217;t upload your entire live to Facebook, LinkedIn and Twitter that no one else does that either.  People do, do that and they will continue to do that.  If you want to actually provide a level of security for your customers, which I sure hope that you do as that is kind of your job, then assume that the customers will be posting the easy to figure out questions online for all to see so you might want to use some slightly more complex questions.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/when-designing-logon-systems-pay-more-attention-to-password-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Database Chaining</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/cross-database-chaining/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/cross-database-chaining/#comments</comments>
		<pubDate>Wed, 26 Dec 2012 14:00:05 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Security]]></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=1091</guid>
		<description><![CDATA[Cross database chaining in SQL Server is actually a fairly old feature, first introduced in SQL Server 2000 SP3.  However this feature isn&#8217;t often understood mostly because it isn&#8217;t often used. Database chaining is when permissions cascade from one object to another because they are used by the parent object.  The perfect example is a [...]]]></description>
				<content:encoded><![CDATA[<p>Cross database chaining in SQL Server is actually a fairly old feature, first introduced in SQL Server 2000 SP3.  However this feature isn&#8217;t often understood mostly because it isn&#8217;t often used.</p>
<p>Database chaining is when permissions cascade from one object to another because they are used by the parent object.  The perfect example is a stored procedure which accesses a table.  The user only needs rights to the parent object (the stored procedure) and the rights to access the table exist automatically because the stored procedure accesses the child object (the table).</p>
<p>Cross database chaining uses this exact same concept except that the parent object is in one database and the child object is in another database.  In order to use cross database chaining the feature needs to be enabled on both databases.  This is done by using the ALTER DATABASE statement as shown below on both databases.</p>
<blockquote><p>ALTER DATABASE A_Database SET DB_CHAINING ON</p></blockquote>
<p>Once this is done, the login which is mapped to the user within the database which has the parent object needs to be mapped to a login within the database which has the child object.  The user within the database which owns the child object doesn&#8217;t need any specific rights other than to be a member of the public role.  Once this is done the cross database permission chain will be made and the stored procedure (or other parent object such as a trigger or function) will begin working.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/cross-database-chaining/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Saturday 194 (#sqlsat194) Here I Come</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/sql-saturday-194-sqlsat194-here-i-come/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/sql-saturday-194-sqlsat194-here-i-come/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 12:42:55 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Data Encryption]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL PASS]]></category>
		<category><![CDATA[SQL Saturday]]></category>
		<category><![CDATA[SQL Saturday 194]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2460</guid>
		<description><![CDATA[I&#8217;m so happy to be able to announce that I&#8217;ll be giving a precon at SQL Saturday 194 over in England on Friday March 8th, 2013.  This precon will be will be on SQL Server Security which is a topic which I&#8217;m quite familiar with. During this full day precon we will review a variety [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m so happy to be able to announce that I&#8217;ll be giving a <a href="http://sqlsouthwest.co.uk/sqlsaturday_precon.htm#pc3">precon</a> at <a href="http://www.sqlsaturday.com/194/eventhome.aspx">SQL Saturday 194</a> over in England on Friday March 8th, 2013.  This precon will be will be on SQL Server Security which is a topic which I&#8217;m quite familiar with.</p>
<blockquote><p>During this full day precon we will review a variety of ways to secure your SQL Server databases and data from attach.  In this session we will review proper network designs, recommended firewall configurations, and physical security options.  We will also review our data encryption options, password protection options, using contained databases, and AlwaysOn Availability Groups security.  There will also be discussions about additional measures which should be taken when working with Internet facing applications.</p>
<p>From there we will move to the most dangerous attack vector SQL Injection including all the ways that attackers can use SQL Injection to get into your system and how to protect against it.  The security options for database backups is the next topic on the list followed by proper SAN security designs.  We will then finish up by reviewing the auditing options which are available and how they can be used to monitor everything else which we&#8217;ve just talked about during the course of the day.</p></blockquote>
<p>If you are interested in attending the precon check out the <a href="http://sqlsouthwest.co.uk/sqlsaturday_precon.htm#pc3">precon page</a> on the <a href="http://sqlsouthwest.co.uk/">SQL South West</a> website which has the registration link.  I look forward to seeing you there.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/sql-saturday-194-sqlsat194-here-i-come/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Encrypting data in the same column</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/encrypting-data-in-the-same-column/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/encrypting-data-in-the-same-column/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 09:00:00 +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[Data Types]]></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[Identity theft]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server stored procedures]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[T/SQL]]></category>
		<category><![CDATA[Tables]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2175</guid>
		<description><![CDATA[I wrote a little while ago about the fact that sensitive data needs to be encrypted within the database for all applications.  This is the first technique that is available to you to encrypt data in a database with as little outage as possible. In this technique we’ll encrypt the data using just a single [...]]]></description>
				<content:encoded><![CDATA[<p>I wrote a little while ago about the fact that sensitive <a href="http://itknowledgeexchange.techtarget.com/sql-server/sensitive-data-must-be-encrypted/">data needs to be encrypted</a> within the database for all applications.  This is the first technique that is available to you to encrypt data in a database with as little outage as possible.</p>
<p>In this technique we’ll encrypt the data using just a single column.  This technique requires butting some additional logic within the application to figure out if the value is encrypted or not, but other than that logic, which you can leave in and strip out later the changes to the application are pretty minimal as the column stays the same, so that means that the stored procedures don’t need to be changed.</p>
<p>The first thing to remember is that the encrypted data will be larger, possibly much larger than the plain text version of the data.  Because of this you’ll need to increase the size of the field which you’ll be putting the data into.  Now the good news is that if this column isn’t indexed this change should be pretty quick and easy as it should just be a meta change which tells the SQL Server that the column size can be bigger without having to actually change the pages.  You can see this by making some changes to the [HumanResources].[Employee] table within the AdventureWorks database.  By turning on STATISTICS IO and using the ALTER TABLE statement we see that there is no IO generated when we change the size of the LoginID column from nvarchar(256) to nvarchar(512).</p>
<blockquote><p>set statistics io on<br />
alter table MyTable<br />
alter column LoginID nvarchar(512)</p></blockquote>
<p>Once the column is made larger the .NET code needs to be modified to see if the data is compressed for not.  Now there is no sure fire way to check to see if a value has been encrypted or not, but a pretty good test is to look at the last two characters of the value.  If they are both an equal sign (==) then it is probably safe to assume that the value is encrypted.  To don’t want to just attempt to decrypt the data and look for an error message, and if there is an error assume that the encrypted value is in plain text, throwing and catching error messages in .NET is very expensive, especially compared to simply checking to see if the last two characters are an equal sign.  This isn’t to say that you shouldn’t have TRY/CATCH logic around the code that decrypts the values as someone could easily enough put two equal signs at the end of their password.</p>
<p>At this point either a .NET app or a T-SQL script can loop through the values in the table which aren’t encrypted and then encrypt them, updating the rows which aren’t already encrypted.</p>
<p>Look for more blog posts in this series on how to encrypt data which already exists within your applications database.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/encrypting-data-in-the-same-column/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Second Edition of Securing SQL Server now longer available for pre-order. It&#8217;s Shipping! (repost)</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/second-edition-of-securing-sql-server-now-longer-available-for-pre-order-its-shipping-repost/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/second-edition-of-securing-sql-server-now-longer-available-for-pre-order-its-shipping-repost/#comments</comments>
		<pubDate>Thu, 09 Aug 2012 14:00:50 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[Availability Groups]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Data Loss]]></category>
		<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL]]></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>
		<category><![CDATA[Storage]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2236</guid>
		<description><![CDATA[In case you missed the blog post over on securingsqlserver.com, I wanted to repost it here&#8230; I&#8217;m afraid that I&#8217;ve got some bad news.  You can no longer pre-order Securing SQL Server 2nd Edition from Amazon. Instead you have to settle for ordering the book outright and having it shipped to you.  That&#8217;s right, no [...]]]></description>
				<content:encoded><![CDATA[<p>In case you missed the blog post over on <a href="http://www.securi">securingsqlserver.com</a>, I wanted to repost it here&#8230;</p>
<p>I&#8217;m afraid that I&#8217;ve got some bad news.  You can no longer pre-order <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471&amp;linkCode=as2&amp;tag=sesqse-20">Securing SQL Server 2nd Edition</a> from Amazon.</p>
<p>Instead you have to settle for <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471&amp;linkCode=as2&amp;tag=sesqse-20">ordering the book outright </a>and having it shipped to you.  That&#8217;s right, no more being a pre-order book, it&#8217;s published and available to be shipped directly to you.  Currently Amazon is selling the book at full price which is $49.95, but if you have Amazon Prime it is available for Amazon Prime shipping.  Because it is considered to be a text book you get a $5 Amazon MP3 Credit (what ever terms and conditions that Amazon chooses do apply).</p>
<p>This is a totally <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471&amp;linkCode=as2&amp;tag=sesqse-20">updated edition</a> of the book including all sorts of new information about security within SQL Server 2012.  I of course cover things like how to secure AlwaysOn Availability Groups, how to use user defined server roles, contained users, etc. I also dive into how to properly secure SQL Server Reporting Services and SQL Server Analysis Services so they can&#8217;t be used to access data that people shouldn&#8217;t have access to.</p>
<p>All in all this book is much larger with Amazon showing it at 408 pages compared to just 272 pages for the 1st edition.  If you find someone cheaper to purchase it make sure that you are in fact ordering the second edition.  The ISBN number is <a href="http://www.amazon.com/gp/product/1597499471/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1597499471&amp;linkCode=as2&amp;tag=sesqse-20">1597499471</a>.</p>
<p>I hope that you pick up a copy of the book and that it is useful for you in securing your SQL Server environment.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/second-edition-of-securing-sql-server-now-longer-available-for-pre-order-its-shipping-repost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sensitive Data Must Be Encrypted</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/sensitive-data-must-be-encrypted/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/sensitive-data-must-be-encrypted/#comments</comments>
		<pubDate>Thu, 02 Aug 2012 16:00:00 +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 Administration]]></category>
		<category><![CDATA[Database Design]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Hashing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2148</guid>
		<description><![CDATA[The title of this post pretty much says it all.  If you store sensitive data in a database you have to work under the assumption that someone is going to try and break into the system and steal that data.  Thinking otherwise simply isn’t responsible as the developer and/or administrator of the system.  By not [...]]]></description>
				<content:encoded><![CDATA[<p>The title of this post pretty much says it all.  If you store sensitive data in a database you have to work under the assumption that someone is going to try and break into the system and steal that data.  Thinking otherwise simply isn’t responsible as the developer and/or administrator of the system.  By not encrypting your sensitive data, such as users logins and passwords you could easily enough end up like <a href="https://d33ds.co/archive/yahoo-disclosure.txt">Yahoo! did on July 11, 2012</a> with the usernames and passwords of all of the customers of a service being posted on the Internet for all to see.</p>
<p>Not only was this breach a major embarrassment for Yahoo! but it is a potential nightmare for their customers.  If those customers (there were a few hundred thousand in the list) use the same email address and password on other websites they’ve now had the username and password for those other services leaked as well.</p>
<p>Now I know that best practice for Internet security says that every website should have a different password, but for the bulk of Internet users this simply isn’t going to happen.  Among IT professionals the percentage of people that actually use a different password for each website is probably pretty close to zero.  I know that I personally use dozens of different websites a month, and for most people that it probably pretty normal between banks, credit card companies, Facebook, Twitter, work sites, Gmail, etc. that quickly gets up to dozens or hundreds of passwords which need to be remembered.  There are plenty of password vault type applications, but general Internet users aren’t going to be using them.  As IT professionals we need to remember that we are dealing with the general public and the general public isn’t going to know that they need to do this, no matter how many times we talk about it within the IT field.</p>
<p>One reason that there is lots of unencrypted data out there is that converting older applications from using plain text data to encrypted data is pretty hard to do.  There are lots of places within the application which need to be touched and there are possibly lots of different applications which need to be updated all at once.  Then there is the possibility of needing to take an outage to do the actual data change.  When it comes down to is biting the bullet and taking the outage and making the change.  It is well worth it to take the outage and encrypt all the data now, rather than have to worry about a data breach later.</p>
<p>There are lots of techniques which you can use to do this data encryption, to many to list in a single blog post so look for blog posts from me later on how to handle this change.  There are also plenty of consultants, including <a href="http://www.mrdenny.com">myself</a>, who are happy to help with projects like this.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/sensitive-data-must-be-encrypted/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why is SQL Injection still a problem?</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/why-is-sql-injection-still-a-problem/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/why-is-sql-injection-still-a-problem/#comments</comments>
		<pubDate>Mon, 30 Jul 2012 16:00:00 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Data Loss]]></category>
		<category><![CDATA[Data Security]]></category>
		<category><![CDATA[Database Administration]]></category>
		<category><![CDATA[Database security]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2146</guid>
		<description><![CDATA[SQL Injection is probably the most popular attack vector for hackers when they attempt to break into databases.  The reason for this is that it is so easy for an attacker to gain access to the system, and typically to get pretty high level permissions to a database engine so that they can then export [...]]]></description>
				<content:encoded><![CDATA[<p>SQL Injection is probably the most popular attack vector for hackers when they attempt to break into databases.  The reason for this is that it is so easy for an attacker to gain access to the system, and typically to get pretty high level permissions to a database engine so that they can then export some of all of the data from the database engine.</p>
<p>The really sad thing about this is that it is very easy for software developers to protect against SQL Injection attacks.  The way that software developers protect the application from SQL Injection is by using parameterized queries instead of the older, and usually easier technique of simply building the database query using variables in the software code.</p>
<p>One of the reasons that I that I think that SQL Injection is just a big problem is thanks to the separation of duties that we have at most companies.  The reason that I say this is because the software developers that build the applications never have to deal with the cleanup from the SQL Injection attack.  Many developers, probably because they don’t work all that closely with database administrators, see SQL Injection as a SQL Server problem not an application problem.  This thinking would be wrong, as the only way to prevent SQL Injection problems is to protect the data at the application layer by using coding best practices like using parameterized queries like that shown below, taken from Chapter 8 of my book <a href="http://www.securingsqlserver.com">Securing SQL Server</a> (this sample is for VB.NET, the book includes examples in C# as well as VB.NET).</p>
<blockquote><p>Private Sub MySub()<br />
Dim Connection As SqlConnection<br />
Dim Results As DataSet<br />
Dim SQLda As SqlDataAdapter<br />
Dim SQLcmd As SqlCommand<br />
SQLcmd = New SqlCommand<br />
SQLcmd.CommandText = &#8220;sp_help_job&#8221;<br />
SQLcmd.CommandType = CommandType.StoredProcedure<br />
SQLcmd.Parameters.Add(&#8220;job_name&#8221;, SqlDbType.VarChar, 50)<br />
SQLcmd.Parameters.Item(&#8220;job_name&#8221;).Value = &#8220;test&#8221;<br />
Connection = New SqlConnection(&#8220;Data Source=localhost;Initial Catalog=msdb;Integrated Security=SSPI;&#8221;)<br />
Using Connection<br />
Connection.Open()<br />
SQLcmd.Connection = Connection<br />
SQLda = New SqlDataAdapter(SQLcmd)<br />
Results = New DataSet()<br />
SQLda.Fill(Results)<br />
End Using<br />
‘Do something with the results from the Results variable here.<br />
SQLcmd.Dispose()<br />
SQLda.Dispose()<br />
Results.Dispose()<br />
Connection.Close()<br />
Connection.Dispose()<br />
End Sub</p></blockquote>
<p>Now I freely admin that coding the .NET code this way is harder than using Dynamic SQL which is shown below.</p>
<blockquote><p>Private Sub MySub()<br />
Dim Connection As SqlConnection<br />
Dim Results As DataSet<br />
Dim SQLda As SqlDataAdapter<br />
Dim SQLcmd As SqlCommand<br />
SQLcmd = New SqlCommand<br />
SQLcmd.CommandText = &#8220;exec sp_help_job @job_name=&#8217;&#8221; + MyVBNetVariableWithTheJobName + &#8220;&#8216;&#8221;<br />
SQLcmd.CommandType = CommandType.Text;<br />
Connection = New SqlConnection(&#8220;Data Source=localhost;Initial Catalog=msdb;Integrated Security=SSPI;&#8221;)<br />
Using Connection<br />
Connection.Open()<br />
SQLcmd.Connection = Connection<br />
SQLda = New SqlDataAdapter(SQLcmd)<br />
Results = New DataSet()<br />
SQLda.Fill(Results)<br />
End Using<br />
‘Do something with the results from the Results variable here.<br />
SQLcmd.Dispose()<br />
SQLda.Dispose()<br />
Results.Dispose()<br />
Connection.Close()<br />
Connection.Dispose()<br />
End Sub</p></blockquote>
<p>The problem that I have with application developers taking the easy, shorter way out is that their job isn’t to take the easy way out.  Their job is to build the application securing and robustly, not in such a way that the application is as easy as possible to write.  This problem can probably be traced back to the specifications which were written for the application which probably don’t mention security at all anywhere in the specification from the business unit.  Because security isn’t a primary concern for the business unit it is left as an afterthought, an afterthought which is typically ignored until after there has been a breech.</p>
<p>Another reason that I think that SQL Injection is a problem is that we trust that our users wouldn’t want to do anything to hurt our applications or their data as they have a vested interest in keeping the system working correctly.  And this is true to some extent.  However when you publish an application on the public Internet not only will you customers be using it, but others will be attempting to hit the forms within the application.  Because of this, we can’t trust any input that the application user passes in.  Even if the value that is passed in is from a hidden field, or has been validated by the front end. If the value hasn’t been validated by the back end, and properly scrubbed then it shouldn’t be trusted.  And the only way to fully validate and scrub the value is to use the parameterized query technique which I showed above, no other technique no matter how clever will be as successful.</p>
<p>I’ve been working in the IT space for about 15 years now, and I’ve worked on dozens of application development projects over the years at companies large and small, and I can’t recall a single application design specification which included security of the data as a component of the application development.  As the production DBA for companies I’ve forced the issue when I would find problems early enough in the development cycle, but often I wouldn’t find out about the application that was being built until it was time to deploy the application to production.  At this point it is to late to make the kinds of major changes which need to be made, and because security doesn’t add value to the application or to the business unit security isn’t given the developer or QA resources which are needed to make the changes needed to properly secure the data from potential attackers.</p>
<p>I urge everyone that reads this, developers and administrators alike, to look at how applications within your environment connection to the database engine (it doesn’t matter what database engine you use, they can all be broken into via SQL Injection, and yes MySQL is included in this) and if dynamic SQL is being used, and isn’t being properly parameterized talk to upper management about this problem.  Explain to them that while this won’t be something which adds features to the application and won’t necessarily add value to the business, this is something which absolutely needs to be resolved.</p>
<p>Suffering from a SQL Injection breach will have a negative impact on the company, and the IT department in several ways.  From the company side of things customers will loose confidence in the company, which means that they will stop purchasing your product or using your service.  This means that the company will make less money.</p>
<p>Internally the business unit will loose faith in the IT staff as they can’t properly secure their applications from attackers.  The business unit will then loose faith in the developers as the IT staff explains that the only way to protect 100% against this sort of attack is to fix the application which means lots of time (possibly hundreds or thousands of man hours) just fixing database access code and not adding functionally into the application.  The business unit will then assume that the developers aren’t good developers and may request that new developers be brought in, that the application development be outsourced, or that a third party application be purchased.  All of which mean that you and/or your coworkers could easily be out on the street looking for more work.</p>
<p>If you are working on a new development project and security isn’t included in the specification push to have it added.  Yes it will slow the delivery of the application down, but it will remove the risk of a data breach, or worse than that a total network breach (where the attacker is able to get into the company network and take control of internal resources like domain controllers, file servers, etc.) which would be a major disaster  to any company no matter how large or small.</p>
<p>I hope that you take this to heart and fix any applications in your environment which have SQL Injection issues so that we can all stop reading about these data breaches which are coming all to often.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/why-is-sql-injection-still-a-problem/feed/</wfw:commentRss>
		<slash:comments>1</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>Stop Using SQL Logins</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/stop-using-sql-logins/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/stop-using-sql-logins/#comments</comments>
		<pubDate>Mon, 16 Jul 2012 14:00:03 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[Database security]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2030</guid>
		<description><![CDATA[Hey vendors, consultants, clients, etc. STOP USING SQL LOGINS.  Now if the SQL Server you are using isn&#8217;t attached to a Windows domain then fine, odds are you&#8217;ll need a SQL Authentication login.  However if the machine is a member of the Windows domain then login to SQL Server using Windows Authentication. The other day [...]]]></description>
				<content:encoded><![CDATA[<p>Hey vendors, consultants, clients, etc. STOP USING SQL LOGINS.  Now if the SQL Server you are using isn&#8217;t attached to a Windows domain then fine, odds are you&#8217;ll need a SQL Authentication login.  However if the machine is a member of the Windows domain then login to SQL Server using Windows Authentication.</p>
<p>The other day I was connecting to a clients SQL Server.  I had to log onto a different server to run SSMS, so far so good.  But then they gave me the connection information for the SQL Server which had a SQL Auth username and password.  I&#8217;ve already got a domain account, so for the love of god why did I have to have another stupid username and password instead of just connecting via the Windows Account I had JUST USED to log into Windows.</p>
<p>Vendor apps are just as bad.  They&#8217;ll insist that the Windows services run under a domain account, usually so that they can access network shares or something, but then they require a SQL Auth account to be created to log into the SQL Server database.  This means that someone needs to track another username and password, and given that SQL Auth accounts are easier to break into than Windows Auth accounts it&#8217;s less secure over all on top of that.</p>
<p>In 15+ years of managing SQL Servers for people I&#8217;ve found only a few software venders that were even willing to try running the software under a domain account so that we could use Windows auth to connect to the SQL Server.  And one of those was the one that I worked for, where I forced the developers to make that an option so that the DBA &amp; sysadmin would have the option to install the Software under domain accounts and use those domain accounts to connect to the SQL Server.  The developer didn&#8217;t understand why I cared about this but eventually I got my way, mostly I think so that I&#8217;d shut up about it.</p>
<p>In my mind there are only a few times when it is truly acceptable to use a SQL Authentication Login at this point.</p>
<ol>
<li>The clients are not running Windows.</li>
<li>The clients are not on the same domain, and the two domains aren&#8217;t trusted, and the user doesn&#8217;t have a Windows login in the same domain as the SQL Server.</li>
<li>The SQL Server is running version 4.2 or earlier.</li>
<li>The client application is a Windows service and it isn&#8217;t on the domain or the domains aren&#8217;t trusted.</li>
</ol>
<p>Now you&#8217;ll notice for #2 I was pretty specific.  That&#8217;s because if the client is running Windows and the user has a domain login in the same domain as the SQL Server then the client application can be run as the users account in the other domain (this includes SQL Server Management Studio).</p>
<p>In summary, in case you didn&#8217;t get my point yet, STOP USING SQL AUTHENTICATION LOGINS.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/stop-using-sql-logins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
