In today's day and age of data-driven applications and Microsoft operating systems, many of us have become dependent upon SQL Server's easy integration with IIS and Microsoft networks. Unfortunately, many security professionals host SQL Server installations on their network without a thorough understanding of databases or their specific security requirements.
I recently came across a SQL Server installation where no member of the security staff had a clue about how the database worked and simply viewed it as a black box that did it's own thing and was controlled by the DBAs. When I took a look at the server, it contained a number of serious security vulnerabilities that threatened the integrity of the entire network. The DBAs admitted that they knew about those flaws but "didn't have time" to take care of them.
While it's a good idea to understand how databases work and how they interact with your network, I'd like to offer you a few quick steps you can take to assess the security of your SQL Server installation. This tip focuses on user accounts/permissions while future tips will explore other areas of SQL Server security.
MORE INFORMATION ON SQL SERVER SECURITY:
Here are four actions you can take today to help ensure the security of your SQL Server:
- Limit the number of database administrators. This is a common-sense rule that's often violated. Make sure that only people who need administrative powers (and know how to use them!) have DBA access. SQL Server's tight integration with Windows makes it far too easy to simply grant database administration rights to all domain administrators. This can be a grave mistake.
- Apply the rule of least privilege. Ensure that folks with administrative access (and user-level access, for that matter) have the smallest subset of privileges necessary to carry out their job functions.
- Avoid hard-coded passwords like the plague. Database developers like to hard-code passwords in their programs because it's the easy way out. Don't let them do it! Use SQL Server's Integrated Authentication mode to tie into Windows security or force users to authenticate to the database itself. If you hear the statement, "We can't change the password or XYZ will break," consider it a big red flag waving in your face!
- Make use of roles. SQL Server offers a number of predefined user roles that grant specific administrative privileges. You may also create your own customized roles for your environment-specific needs. Assign permissions on your database to these roles, and then add and remove users/groups from these roles as their job responsibilities change. This makes for a much tidier security environment and allows you to keep tabs on access controls.
Remember, checklists are no substitute for a thorough understanding of the security ramifications of running SQL Server on your network. Use these guidelines as a jumpstart to database security, but put in the effort to learn the technology and act as a resource for database developers and administrators in your organization.
About the author
Mike Chapple, CISSP, currently serves as Chief Information Officer of the Brand Institute, a Miami-based marketing consultancy. He previously worked as an information security researcher for the U.S. National Security Agency. His publishing credits include the TICSA Training Guide from Que Publishing, the CISSP Study Guide from Sybex and the upcoming SANS GSEC Prep Guide from John Wiley. He's also the About.com Guide to Databases.