-
Book Overview & Buying
-
Table Of Contents
Windows Server Security Essentials
By :
According to its definition, baseline is something you can measure all the time and compare it to identify the difference between the current state and the starting point. In general, the business and technical requirements reflect the core of a baseline policy. It can also be a combination of your business requirements and industry-best practices. As a security administrator, your job is to translate these polices into a technical policy that you can apply in your IT environment.
Different companies and industries follow different standards and policies to secure their IT infrastructure. The following are some of the popular standards that are widely used in the industry:
The details of these agencies and their recommendations can be reviewed on their websites.
Out of the box, Windows Server 2012 and higher provides a few security tools that can be used as a starting point for your Windows Server security configuration. We will start this journey with a built-in security tool called Microsoft Security Configuration Wizard (SCW). This is a very powerful role-based tool that is included with Windows Server 2012 or higher. You can easily translate your business security policies into a technical policy using this tool. As a first step, you need to define your business security requirements or policies. Once you have that documented, you can use Microsoft SCW to create a policy template for different types of servers. In general, these business security requirements can be achieved by disabling unwanted services, blocking unused ports, modifying registry settings, and restricting network and server access. In other words, Microsoft SCW will help you to identify minimum functionality requirements for a server-based on an installed role or service on that particular server. Then this policy can be applied to a server or set of servers using Microsoft SCW, or any other mechanisms like Group Policy Objects (GPOs).
The following is a five-step process to get you to implement the policy in an efficient manner:
The Microsoft Security Configuration Wizard tool has four major sections: Role-Based Service Configuration, Network Security, Registry Settings, and Auditing Policy. Each of these sections has sub-categories to address specific service requests, based on the top level category. The following table provides a high-level explanation of the available options inside Microsoft SCW:
|
Role-Based Service Configuration | |
|---|---|
|
Server role |
This section provides an option to select or deselect appropriate roles based on your requirements. SCW will automatically detect installed roles on the server. All the dependent roles will also be selected automatically. |
|
Client features |
In this section, you can select client features that are specific for the role you have chosen in the previous step. |
|
Administration option |
Provides an option to select different administration tools and options. |
|
Additional services |
By default, SCW will select all required service-based roles, features, and administrative options. This section will give you an option to review these configurations and to make changes if needed. |
|
Handling unwanted services |
In this section, you will have an option to select unidentified services. SCW will not display services if they are not present in the local system. |
|
Network Security | |
|
Network security rules |
In this section, you can select firewall rules, traffic types, ports, and so on. |
|
Registry Settings | |
|
SMB security setting |
Provides an option to enable or disable SMB security signing. |
|
LDAP Signing requirement |
If the Domain Controller role is selected, you will see an option to configure LDAP signing. |
|
Outbound Authentication methods |
This section provides an option to configure remote computer authentication methods. You will have an option to select either domain account or local account. |
|
Auditing Policy | |
|
System Audit Policy |
This section provides an option to enable or disable auditing on a selected server. |
Since creating a business security policy is beyond the scope of this book, my assumption would be that you have a business security policy already defined and in place. So we will be starting with the Translating your policy into a technical policy section.
In this stage, as a security administrator, your job is to convert the existing business security policy into a technical policy. Since we are planning to use Microsoft SCW for this exercise, we can map our policy directly into an SCW policy.
I always use a worksheet to map these policies so as to make sure they align with existing options in the tool. The following is a sample worksheet. It helps an administrator identify the policies that are available in SCW and map them accordingly. On the left side of the worksheet, we have Business Security Policy. They directly come from the business or service owners. On the center of the worksheet, we have Technical Policy; in this case, I have included all available SCW roles and services in this section. The right column, Comments, is for mentioning any additional steps or comments required to complete the task.
As an example, you can see a sample internal portal server policy in the following worksheet where I have mapped a Business Security Policy to a Technical Policy:
|
Business Security Policy |
Technical Policy |
Comments | |
|---|---|---|---|
|
Role-Based Service Configuration (SCW) | |||
|
It must be a dedicated server for the proposed application. All other non-dependent services must be disabled. |
Server role |
Review #4 and #5 as well. | |
|
Required client features must be running on the server to support the application. |
Client features | ||
|
Administrators must be able to remotely administer the server, IIS task scheduler, WMI, and log files. |
Administration option | ||
|
Custom monitoring service (InfraMon) must be enabled and running on all servers. |
Additional services | ||
|
All unwanted and non-dependent services must be disabled. |
Handling unwanted services | ||
|
Network Security (SCW) | |||
|
Only HTTP port 80 and 443 allowed to this server. All other non-dependent ports and services must be disabled. |
Network security rules | ||
|
Registry Settings (SCW) | |||
|
Client computers must be running Windows 7 or higher to access this application. |
SMB security setting | ||
|
LDAP Signing requirement | |||
|
Only domain users can access this application. |
Outbound Authentication methods | ||
|
Auditing Policy (SCW) | |||
|
Successful and failed login attempts must be audited and saved. |
System Audit Policy | ||
|
Testing (SCW) | |||
|
Solution must be tested and evaluated in the lab before implementing in production. |
Test the security policy in the lab using SCW. | ||
|
Implementation (GPO) | |||
|
Solution must be deployed using an automated mechanism. It must be transparent to the application developers and owners. |
Export security policy and GPO and implement it in the correct OU. | ||
|
Rollback Plan (GPO) | |||
|
Must be able to roll back to previous state if/as needed. |
Use GPO. | ||
In the preceding exercise, we had a perfect one-to-one matching between Security Business Policy and SCW options, but in the real world, it may be different. So you may need to modify the policy worksheet based on your requirements. If the options are not available in SCW, you may need to configure it manually using GPO or other mechanisms.
In order to generate a policy template, you must be a local administrator on the server. SCW can be run from a local server or from a remote server. If you are running SCW from a remote server, you need to make sure that the required ports and firewall rules are enabled on this remote server. By default, SCW tries to establish an admin$ share connection to the remote server. Perform the following steps:
Server Manager in the Windows Start screen.
Selecting the Security Configuration Wizard option


