Chapter 3
IN THIS CHAPTER
Examining User Account Control and what it can do for you
Administering user passwords in Windows Server 2019
Understanding and configuring Credential Guard
Configuring the startup and recovery options in Windows Server
Windows Server 2019 provides multiple built-in security mechanisms that allow you to better secure your system for no extra cost past that of the server OS license.
In this chapter, you learn about some of these built-in mechanisms — how they work and how to take advantage of them.
You can’t have a discussion about Windows internal security without a discussion of User Account Control (UAC). Love it or hate it, it serves a purpose.
If you’ve worked with Windows operating systems at all, you’ve no doubt been prompted that something is trying to install. You’ve most likely received a screen similar to Figure 3-1, rolled your eyes, and allowed it. This interruption is annoying when you’re trying to install something, but imagine if it prompted you to install something when you weren’t attempting an install. This is what UAC is designed to protect against.
In the past, if you accidentally went to a website or opened an email that had malware, that malware could potentially run with administrator permissions without interference, and you wouldn’t even know that it had run. UAC shored up this weakness. Now, if you download malicious code and it attempts to elevate its privileges, you’re prompted with the familiar box asking if you want to allow it to run as administrator. This gives you the ability to stop it from even getting the chance to run in the first place.
You may be wondering how you can tell if an application will give you a UAC prompt when you run it. If the application’s icon has a small shield in its lower-right corner, you’ll get a UAC response from it.
This feature allows administrative accounts to go about their business without receiving any of the UAC prompts. Sounds great, right? The downside is that this is very similar to what you would get if you turned off UAC completely.
Maybe you understand the risks inherent with doing this, and you still want to have automatic privilege elevation. If so, see the “Using the Local Security Policy to Control User Account Control,” later in this chapter. There, I go over the necessary steps to allow automatic privilege elevation.
There are several ways to override or permanently disable UAC. Some methods provide more granularity than others. I never recommend permanently disabling UAC. I do, however, recommend tuning it so that it works more seamlessly with your users and administrators. UAC is protecting your system, after all, so it’s best to allow it to do exactly that.
One of the common methods for dealing with UAC is to just turn it off when it annoys you. I don’t recommend this course of action, but it can be accomplished quite easily with the User Accounts applet:
In the User Account Control Settings box, choose Never Notify (see Figure 3-3).
Your four options are as follows:
In most cases, you’re going to want more granularity than you have through User Accounts in the Control Panel. This is where the Local Security Policy is really handy.
To bring up the Local Security Policy box, click the Start Menu and then type secpol.msc and press Enter. Select Local Policies and then Security Options and scroll all the way down. You see multiple options for UAC configuration toward the bottom, all sorted by User Account Control, as shown in Figure 3-4. If you want to change these settings across your organization, make the changes discussed here in Group Policy instead of the Local Security Policy.
I promised you earlier in this chapter that I would show you how to automatically elevate administrative permissions without the UAC prompts. Here’s how:
This automatically elevates your permissions as needed.
Several other settings are also behaviors you can choose from for Admin Approval Mode:
With most systems today, passwords are managed by Active Directory — the exception to that being in a workgroup environment, where password management is done locally on each system. Understandably a lot of people don’t have the best understanding of how to manage local passwords. Luckily, Windows Server 2019 happens to have a tool that simplifies working with passwords locally and on the network.
Regardless of whether you’re using a local sign-on or a domain account to sign on, Windows Server 2019 (and Windows 10!) uses a product called Credential Manager to save your web and Windows credentials. You can access Credential Manager in the Control Panel by clicking User Accounts and then clicking Credential Manager.
The great thing about Credential Manager is that it gives you the ability to save credentials so that you can have an almost single sign-on type of experience. You can back up and restore credentials, as well as add Windows credentials, certificate-based credentials, and generic credentials all from the same pane of glass, shown in Figure 3-5.
Credential Guard was introduced in Windows Server 2016 as a way to mitigate some of the password attacks that were becoming more common. It protects just about anything that could be considered a credential on a Windows server including NT LAN Manager (NTLM) password hashes, Kerberos Ticket Granting Tickets (TGT), and credentials that are stored by applications as domain credentials. NTLM was a protocol that was developed by Microsoft to facilitate authentication. It stores hashed password values on the server or on the domain controller. Kerberos provides stronger encryption capabilities and uses ticket-based authentication. The ticket granting ticket (TGT) is used to request access to resources. Credential Guard is available on Windows Server 2016/Windows 10 and newer.
Traditionally, Windows stored secrets in the Local Security Authority (LSA). These secrets were stored in memory, which made them vulnerable to credential theft. With Credential Guard enabled, LSA talks to the newer isolated LSA process that protects secrets with virtualization-based security. Secrets are no longer stored in memory and are much better protected against credential theft. Hacking tools like Mimikatz can’t extract credentials from memory anymore, which provides a layer of protection for credentials that didn’t exist before Credential Guard.
To support Credential Guard, there are a few requirements that need to be met. Most modern systems should be able to meet these requirements without any difficulty:
You have a few options for enabling Credential Guard. In this section, I cover the most common methods you would use in an Enterprise setting. Group Policy is one of the more common methods because it will apply to any domain-joined system. The registry can also be a very useful method, especially if you have systems that aren’t domain-joined.
Enabling Credential Guard by Group Policy is by far the simplest method because it has the least amount of steps and room for error. Follow these steps:
Name your policy and click OK.
I named mine Credential Guard.
Navigate through Computer Configuration, then Policies, then Administrative Templates, then System, and then Device Guard.
Device Guard is used to prevent malicious code from running, while Credential Guard is focused on protecting credentials from compromise. They’re different features but complement each other very well.
Under Select Platform Security Level, choose Secure Boot.
Secure boot prevents unauthorized software and/or drivers from loading as the system starts.
In the Credential Guard Configuration box, select Enabled with UEFI Lock.
Your settings should look like Figure 3-6.
On some systems, you can’t apply Group Policy and you need another means of enabling Credential Guard. There are a few steps that you will need to perform to enable it through the registry. This section walks you through each of these steps.
This first step only needs to be performed if the system on which you want to turn Credential Guard on is a Windows 10 build prior to build number 1607. Windows Server 2016 and newer does not require this step.
You can see the newly created DWORDs in Figure 3-7. When these DWORDs are created, you can turn on Credential Guard.
The second step in this adventure is to actually enable Credential Guard. If you’re on Windows Server 2016 or newer, or Windows 10 1607 or newer, you may have skipped right to this step. If you aren’t sure how to access the Registry Editor, check Step 1 in the preceding section.
If you need to configure the Startup and Recovery settings for your server, you can do this through the Advanced System Properties dialog box in Windows Server 2019.
The Startup and Recovery dialog box allows you to choose things like which OS you want the system to start with (if you have multiple operating systems installed), the time to show the list of the operating systems, and the amount of time to show recovery options. You can also configure System failure to automatically restart the systems and whether you want it to create a memory dump or not. You can see these options in Figure 3-8.
You may be thinking, “Well, that’s cool, but how do I get to the Startup and Recovery dialog box?” I’m glad you asked. Follow these steps:
In the Startup and Recovery dialog box, you can set the default operating system that you want to boot to, as well as how long you want the list of available operating systems to show up. This setting is helpful if you have multiple operating systems installed on the same server, and you want to specify which operating system should be considered the default. You can also configure what you want the system to do in the event of a failure, and whether you want a memory dump to occur, as well as where you want it stored, as shown in Figure 3-10. By default, if it encounters a failure, Windows Server 2019 automatically restarts and creates a memory dump. The memory dump is helpful later in diagnosing the issue that caused the system to fail.
And there you have it. That’s how you change the startup and recovery options in Windows Server 2019.