Security Best Practices Checklist
Updated : May 16, 2003
The following checklist summarizes the best practices discussed in this paper. For details, refer to the discussion above.
On This Page
Administrator Checklist
Developer Checklist
Software Vendor Checklist
Appendix: Finding More Information
Administrator Checklist
Setting Up the Environment Prior to Installation |
|
---|---|
Physical security |
|
Firewalls |
|
Isolation of services |
|
Service accounts |
|
File System |
|
Installation |
|
---|---|
Latest version and service pack |
|
Service accounts |
|
Authentication mode |
|
Strong passwords |
|
Configuration Options and Settings After Installation |
|
---|---|
Delete or secure old setup files |
|
Choose static ports for named instances |
|
Set login auditing level |
|
Enable security auditing |
|
Secure sa even in Windows Authentication Mode |
|
Remove sample databases |
|
Secure Operation |
|
---|---|
Security model |
|
Backup policy |
|
Surface and feature reduction |
|
Administrator reduction |
|
Strong passwords |
|
Cross database ownership chaining |
|
Xp_cmdshell |
|
Encryption |
|
Roles and groups |
|
Permissions |
|
Distributed queries |
|
Guest accounts |
|
Service accounts |
|
Recommended Periodic Administrative Procedures |
|
---|---|
Microsoft Baseline Security Analyzer |
|
Scanning logins |
|
Enumerate fixed role membership |
|
Start-up procedures |
|
Login-to-user mapping |
|
Direct catalog updates |
|
Cross database ownership chaining |
|
Best Practices for Patching Instances |
|
---|---|
Instance detection and enumeration |
|
Bulletins |
|
Patch application |
|
Developer Checklist
In addition to all of the items above, the following should be considered best practices for developers.
General |
|
---|---|
Use ownership chaining effectively |
|
Use roles to simplify permission management and ownership |
|
Turn on encryption (SSL or IPSEC) |
|
Do not propagate SQL Server errors back to user |
|
Prevent SQL injection |
|
Multi-tier Options |
|
---|---|
Same/trusted domain (complete Windows Authentication) |
If the application server and the database server are within the same domain, or within trusted domains, you should use Windows Authentication and configure for "full provisioning" in which all client contexts are tunneled to SQL Server. This makes it possible to audit all users who access SQL Server, enables Windows security policy enforcement, and makes it unnecessary to store credentials in the middle tier. In this scenario, the client connects to the application server, which in turn impersonates the client and connects to SQL Server.
|
Mixed scenario (partial Windows Authentication) |
When the Internet-facing tier does not have an individual Windows domain account for every possible user, the recommended scenario is to divide authentication into stages. The outer tier (which authenticates users) should use SSL to encrypt at least credentials, if not the entire session. It should connect to the database server using Windows Authentication, forwarding transaction information under a separate security context that is low privileged, with only the permissions necessary to perform its function. This effectively uses the middle tier as an additional layer of defense between your server and the Internet. Note: Using SQL Server Authentication between the middle tier and SQL Server is not recommended, because of the need to store credentials. If you must use SQL Server Authentication between the middle tier and SQL Server, you should create several accounts, with different levels of privileges corresponding to different classes of users. This requires that you add logic to the middle tier to allocate connections according to the desired privilege level. |
Different non-trusted domains or no domains (no Windows Authentication) |
When Windows Authentication between tiers is not possible, you should require SSL encryption of the login sequence. Encrypting the entire session is preferable.
|
Software Vendor Checklist
In addition to all of the items above, the following security development practices have proven useful in increasing the quality and security of code in various development environments.
Security Processes |
|
---|---|
Understanding various security issues |
|
MSDE installations |
If you distribute MSDE with your application, the following additional guidance applies:
|
Appendix: Finding More Information
Recommended Books:
Inside Microsoft® SQL Server™ 2000, by Kalen Delaney. Copyright 2000, Microsoft Press. ISBN: 0-7356-0998-5.
Writing Secure Code, Second Edition, by Michael Howard and David LeBlanc.
This book makes a useful training resource, reviewing the most common security flaws in designing/coding and testing components/applications. It contains security best practices and checklists. It also covers strategies in designing secure applications, writing robust code that can withstand repeated attacks, and testing applications for security flaws.
Hacking Exposed Windows 2000, by Joel Scambray and Stuart McClure.
This book adopts the approach of a hacker. It goes into details of how to break into Windows 2000 machines and thereby increases awareness of how to prevent such attacks. It also has an entire section dedicated to SQL Server and how it can be used to crack the system as a whole.
Designing Secure Web-Based Applications for Microsoft® Windows® 2000, by Michael Howard.
This book gives you a solid foundation in Microsoft Windows 2000, Internet Explorer, Internet Information Services, SQL Server, and COM+ security concepts. It explains the key software design considerations for various categories and levels of security and shows how isolated security "islands" interact. It also explains core security issues such as risk analysis, threats, authentication, authorization, and privacy, and it shows how you can mitigate risks by applying the appropriate security to your environment and applications. Managers, developers, and testers can all use the knowledge in this book to look at components from a security perspective, perform threat analysis and take appropriate responses by enhancing the security of code/design and enhancing test suites appropriately.
Building Secure Microsoft ASP.NET Applications, by J.D.Meier (among others).
This guide presents a practical, scenario-driven approach to designing and building secure ASP.NET applications for Windows 2000 and version 1.0 of the .NET Framework. It focuses on the key elements of authentication, authorization, and secure communication within and across the tiers of distributed .NET Web applications.
Firewalls and Internet Security, second edition, by William R. Cheswick, Steven M. Bellovin, and Aviel D. Rubin. Addison-Wesley, 2003.
This is the standard introduction to Internet security. Highly recommended.
Recommended Tools, Papers, and Presentations
The Microsoft Baseline Security Analyzer Tool. This tool helps analyze the security of the system. It is recommended that administrators run this tool on a periodic basis. This tool performs some SQL Server specific checks.
The SQL Server Critical Update Wizard.
Microsoft SQL Server and Security Sites
The area of the Microsoft Web site dedicated to security.
SQL Server product site with links to download locations for the latest service packs, latest bulletins, and other resources.
TechNet SQL Server Security Center with information regarding Troubleshoot and Maintain, Set Up, Configure, and Administer, Security Topics
White Papers
SQL Server Developer Center. Contains recent technical white papers and downloads.
SQL Server 2000 Security White Paper This white paper was written when SQL Server 2000 was first released, and forms the basis for parts of this paper.