Using the approaches and principles discussed in the previous chapters of this guide,this chapter describes the tasks you must perform when planning to run services more securely. To secure services, you should carry out the following tasks:
On This PageAudit All Servers to Determine Essential Service PropertiesYou must determine exactly how many servers exist within your organization. Although this task sounds simple, a large organization can find it surprisingly complex to identify every server it possesses and to determine to what degree the services on each computer require management. For example, computers that run in the perimeter network require significantly higher levels of service management to reduce the attack surface of these computers. You should audit each server to list all the running services and record which logon credentials each service uses for authentication. You can use the following tools to help with this task:
Creating a master list of servers and their services helps to identify and remedy service-related security risks. You can use your audit to create inventories of all services that use:
Determine Which Services Actually Need to RunWhen you first install Windows Server 2003, the operating system creates several default services and configures them to run when the computer starts. The Microsoft Excel workbook "Windows Default Security and Services Configuration," included as part of the Threats and Countermeasures Guide, documents the default startup-type settings for all system services. These default services provide application or client compatibility, or facilitate systems management. However, you probably do not need all of these services in your organization's environment, and you should carefully evaluate which ones you require. Defining which services are required and which you should disable can be a complicated process. There are some services that you should obviously turn off, but the decisions to turn off other services are not so clear. The basic strategy that you should use is:
The services that you need to run on a computer depend largely on that computer's role. For example, you should only install Internet Information Services (IIS) on a Web server or a computer that requires IIS, such as an application server. If the server does not host remote access services or Telnet sessions, you should disable or remove these services. There are several situations in which software, such as systems management tools, add their own services to those that run on your computers. It is important you are aware of these services, the accounts they use to log on, and the level of access they require. Microsoft has published several guides on how to lock down computers based on their roles. These guides explain which services you need for specific roles such as domain controllers, Web servers, Windows XP clients, and so on, and they are available at the following locations:
In a test or pre-production environment, if you want to determine if you need a service, you can turn it off and then monitor the computer over time to see if anything fails to work. You should be aware, however, that there are a few core services that the Services console will not allow you to stop or even modify the startup type of, such as the Remote Procedure Call (RPC) service, and the Plug and Play service. There are also some services that the Services console will not allow you to stop, but will allow you to change the startup type of, such as the Event Log service and the Security Accounts Manager service. If you are not sure what a particular service does, use one or more of the following methods to get more information:
The Security Configuration Wizard provided with Windows Server 2003 with Service Pack 1 (SP1) can be a great help when you analyze which services you need to run. Reduce the Attack Surface with the Security Configuration WizardThe Security Configuration Wizard (SCW) allows you to quickly and easily configure servers running Microsoft Windows based on your functional requirements — Web server, domain controller, or other—while you author security policies to minimize attack vulnerability. To install SCW, open Control Panel, double-click Add or Remove Programs, click Add/Remove Windows Components, on the Windows Components page, under Components, select the Security Configuration Wizard check box and then click Next, and when the wizard completes, click Finish. This process adds a Security Configuration Wizard shortcut to your Administrative Tools folder. The Security Configuration Wizard can help you discover what services your organization's servers are currently running and their dependency on other services. It can also be a useful job aid when you try to determine what services are required when you deploy new servers. You can deploy SCW-generated policies using Group Policy, which allows you to deploy specific server roles to several similar computers at once within an organizational unit (OU) or OU hierarchy. The term server role defines the main functions that a computer performs in your organization. Examples of server roles include: file server, domain controller, and Web server roles. Because the required services, inbound ports, and settings vary for each role, the SCW policies you create should match the role that you want each computer to perform. You can use the SCW to help reduce the attack surface of computers that run Windows Server 2003 with SP1. The wizard guides you through the process of how to create a security policy based on the roles performed by a given server. After you create a policy, you can apply it to one or more similarly configured servers. The SCW consists of the following sections:
For the purposes of this guide, the Role-Based Service Configuration section of the wizard is the only relevant section. You use this part of the wizard to configure services based on the selected server's roles and other features. You base the security policy that you create on the roles installed on the selected server. The selected server can be the one to which you want to apply the policy, or you can use the selected server as a means of creating the policy, and then apply the policy to a group of servers that have similar roles. How the Security Configuration Wizard WorksThe SCW reduces the attack surface of servers that run Windows by asking the user a series of questions designed to determine the functional requirements of a server. It then disables the functionality that is not required by the roles performed by the server. In addition to being a fundamental security best practice, attack surface reduction increases the diversity of your Windows environment and reduces the number of computers that you must update immediately when vulnerabilities are exposed. The SCW answers the most commonly asked question about Windows Server 2003: Which services can you turn off? To date, this question has been difficult to answer because of the thousands of possible combinations of installed technologies, each with a hierarchy of dependencies that can exist on any Windows-based computer. When you add other servers, such as Microsoft Exchange Server or SQL Server™, the dependencies change yet again. The SCW addresses this problem and gives administrators a way to configure servers to run only those services required by the roles assigned to a server. The SCW achieves this by accessing an Extensible Markup Language (XML) database that contains the necessary data about Windows Server 2003 and the Microsoft products that run on Windows Server 2003. Benefits of the Security Configuration WizardWhen you use the SCW to choose functional roles, you automatically:
Limitations of the Security Configuration WizardAlthough the SCW does not lock down security settings such as LM authentication level and Server Message Block (SMB) signing, the Windows Server 2003 and Windows XP security guides listed earlier in this section discuss and provide recommendations for these settings. Identify and Eliminate All Domain Administrator Accounts for ServicesWith information from the server audit, you can identify and eliminate all possible domain administrator accounts used for services. To eliminate as many instances as possible of services that use domain administrator accounts provides a significant first step toward service security. Whenever possible, you should redeploy the services using the Local Service, Network Service, or Local System accounts, as described in the following section of this chapter. Organizations should try to eliminate service deployments that include:
Use a Least-Privilege Hierarchy for Service DeploymentYou should use the account that has the least privilege required to run a service. Services deployed using accounts that have higher privileges should be redeployed using accounts that have lesser privileges. A least-privilege hierarchy should use accounts in the following order:
The flowchart in the following figure shows the points to consider when you decide which account type to use to run your services securely. Create a High Security Servers Group for Domain Administrator ExceptionsIf you determine that a service must run with domain administrator-level authentication, you should only host that service on a high security server. High security servers typically include:
The major steps involved in creating a high security servers group are:
To manage the membership of the High Security Servers universal group successfully, establish an internal workflow process to request additions to the group. This process should include steps to validate the request and assess the associated security risks if you add the requested server to the group. The workflow process could be as simple as sending e-mail to a request alias, but ideally it should be an automated procedure. The Solution Accelerator for Business Desktop Deployment Enterprise Edition includes a Zero Touch Provisioning (ZTP) component, which provides an automated procedure for this process. For more information, see the following guides:
Manage Service Account Password ChangesWhen you assign an account to a service, the Service Control Manager (SCM) requires the correct password for that account before it makes the assignment. If you supply an incorrect password, the SCM rejects the account. If you configure a service account to use the Local System, Local Service, or Network Service account, you do not need to manage the service account's password because the operating system will manage it instead. Consequently, there is no password management required for these service accounts. For other service accounts, the SCM stores the account password in the services database. After it assigns the password, the SCM does not verify that the password stored in the services database and the password assigned to the user account in the Active Directory® directory service continue to match. Consequently, a situation similar to the following could occur:
If you run services under standard domain or local user accounts, you must update those service passwords each time the user account password changes. This can take a significant amount of time if you are not sure which services run under that account, or which computers have services that run under that account. You should securely document the use of these types of service accounts and their passwords. For a large organization, this might mean they need to take an encrypted data file offline and then store it in a secure vault, but for a smaller organization perhaps a document stored in a locked drawer or safe might be more appropriate. Important: If you use the Active Directory Users and Computers or the Local Users and Groups consoles to change a service account password for an application such as Exchange Server or SQL Server, you must also change the password within the application interface. Note: For more information about how to write a tool that automates the task of updating service account passwords, see Changing the Password on a Service's User Account at http://msdn2.microsoft.com/en-us/library/ms675577. Enforce Strong PasswordsYou should require that your organization's network administrators enforce the use of strong passwords. They should use password policies in Group Policy to alert users to change their passwords after a defined period. A strong password should be a minimum of 10 characters (ideally 15 or more) and should include a combination of upper and lower case letters, numbers, and symbols. In Windows 2000 Server and Windows Server 2003, you can use Group Policy to enforce the use of strong passwords. For more information, see Accounts Passwords and Policies at http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/bpactlck.mspx, and the Windows Server 2003 Security Guide at http://go.microsoft.com/fwlink/?linkid=14845. Automate Testing for Weak Administrator PasswordsYou should require that your organization's network administrators regularly use automated testing tools to detect servers deployed with weak passwords for their local administrator accounts. The test should try to guess the password for the built-in local administrator account that exists on every Windows-based computer. Weak passwords represent one of the most common vulnerabilities on a network, and are one of the easiest ways for an intruder to gain administrator access to the computer and compromise any stored service account credentials. Using the Microsoft Baseline Security AnalyzerYou can use the Microsoft Baseline Security Analyzer (MBSA) tool to scan every computer on the network and look for weak passwords. For more information about MBSA, and to download the tool, see the Microsoft Baseline Security Analyzer V1.2.1 site at http://www.microsoft.com/technet/security/tools/mbsahome.mspx. The MBSA tool enumerates all user accounts and checks for the following password vulnerabilities:
The MBSA check also notifies you of any disabled accounts or accounts that are currently locked out. MBSA will use each of the listed passwords to try to change the password on the target computer. If this operation succeeds, MBSA indicates the account that uses that password. Although MBSA does not reset or change the password permanently, it does report if the password is simple and represents a security risk. You should note that although MBSA can help find some instances of common poor passwords in use, it does not provide full-featured password auditing and recovery capabilities, such as are available with some third-party offline scanning tools and applications available on the market. Note: MBSA resets any account lockout policies detected on the computer so that no individual user accounts are locked out during this password check routine. MBSA does not perform these password checks on computers configured as domain controllers. | In This Article
|