If the required roles are not installed on the server, you can add these roles from Server Manager by selecting the Add roles and features option. All required roles must be installed prior to creating a baseline policy.












By default, all the polices will be saved in the %Systemroot%\Security\MSSCW\Policies folder.
At this point, you have created a baseline security template based on your business security requirement. As always, it is a best practice to evaluate these configurations in an isolated lab environment before it is implemented in the production environment.
Microsoft SCW creates an XML file as an output policy file, which can be reviewed by using any XML reader. Microsoft has provided a command-line supplement SCW tool called SCWCMD to accomplish this. SCWCMD is a powerful tool that can support the following actions:
We will be using the SCWCMD tool with view option for our policy review and validation process:
SCWCMD view /x:WebServerBaseLineV1.0.xml

Once you have verified the settings, you can apply it to one server to evaluate the result. We will be using Security Configuration Wizard (SCW) to achieve this:

At this point, as an administrator, your job is to validate and verify the result. Once you are satisfied with the result, you can move to the production implementation.
Applying a policy using Microsoft SCW is suitable for a small environment or testing purposes. However, in an enterprise environment, it may not be sufficient. Some type of automated mechanism should be in place. Since Microsoft Group Policy Object (GPO) is a commonly used tool in any environment, we can use GPO to deploy these security configurations into the designated servers. Since Microsoft SCW and Microsoft GPO are not directly connected, the first step in the process is to export output of the SCW XML file into the GPO format, and then import this into Active Directory.
In our scenario, we will be using the SCWCMD Transform command with the syntax scwcmd transform /p:<SCWPolicy.xml> /g:<GPOName>:
scwcmd transform /p:WebServerBaseLineV1.0.XML /g:WebServerBaselineV1.0 and press Enter.
Group Policy Manager on the start screen.
Keep in mind that the SCWCMD Trasnform command will only export the polices into Active Directory. You need to manually link these GPO, using Group Policy Administration console.

The GPO will get updated on to these computers during the default GPO interval. However, you can force the update manually by using the GPUpdate/Force command, or by selecting the Group Policy Update option from the GPMC console.
The SCWCMD tool provides an option to troubleshoot the computers so as to ensure that these computers are in compliance with your security policy. We will be using the SCWCMD Analyze option to analyze a computer's existing policy against an implemented policy. We can use this command against any computer regardless of whether you have used SCW or GPO to implement these policies. The result will be saved in an XML file in the working directory, unless you have specified a different path. These files can be viewed using the SCWCMD View option.
Here, I am running the SCWCMD Analyze command against a non-hardening server to demonstrate the result:
SCWCMD Analyze /m:Server02 /p:WebServerBaseLineV1.0.XML command.
Server02.XML.SCWCMD view command can be used to view this file. This command will open the result file in SCW Viewer.SCWCMD View /x:Server02.XML.
A backup or rollback plan is important for any business. Microsoft SCW provides an easy method to revert the changes to its previous state. During the policy implementation, SCW will create the rollback files on the local server with the current configuration. These are XML files and are located in %systemdir%\security\msscw\rollbackfiles folder.
Rollback files are located on the local server itself.
If the rollback files are not available in the default folder, you will receive the following error message during the server selection:

Once you perform the rollback operation, the XML files get deleted from the rollbackfiles folder. So, if you want to keep a record of these policies and settings, you will need to back up these files before performing the rollback operation.
Microsoft SCW can only roll back the changes that have been applied by the SCW tool. If you use any other mechanisms like GPO, SCW won't be able to revert these changes.
If you use GPO to implement the policy, you can move these servers to a different OU to avoid applying these policies. Keep in mind that some policies are tattooed into the system. In that case, you need to create another GPO to revert these changes.
The following instructions provide the details of a rollback method using SCW"



Change the font size
Change margin width
Change background colour