Home > Articles > Microsoft

What You Need to Know About Deploying Security Templates in Order to Pass a Microsoft Exam

  • Print
  • + Share This
Security templates are used in Windows-based systems to apply security policy settings, user rights, registry keys, and more. As a result, they show up on many Microsoft certification exams, and it is important to know how and when to deploy them. In this article, David Leaver reviews security templates and some of the most important concepts to know when preparing for your next Microsoft certification exam.

In order to establish a secure baseline for your Windows computers and servers Microsoft encourages the use of their built-in security templates. The security templates are pre-configured depending on the level of security required for your system, but they can also be customized to fit any given security scenario. As the core of any Windows based systems security Microsoft will expect you to not only know the detailed settings of each security template for your networking examination track, but also the various ways that they can be customized, tested and deployed.

Security templates

I won’t go into the details of each individual security template specifically as they are very detailed and extensive in their settings. However, the built-in templates for Windows Server 2008 are listed below:

  • Setup security.inf—The baseline security for all workstations or member servers out of the box
  • DCsecurity.inf—The baseline security template for domain controllers out of the box
  • Securews.inf—Best described as the middle ground security template for workstations and member servers before moving up to hisec*.inf template
  • Securedc.inf—The same as the above only specifically for domain controllers
  • Hisecws.inf—The highest level security template available for workstations/member servers
  • Hisecdc.inf—The same as above, however only for domain controllers
  • Compatws.inf—Designed to resolve compatibility issues with legacy operating systems (see below)

The purpose of a security template is to apply a security policy settings, restricted group settings, user rights assignment, registry keys, file system, and services. Where you can apply all of these settings through a group policy, a security template provides all of the required settings regardless of group policy and domain membership.

For the purposes of the exam you really should know the main settings for the seven templates listed, their differences, and in which scenario you would be required to apply the required template. For example, let’s say you have a member server in your accounts department which requires the highest level of security, only allows digitally-signed communications, and employs the strictest password policies for its users. Which template would you choose? The answer is the hisecws.inf template. Now I’m not saying that the exam questions will be this easy, but Microsoft will want you to know which template matches the requirements of a given question, which in turn requires you to know the specific settings within each security template and how they compare.

One security template question that comes up often, especially in the Windows 2003 track, is the use of the compatws.inf template. This template was designed to resolve issues with NT 4 workstations that operate custom applications, which will then fail to run once they are upgraded to XP. Whenever you see a Microsoft exam question where a PC upgrade to XP or higher has caused a legacy application that previously ran on NT4 to fail, then applying the compatws.inf template to the effected workstations is often the answer. This is down to elevating the permissions for the computer that have been tightened in newer operating systems.

Another key security template rule of thumb with regards to setup security.inf and dcsecurity.inf (formally the basic*.inf security templates in the Windows 2000 operating systems) is that they should never be deployed through a group policy, only in parts. The main reason is that the templates are too large to deploy in this manner and they will cause your network to slow to a crawl. You can, however, apply just portions of a security template rather than the entire batch of settings. This allows for systems where the user rights element has become out of line over time, you can apply just this portion of the template to users.

Deploying templates

When it comes to deploying security templates, there are three ways that can be considered, and as always, this depends on the scenario in which you are looking to rollout your security changes.

The first way is to use the graphical interface and use the built-in Security configuration and analysis management console, along with the security templates console, which contains all of the default security templates mentioned above.

From here you can import a new security template into your security database (.SDB) and test and then deploy your security template locally to the computer you are on. There is an exam question possibility to watch out for when you import a new security template, and this is to ensure that you check the box to clear the security database before importing your new template. If you don’t do this then the security template you import will merge with the existing one you have installed. One important feature within the console is to run the analysis tool first to see what the resultant effect would be of applying the template you have imported. After the analysis tool has run, the templates are compared (the one to import compared to the existing template) and marked with a blue icon (the policy setting is already applied), a red cross (this setting will be changed when the template is applied), or a black question mark (this setting is not configured in the template or on the system so it will be ignored).

The second method, which can also be used for deploying templates locally or via group policy, is the Secedit command line tool. I will expand on the Secedit command line specifics later, but one point to note is this tool has all of the functionality of the GUI but with the main difference being its use in a batch file. This is an important factor for security related exam, as there is often a question involving a number of servers located in a DMZ that require having a security template installed, but they cannot be installed via group policy as they are not part of the domain. What the Secedit provides is speed of application and is far more efficient than the GUI interface when coming to deployment.

The third method for deploying security templates is via group policy. This is the preferred method of deployment for domain networks as it makes the application of templates much simpler. In order to apply the template in group policy you should configure you template as required and then import it into the new group policy by right clicking the computer configuration > policies > Windows settings > security settings option and selecting Import Policy. You could also deploy a batch file as mentioned above;, however, for the exam and Microsoft best practice, you should follow the method of importing the template.

As with any Microsoft based examination it is essential to gain hands on experience with the operating systems that you are studying. This is quite straight forward with regards to security templates as the two snap in's mentioned above are installed by default. If you go to start > run > type mmc and load the snap-ins locally to test them out; however, be careful what you apply in a live environment as you may cause your system security to be overly tightened or reduced enough to expose your system.

Customizing a security template

Customizing a template is a straightforward task, and the different ways of customizing a security template to meet your needs should be known for the exam. The GUI management console offers the option to copy an existing template, which can be manipulated in order to configure a bespoke template where the bulk of the required settings are already in place. Alternatively, a new template can be set up here too, so by default all of the settings are set to “not defined” until you configure these yourself. Moreover, the security templates themselves can be configured directly at the .inf template stored in the C:\Windows\security\templates. These can be opened via a text editor such as Notepad and then manually changed as required. You won’t have to remember each setting value for the exam, but just be aware that this is an option when the Security templates console is unavailable.

Command line tools

The main command line tool used for security templates is the previously mentioned Secedit tool. There are multiple switches for this tool, most of which will not come up in the exam. However, in order to understand how the tool works in applying or analyzing templates then you should be familiar with switches used.

  • /Analyze or /Configure—Both of these commands are quite self-explanatory, in that they either run the template install mode into either analyze or configure.
  • /db—This chooses the database where the template being is deployed
  • /cfg—This lists the name of the template
  • /log—This is an optional switch which can be very useful when troubleshooting the template deployed
  • /refreshpolicy—This is by far and away the most important switch when you are taking the more legacy operating system exams. The reason that this comes up a lot in exam questions is because it has been superseded by the gpupdate command. Microsoft wants to make sure that you know what is new in their exams, and this is why it is a guaranteed exam question. The other reason is because when it comes to troubleshooting anything that is deployed by group policy, a common answer is that the reason that a group policy hasn’t applied is because it hasn’t been updated to the clients. Running either the Secedit /refreshpolicy or gpupdate command on a client’s PC will allow the client to update itself and apply the template as required.
  • Gpresult—When it comes to troubleshooting when a new security template hasn’t applied itself to a system correctly, then running this command will help identify what has applied to the server. Also, when combined with the application event log, it will help you diagnose why your security template settings are not applied to the client as required.

When it comes to security templates it is important to remember exactly what a security template covers in regards to the security hardening of a system, and which template is best suited for the specific exam question scenario.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.