WavebreakmediaMicro - Fotolia


Use a Windows Server 2016 Hyper-V shielded VM to improve host security

There's been a great deal of buzz around the Windows Server 2016 Hyper-V feature, VM shielding. But how exactly does VM shielding work, and what benefits does it bring?

Arguably the most significant new feature in Windows Server 2016 Hyper-V is VM shielding. VM shielding is designed to overcome a huge security vulnerability related to server virtualization. Namely, anyone who has physical access to a virtualization host can copy a VM's virtual hard disks to removable media, and then mount the virtual hard disks on another computer, bypassing almost all security in the process. In fact, a rogue administrator could even set up his own Hyper-V server and boot the VM copy. The shielded VM feature prevents these types of attacks from succeeding.

There are two main things a Hyper-V shielded VM can do to prevent a VM from being compromised in the previously described manner. First, using a Hyper-V shielded VM causes its virtual hard disk to be encrypted. As such, a rogue administrator would still be able to make a copy of the virtual hard disk, just as they could before. However, the encryption would render the virtual hard disk copy unreadable.

Shielding a VM also prevents it from running on an unauthorized host. The encryption plays a role in this, since a Hyper-V host would be unable to boot a VM if it's unable to read the contents of the VM's virtual hard disk, but an administrator actually has the ability to specify which hosts a Hyper-V shielded VM is allowed to run on.

On the surface, using Hyper-V shielded VM is a deceptively simple process. As you can see in Figure A, VM shielding can be enabled by selecting a single checkbox. However, VM shielding can only be enabled for Generation 2 VMs, and there are significant infrastructure requirements that must be met before VM shielding can be used.

Enabling VM shielding.
Figure A. VM shielding can be enabled with a single checkbox.

As you look at the figure above, you will notice the security tab contains check boxes labeled Enable Secure Boot, Enable Trusted Platform Module and Encrypt State and VM Migration Traffic. All three of these options must be enabled to use VM shielding. In fact, if you select the Enable Shielding checkbox, the other checkboxes are automatically selected and then greyed out to prevent them from being deselected. With that said, take a closer look at the Encrypt State and VM Migration Traffic checkbox. The text beneath this checkbox indicates that encryption support requires a key protector configuration for the VM. Although this is technically a requirement for VM state and migration traffic encryption, it's also a requirement for VM shielding.

Authorize all parts of a Hyper-V shielded VM

On the surface, shielding a VM is a deceptively simple process.

It's important to understand that VM shielding involves more than just encryption. Remember, there is also an authorization component that determines whether or not a VM is allowed to run on a particular host. Furthermore, the VM and the Hyper-V host must be proven to be healthy. The VM proves its health by going through an attestation process, and then passing a certificate of health to the previously mentioned Key Protection Service.

Similarly, the Hyper-V host, which is configured as a guarded host, must also go through an attestation process. A granular discussion of this process is beyond the scope of this article, but it's important to know that host attestation can be done in two different ways. The preferred attestation method is Trusted Platform Module (TPM) trusted attestation. The other type of attestation is Admin Trusted Attestation. This type of attestation isn't as secure as TPM trusted attestation, but exists as a workaround for use with servers that don't meet the TPM hardware requirements. Admin Trusted Attestation is based solely on Active Directory security group membership.

Assuming that the host is validated through the attestation process, the host receives a health certificate and is, at that point, considered to be a guarded host, capable of running a Hyper-V shielded VM. A shielded VM can't run unless this attestation process has been completed, because the host's certificate of health is what authorizes the Key Protection Service to release the keys required to access the VM's contents. It's worth noting, in the interest of security, Microsoft has designed this process so the VM keys aren't stored on the Hyper-V host. The keys are kept on a key protector that is external to the host.

Shielded VMs and guarded hosts can significantly improve the security of Hyper-V hosts and the VMs residing on them. These services protect the integrity of the host and VM boot processes, while also protecting the VM against theft by encrypting the virtual hard disk.

Next Steps

What's new in Windows Server 2016 Hyper-V?

Microsoft sets its sights on the cloud with Window Server 2016

Test your knowledge of Windows Server 2016 Hyper-V features

Dig Deeper on Microsoft Hyper-V management