<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/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/"><channel><title>Buck Woody : Security, Best Practices</title><link>http://sqlblog.com/blogs/buck_woody/archive/tags/Security/Best+Practices/default.aspx</link><description>Tags: Security, Best Practices</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>The Importance of Paranoia for the Technical Professional</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/08/08/the-importance-of-paranoia-for-the-technical-professional.aspx</link><pubDate>Wed, 08 Aug 2012 12:19:11 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44620</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/44620.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=44620</wfw:commentRss><description>&lt;p&gt;I recently read a blog post from a technical professional who&amp;rsquo;s account had been hacked (&lt;a href="http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/all/"&gt;http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/all/&lt;/a&gt;)&amp;nbsp;&amp;nbsp;&amp;ndash; not because he used poor passwords or unsafe practices, but because the hackers used some social engineering to get around the safety he had put into place.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;While I won&amp;rsquo;t focus on the particulars of his situation, the interesting part of his loss was the fragility of the security of his data. In this case, he lost personal data &amp;ndash; with no way to replace it. Two things stood out for me in his article: the chain of security through his accounts, and the single-source of data he had.&lt;/p&gt;
&lt;p&gt;In this case, someone contacted the vendor and pretended to be this person. Using easily obtained information, they simply gained access to the account, and didn&amp;rsquo;t even have to hack the password. From there, the chain was that using various convenience-features, the hackers could delete the smartphone, and then on to the laptop the person owned. They completely wiped that out, and this is where there is an issue &amp;ndash; he had his data on that laptop, and on the same vendor&amp;rsquo;s cloud backup. Since the hacker *&lt;b&gt;was&lt;/b&gt;* the account owner by that time, they wiped out both. The person&amp;rsquo;s personal pictures, etc were gone forever. From there the hackers impersonated the person on Twitter and made racist and other statements to embarrass the person.&lt;/p&gt;
&lt;p&gt;Although lots of features are available in all vendor products, I&amp;rsquo;ve always been&amp;hellip;.paranoid about using them. I try to follow the &amp;ldquo;moats and bridges&amp;rdquo; approach to security, meaning that one account or feature doesn&amp;rsquo;t lead to another. I don&amp;rsquo;t link things together that can be used to attach to more than one account, even when it's a cool new feature. One public logon from an airport&amp;rsquo;s &amp;ldquo;free&amp;rdquo; wifi (which I never use, by the way) can lead to these attacks &amp;ndash; even if you don&amp;rsquo;t think you&amp;rsquo;re logging on. Ever check your mail from the airport? Do you have more than one mail account in your mail client? You could be hacked. I realize most client software does a good job of trying to prevent this, but I use my own MiFi device which I have set to the highest encryption I can.&lt;/p&gt;
&lt;p&gt;I also keep lots of data in the cloud &amp;ndash; but that&amp;rsquo;s not the only place. Periodically I have my important data backed up to a local drive,which I rotate to another secure location. After all, I&amp;rsquo;ve moved most of my books, pictures, scans, everything to a digital format. There&amp;rsquo;s no way I&amp;rsquo;m keeping that in just one place, or on just one vendor.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are other things you can do to protect yourself &amp;ndash; a great list is here: &lt;a href="http://gizmodo.com/5932663/9-things-you-absolutely-must-do-to-keep-your-online-identity-secure"&gt;http://gizmodo.com/5932663/9-things-you-absolutely-must-do-to-keep-your-online-identity-secure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When I help clients design solutions on Windows Azure,&amp;nbsp;I recommend another copy of the storage wherever possible &amp;ndash; even on other vendor's cloud storage or locally on a drive, or both. I&amp;rsquo;m paranoid that way &amp;ndash; I don&amp;rsquo;t want them to lose data. We take extraordinary precautions against losing data. Azure data has three copies on separate fault domains, and then those three are copied again to another physical datacenter automatically, that&amp;rsquo;s just built into the system. Even so, I&amp;nbsp; recommend periodic backups to other&lt;br /&gt;locations of data the client can&amp;rsquo;t easily re-generate.&lt;/p&gt;
&lt;p&gt;While we provide lots of tools, information and guidance about security and protection in Windows Azure, ultimately it's up to you to properly secure your assets and plan for disaster recovery. That's true of any cloud provider - you need to learn the platform well to understand how to protect your data.&lt;/p&gt;
&lt;p&gt;What I architect in Windows Azure I practice at home. Read that blog post, and I think you will agree it&amp;rsquo;s good to be a little paranoid. Sometimes they really are out to get you.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=44620" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category></item><item><title>Should All Data Be Encrypted By Default?</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/08/09/should-all-data-be-encrypted-by-default.aspx</link><pubDate>Tue, 09 Aug 2011 13:45:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:37638</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/37638.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=37638</wfw:commentRss><description>&lt;p&gt;Recently several IT industry information outlets have reported that there has been a 10-year concentrated, organized effort on breaking through computer security at some of the largest companies in the world. Government sites have also been attacked in multiple countries. Add to this the regular loss of data by banking and other industries, and the fear of “the cloud” as a storage location, and it seems to beg the question asked in the title in this post: “should all data, everywhere, be encrypted by default?” &lt;/p&gt;  &lt;p&gt;If you’re new to encryption, there’s an excellent video and overview here: &lt;a href="http://blogs.msdn.com/b/plankytronixx/archive/2010/10/23/crypto-primer-understanding-encryption-public-private-key-signatures-and-certificates.aspx"&gt;http://blogs.msdn.com/b/plankytronixx/archive/2010/10/23/crypto-primer-understanding-encryption-public-private-key-signatures-and-certificates.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If all data were encrypted, the break-in to websites would still continue, but the value would be lessened for some types of “orthogonal” attacks that only seek the pure stream of data. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Data States&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Computing has two major components - static program elements and data. The program doesn’t change (until it is updated, of course) over the course of a transaction between a user and the ultimate data store. Data is classified as anything that is manipulated by the program. That implies three states of the data interchange: Creation, Transmission, and Storage. In on-premise systems, many times none of these states are encrypted. The entire system from user to data store is viewed as “secure”, which of course evidence has proved it is not. In some cases, even laptops are viewed as part of an on-premise system, and so is left unprotected. If all data were treated as “publicly viewable”, that mindset would lead to encrypting the data at all states, even for on-premise systems.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Creation&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In this phase, a user, device or other input program creates data to send to the program. This can be entries on a web form, input from a weather sensor, or one service (program) sending information to another service. There are multiple ways to encrypt data at this state, most notably using client-side libraries such as the Windows Crypto API, hardware encryption and others. The reference for the Crypto API is here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms867086.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms867086.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Transmission&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;After the data is created, it needs to be transmitted to the processing and storage system. the references above explain how to secure the communications channel between the client systems and the various components used within the system. In the case of Windows Azure, the session can be protected with a secure session, and all communications within the Azure datacenters are encrypted. The key is that the transmission of data, regardless of method, should be considered to be “in the clear”, and treated as such. Without the decryption algorithm, it’s much harder to get to the ultimate goal. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Storage (data at rest) &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;It follows that f the data is encrypted at the source, and the decryption method is retained only with the code that processes the data, then the data “at rest” if obtained is less accessible. If the data is not encrypted at the source, then this step should be put into place at a minimum. In many cloud systems, including Windows and SQL Azure, the data is not encrypted at rest. There are various reasons for this, including performance, physical and logical security already in place, and the fact that the encryption process would expose customer data to the provider while it is being encrypted. In this case, the key is to encrypt the data before it is transmitted and stored, so that it is encrypted ahead of time. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Considerations&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Encrypting data is a separate process, and must be factored into the original codebase. This means additional effort, and more CPU power for the encryption process (although many systems have security hardware included which help with this) and of course protecting the keys. If the keys are accessed, the data is considered unencrypted from then on, and all previous encryption with that particular key is now vulnerable. Key rotation and protection is essential. Even so, the benefits of treating all data as being at risk outweighs the efforts.&lt;/p&gt;  &lt;p&gt;You can learn more about general encryption here: &lt;a href="http://msdn.microsoft.com/en-us/library/aa380255(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa380255(VS.85).aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=37638" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Data/default.aspx">Data</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Encryption/default.aspx">Encryption</category></item><item><title>More than one way to skin an Audit</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/05/20/more-than-one-way-to-skin-an-audit.aspx</link><pubDate>Thu, 20 May 2010 13:40:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:25343</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/25343.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=25343</wfw:commentRss><description>&lt;P&gt;I get asked quite a bit about auditing in SQL Server. By "audit", people mean everything from tracking logins to finding out exactly who ran a particular SELECT statement. &lt;/P&gt;
&lt;P&gt;In the really early versions of SQL Server, we didn't have a great story for very granular audits, so lots of workarounds were suggested. As time progressed, more and more audit capabilities were added to the product, and in typical database platform fashion, as we added a feature we didn't often take&amp;nbsp;the others away. So now, instead of not having an option to audit actions by users, you might face the opposite problem - too many&amp;nbsp;ways to audit! You can read more about the options you have for tracking users here: &lt;A href="http://msdn.microsoft.com/en-us/library/cc280526(v=SQL.100).aspx"&gt;http://msdn.microsoft.com/en-us/library/cc280526(v=SQL.100).aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SQL Server 2008,&amp;nbsp;we introduced SQL Server Audit, which uses Extended Events to really get a simple way to&amp;nbsp;implement high-level or granular auditing.&amp;nbsp;You can read more about that here: &lt;A href="http://msdn.microsoft.com/en-us/library/dd392015.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd392015.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As with any feature, you should understand what your needs are first. Auditing isn't "free" in the performance sense, so you need to make sure you're only auditing what you need to.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=25343" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category></item><item><title>Backup those keys, citizen</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/04/20/backup-those-keys-citizen.aspx</link><pubDate>Tue, 20 Apr 2010 12:14:50 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24408</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24408.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24408</wfw:commentRss><description>&lt;p&gt;Periodically I back up the keys within my servers and databases, and when I do, I blog a reminder here. This should be part of your standard backup rotation – the keys should be backed up often enough to have at hand and again when they change.&lt;/p&gt;  &lt;p&gt;The first key you need to back up is the Service Master Key, which each Instance already has built-in. You do that with the &lt;a href="http://msdn.microsoft.com/en-us/library/ms190337.aspx" target="_blank"&gt;BACKUP SERVICE MASTER KEY command, which you can read more about here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The second set of keys are the Database Master Keys, stored per database, if you’ve created one. You can back those up with the &lt;a href="http://technet.microsoft.com/en-us/library/ms174387.aspx" target="_blank"&gt;BACKUP MASTER KEY command, which you can read more about here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Finally, you can use the keys to create certificates and other keys – those should also be backed up. &lt;a href="http://msdn.microsoft.com/en-us/library/ms189586.aspx" target="_blank"&gt;Read more about those here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Anyway, the important part here is the backup. Make sure you keep those keys safe!&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24408" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance+Plans/default.aspx">Maintenance Plans</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance/default.aspx">Maintenance</category></item><item><title>Have you backed up your keys lately?</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/01/have-you-backed-up-your-keys-lately.aspx</link><pubDate>Mon, 01 Mar 2010 14:06:04 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22679</guid><dc:creator>BuckWoody</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/22679.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=22679</wfw:commentRss><description>&lt;p&gt;Did you know that you already have a Server Master Key (SMK) generated for your system? That’s right – while a Database Master Key (DMK) is generated when you encrypt a certificate or Asymmetric Key with code, the Server Master Key is generated automatically when you start the Instance. &lt;/p&gt;  &lt;p&gt;So you should back all of those keys up periodically, and then store that backup AWAY from the server itself. &lt;/p&gt;  &lt;p&gt;There are two reasons for this – first, if the drives get stolen and you’re storing the key backup there, well, that should be obvious why that’s bad. Second, you want to protect the keys in case the system is destroyed or you can’t recover the drives. You will need those keys if you have encrypted anything in the database to get the data back.&lt;/p&gt;  &lt;p&gt;More here: &lt;a href="http://technet.microsoft.com/en-us/library/bb964742.aspx"&gt;http://technet.microsoft.com/en-us/library/bb964742.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;No, the standard Maintenance Wizards don’t get this data. And no, I haven’t seen it addressed in most of the maintenance scripts out there anyway – sometimes for good reason, but this means you need to take care of it manually, and then document where you put that backup.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=22679" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance+Plans/default.aspx">Maintenance Plans</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance/default.aspx">Maintenance</category></item><item><title>SQL Server Best Practices: Use Roles When You Can</title><link>http://sqlblog.com/blogs/buck_woody/archive/2009/12/07/sql-server-best-practices-use-roles-when-you-can.aspx</link><pubDate>Mon, 07 Dec 2009 14:49:46 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19566</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/19566.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=19566</wfw:commentRss><description>&lt;p&gt;SQL Server has two major security vectors: “Principals”, which are primarily users and roles (groups), and “Securables”, which are primarily objects on the server or in the database, like tables or views. Many applications use Logins for their users, and then tie those Instance Logins to Database Users. The Database Users are then given rights and permissions to database objects like tables or stored procedures.&lt;/p&gt;  &lt;p&gt;If you can, it’s a good idea to apply permissions not to the individual users, but to database roles. The reason is that you can move users in and out of the roles without changing the permission scheme. &lt;/p&gt;  &lt;p&gt;It also helps if you want to transfer the database to another server. All you have to do is script out the groups and permissions, and when you transfer the database to another system you simply add the users on that system to the proper roles – no permission changes needed.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=19566" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</category></item></channel></rss>