Chapter 1
IN THIS CHAPTER
Working with basic Windows Server security
Securing files and folders
Working with the local security policy in Windows Server
Understanding Windows Security
Given the number of security breaches in the news today, it isn’t surprising that Microsoft has invested heavily in improving the security of Windows Server. But before you can get into the really cool, new security features of Windows Server 2019, you need a firm grasp on basic security concepts in general and a working knowledge of Windows security in particular.
In this chapter, I cover security basics. Think of this chapter like a security primer, with general security topics first, followed by Windows Server–specific topics (like .NET security, file and folder security, and the Windows Security App).
Securing your server is arguably one of the most important things you need to do in your daily work. After all, you don’t want to go through all the effort to build and configure a server just to have it attacked.
This section covers security basics so that you understand the terminology I use throughout this book.
The CIA triad (shown in Figure 1-1), consisting of confidentiality, integrity, and availability, is one of the most basic concepts in information security. The closer you get to any one point of the triangle, the farther away you are from the others. For example, if you have a system that keeps records completely confidential, that system won’t be available to your end users.
Here’s what each of these terms means for you as a system administrator:
The next set of terms that you need to know are authentication, authorization, and accounting, collectively referred to as triple A:
Access tokens are used by the Windows Server operating system to identify a user who is interacting with an object. The token usually contains the user’s security identifier (SID), SIDs for groups that the user is a member of, and the source of the access token. A SID is a unique value that is assigned to an object to identify it. With users, the SID is what allows you to change the name of the user without impacting the user’s access. The user’s name may change, but the SID will not.
Security descriptors contain useful information related to the security of an object that is secured or able to be secured. It can include the SID for the owner of the object, access control lists that specify who is allowed to access the object, and which access events should generate audit records.
Access control lists (ACLs) contain access control entries (ACEs) that grant or deny specific access to users or groups. The Windows Server operating system has two types of ACLs that you need to be aware of:
SACLs are empty by default, you have to configure what you want them to audit. If you only have one or two servers, configuring this setting manually isn’t so bad. If you have numerous servers, though, configuring SACLs quickly becomes unmanageable. Group Policy to the rescue!
Group Policy allows you to make configuration settings in one place and then apply those changes to multiple systems. Here’s how to turn on feature through Group Policy.
Choose the policy you want to set this through.
In my case, I’m going to create a new group policy object (GPO) called File Servers.
Right-click the domain name, and select Create a GPO in This Domain, and Link It Here.
Creating your GPO this way means that it will apply to all domain systems. Although this is fine in a demo environment, you’ll most likely want to link the GPO to an organizational unit (OU) that contains the file servers.
That’s all there is to setting up file auditing in Group Policy. You also need to enable auditing on the folder that you want to monitor. On the file server where the folder is located, follow these steps:
Working with files and folders is pretty much the bread and butter of a system administrator’s work. Although some folders can be left open to the world, you’ll most likely be asked to lock certain folders or shares down so that only certain people can access them. On Windows Server, you can have conflicting NT File System (NTFS) and share permissions, which can make troubleshooting access issues much more difficult. Let’s examine the different types of permissions and how we can check effective permissions.
With NTFS, we gained the ability to be able to set ACLs, a huge improvement over the FAT32 days. Although file servers do take advantage of NTFS permissions, they can also use shares. The idea behind shares is to make it so that users can access a directory on the server without direct access to the server. That’s a great win for security, but the effective permissions (the combined permissions of the NTFS permissions and the share permissions) can sometimes cause unexpected access issues.
Editing the NTFS permissions on a file or folder is simple: Simply right-click the folder or file that you want to change permissions on and click Properties. Then click the Security tab (see Figure 1-5). There are several different levels of permissions in NTFS file systems:
Share permissions are set using the Sharing tab is the File Properties dialog box (refer to Figure 1-5) — just click the Advanced button and then click Permissions. Share permissions are much simpler than NTFS permissions. You see something similar to Figure 1-6.
You have three simple levels of permissions that you can set on a share:
Effective permissions are the ones that can cause problems. You may get your permissions set up right, but then a user calls in and says he can’t access his files. In Windows Server 2016, Microsoft introduced an Effective Permissions tab that allows you to check what permissions a user will actually have based on the combination of NTFS permissions and share permissions.
To get to the Effective Permissions tab, follow these steps:
Click View Effective Access.
You see a screen similar to Figure 1-7. It shows you that my user Kay Smith doesn’t have permissions to the folder. In reality, she has no NTFS permissions, although she does have share permissions. Because she has no NTFS permissions, she is denied.
Local security policies allow you to define quite a few settings related to the computer that you’re on. They can be very useful if you need a setting to be applied on a specific server that is not currently being applied by Group Policy. Local policy applies to the server first, followed by AD Group Policy. If there is a conflict between the settings of the Local Security Policy and the AD Group Policy, the settings in the AD Group Policy will apply because it’s applied to the system after the Local Security Policy. To access the Local Security Policy, follow these steps:
Type secpol.msc and press Enter.
The Local Security Policy window opens.
From this screen, you can change quite a few settings related to the security of your system. If file server auditing is not enabled, for instance, you can turn it on for this individual server. See an example of the Local Security Policy in Figure 1-8.
The Windows Security app provides a central location to view the security health of your system. You can view the status of your antivirus software under Virus & Threat Protection, check your firewall settings in Firewall & Network Protection, look at whether an app is trusted with App & Browser Control, and gain additional protections with Device Security.
Virus & Threat Protection is a full-featured anti-malware solution. It’s able to check for regular updates and does scheduled and real-time scanning. It even provides ransomware protection capabilities. Check out Figure 1-9 for an idea of what the Virus & Threat Protection dashboard looks like.
You can choose the settings for the Virus & Threat Protection screen across the organization using Group Policy. Simply make the changes that you want to push out to the organization by opening the Group Policy Management Editor. Open the Group Policy Object that you want to edit, and then double-click on Computer Configuration, followed by Policies, then Administrative Templates, then Windows Components, and then Windows Defender Antivirus.
The Firewall & Network Protection area allows you to work with the various profiles in your Windows Firewall. You have a private profile and a public profile, and if your system is domain-joined, you have a domain profile as well. From here, you can add exceptions for applications so that they’re allowed through the firewall and you can adjust the notification settings of the Windows Firewall. See Figure 1-10 for an idea of what the Firewall & Network Protection area looks like.
The App & Browser Control section is able to protect your system by checking applications and files that are downloaded from the web for threats. You can set it to block or warn when it comes across these files, or you can turn it off. The default is set to warn. In addition you can tweak the exploit protection settings built into Windows Server 2019 by clicking Exploit Protection Settings. App & Browser Control is shown in Figure 1-11.
The Exploit Protection screen is worth a little more scrutiny (see Figure 1-12). It can protect you against multiple types of exploits and is on by default. It features Control Flow Guard, which helps to ensure the integrity of indirect calls made to the system, and Data Execution Prevention, which prevents code from being run in memory pages that are reserved for data. Plus, it offers Address Space Layout Randomization (ASLR), which provides randomization for the locations where executables are stored in your server’s memory. This provides protection against buffer overflow attacks.
Last but not least is the Device Security section, which provides utilities that allow you to interact with your Trusted Platform Module (TPM) chip (if you have one) and virtualization controls. The TPM is a chip on your motherboard that generates cryptographic keys and keeps half of the key; the other half of the key is stored on disk. This prevents a thief from stealing a hard drive and decrypting it on another system. There is a button to clear the TPM, and users can receive recommendations to update their TPM firmware when there is an update available. There is also a Hypervisor Control Integrity setting that you can use to enable or disable this functionality. It’s used to determine if software running in kernel mode like drivers is safe software. You can see in Figure 1-13 that the Hypervisor Control Integrity piece is running on my virtual machine, but it has no TPM exposed to it, so the TPM options do not exist.
If you click Core Isolation Details, you can adjust the settings for Hypervisor Control Integrity. You’re presented with a simple slider switch that allows you to enable or disable memory integrity.