Secure Virtualization Infrastructure Flashcards
Guarded Fabric Shielded VMs Encryption Supported VMs
What is the Host Guardian Service?
A server role installed on a secure cluster of bare-metal servers that are able to measure the health of a Hyper-V host and release keys for powering on or live migrating shielded VMs. Runs the attestation service and key protection service.
What are the necessary requirements of a Guarded Fabric?
1 Host Guardian Service (usually cluster of 3 nodes)
1 or more guarded hosts
A set of shielded VMs
What are the requirements for deploying a host guardian service
- At least 2 HGS Servers: Servers can be physical or virtual (3 total recommended)
- Servers should have TPMs (2.0 recommended, 1.2 supported)
- Server Core 2016+
- Network line-of-site to fabric allowing HTTP
- HTTPS certificate for access
- Every 4C/4GB can handle 1000 Hyper-V Hosts
How do you handle disaster recovery for a Host Guardian Service?
Choose One
- Install separate HGS in each DC to authorize shielded VMs
- Install HGS stretch cluster between two or more datacenters
- Register Hyper-V with another HGS as a failover
NOTE: HGS should be backed up by exporting its configuration for local recovery
What services (functions) are provided by the host guardian service?
- Attestation: Ensures only trusted Hyper-V Hosts can run shielded VMs
- Key Protection: Provides keys necessary to power on and live migrate shielded VMs to other guarded hosts.
What security benefit is gained from shielded VMs?
If a VM is exported or copied, the VM cannot be run as it is only allowed to run from protected systems.
What are the different attestation modes?
- TPM-Trusted attestation (Hardware based)
- Host Key Attestation (based on asymmetric key pairs)
- Admin-trusted attestation (AD based; depreciated in Server 2019)
What attestation mode is recommended in a guarded fabric?
TPM-Trusted mode. It offers stronger assurances bv ensuring the guarded hosts are approved based on their TPM identity, measured boot sequence, and code integrity policies.
What are the requirements for TPM-trusted attestation/
TPM 2.0 and UEFI 2.3.1 with Secure Boot
If a Hyper-V Host does not have TPM 2.0 can it still be part of a guarded fabric?
Yes. It requires a compromise by using Hosted Key Attestation instead of TPM attestation. Hosted Key Attestation utilizes asymmetric keys to validate hosts.
What is Admin-trusted attestation?
This attestation mode uses AD Group Membership to attest a guarded fabric. It is being deprecated in Server 2019 in favor of Host Key Attestation.
What are the primary use cases for Shielded VMs and Guarded Fabric?
Cloud Providers and Enterprise Clouds
What types of VMs can be run on a guarded fabric?
- Normal VMs with no protection
- Encryption-supported VMS who can be configured by fabric admins
- Shielded VMs who are protected in a way that cannot be disabled by fabric admins
How does the guarded host determine a VM is still protected after the VM has been started?
In addition to the initial check of the VM at boot, TPM-trusted attestation checks the VM every 8 hours after its boot.
Which HGS attestation mode would you use if the goal is to protect VMs from malicious admins or a compromised fabric?
TPM attestation. This mode works well for multi-tenant hosting as well as high-value enterprise environments.
You work for a company that has industry-specific compliance settings that require that VMs be encrypted at rest and in flight. Which HGS attestation mode accommodates this requirement?
Host Key Attestation. Works well for general purpose data centers where fabric admins are trusted and are allowed access to guest VMs.
What powershell cmdlets can be used to backup and restore an HGS?
Export-HgsServerState
Import-HgsServerState
What version of Windows Server is required for a server to be made a Guarded Host?
- Host Key Attestation: Server 2019 Standard or Datacenter
- TPM-Based: Server 2016+ Standard or Datacenter
What needs configured so the fabric (host) domain and the HGS domain can communicate?
DNS forwarding
Why is HGS relegated to its own forest?
The AD for HGS is treated as sensitive because its administrators have access to the keys that control shielded VMs. The environment is self-contained and thus a known good source.
Can an HGS be installed in an existing Bastion forest?
Yes. HGS can be installed in an existing bastion forest. The only real forest requirement for the HGS is that it be configured in the root domain of the forest.
What cmdlet will install the Host Guardian Service role?
Install-WindowsFeature -Name HostGuardianServiceRole - IncludeManagementTools -Restart
What command will install an HGS in its own dedicated forest?
Install-HgsServer -HsgDomainName $DomainName -SafeModeAdministratorPassword $PwdSecString -Restart
What is the process to add HGS to an existing Bastion Forest?
- Install HGS Role
- Join HGS to existing domain (HGS must be added to the root domain)
- Create security group for HGS Nodes
- Create gMSA for the HGS (gMSA will need to be able to generate events in the security log on the HGS server)
- Configure/Create JEA Security Groups. JEA is not required to manage HGS but it must be configured.
Create 2 groups: Admins and Reviewers - Configure/Create cluster computer objects
Prestage the computer accounts if the Hgs Account cannot create computers. Whoever runs the Initialize-HgsServer command needs full control over the cluster object and the security object. - Configure security.
What is the function of the certificates on the HGS?
HGS certificates are used to protect the sensitive information needed to start a shielded VM. They never leave the HGS are are only used to decrypt VM keys.
What are the requirements of the HGS Certificate?
Key Algorithm: RSA
Minimum key size: 2048 bits
Signature Algorithm: Recommended SHA256
Key Usage: Digital Signature and Data Encipherment
EKU: Server Authentication
Key renewal policy: Renew with the same key
Subject Name: Recommended to use the company web address
What names are required on the HGS SSL Certificate?
Subject Name: Name of the HGS Cluster. This is the name supplied with Initialize-HGSServer
SAN: If a different DNS name is used to access the cluster, include it as a SAN
In which version of Windows was the ability to list a second set of HGS Urls for the Shielded VMs made available?
Server 2016 version 1709
If you configure a failback HGS, what must be done to ensure that VMs can attest?
- Ensure that either the servers have a shared encryption and signing certificates, or separate certificates are used to configure the HGS shielded VMs to use both HGS Servers
- Attestation policies need to be in sync between the two clusters
- Hyper-V hosts need to be Server 2016 version 1709 or Server 2019.
- Run the command: Set-HgsClientConfiguration -FallBackKeyProtectionServerUrl $URL1 -FallbackAttestationServerUrl $URL2
How do you undo the fall back configuration for an HGS?
Run the command: Set-HgsClientConfiguration and omit any of the fallback data
How may certificates are needed on the HGS Cluster?
Two: One for signing and one for encryption
What cmdlet would configure an HGS Cluster using TPM attestation?
Initialize-HgsServer -TrustTPM
What cmdlet would allow you to run diagnostics against the HGS?
Get-HgsTrace -RunDiagnostics
How do you get a TPM’s Endorsement Key to use with TPM-trusted attestation?
Use the cmdlet Get-PlatformIdentifer to grab the key. You’ll need to output the XML portion of the command to a file
For (legacy) Admin-trusted delegation, how do you authorize servers to be part of the attestation service?
Add-HgsAttestationHostGroup -Name $GroupName -Identifier $GroupSID
What trusts need configured between the HGS Cluster and the production forest?
A one-way trust needs configured with the HGS trusting production
How does Active DIrectory-trusted attestation validate the guarded host’s configuration file?
It doesn’t. This can only be done with TPM-trusted attestation.
What cmdlet generates a new Code Integrity Policy?
New-CIPolicy
Note: You need to copy the policy file to the HGS using the following cmdlet: Add-HgsAttestationCIPolicy -Name $Policy -Path $PolicyP7B
How do you gather the TPM baseline policy from every host?
Get-HgsAttestationBaselinePolicy -Path $PolicyPath
Note: This needs run on every host with a different hardware profile.
How do you register the TPM policy with the attestation service?
Add-HgsAttestationTPMPolicy -Name $Policy -Path $PolicyPath
How do you configure guarded hosts to request keys for HGS Servers?
- Run Get-HgsServer on the HGS Server to get the attestation URLs.
- Run Set-HgsClientConfiguration -KeyProtectionServerURL $KPSUrl -AttestationUrl $AttestURL
What general steps need performed to create a guarded host using SCVMM?
- Attestation Service Url - URL of the attestation service, part of the HGS. Confirms the host is authorized to run shielded VMs
- Key Protection Service URL - URL of the key protection service, part of the HGS. Once a host passes attestation, it retrieves the key required to decrypt VMs from this service.
- Code Integrity Policy File Share Path (Only required for TPM attested mode) - TPM Attestation requires a host to have a TPM 2.0 chip. A code integrity policy restricts the software that can run at the kernel level to only what the code integrity policy has.
- Shielding Help VHD - Includes tools to convert existing non-shielded vms to shielded.
What are the steps to create a guarded host in SCVMM?
- VMM Console \ Settings \ Host Guardian Service Settings.
a. Provide the attestation and Key Protection URLs (must be the same URLs across all hosts in VMM). Needs to be exactly what was entered on the hosts.
b. Add any CI Policies to VMM
c. Specify the location of the shielding helper VHD - For TPM-basted attestation: R-Click the Host \ Start Maintenance Mode
- Configure Guarded Host: R-Click Host \ Host Guardian Service
a. Check “Enable the Host Guardian Service and use the URLs configured as global settings in VMM”
b. Check “Use a code integrity policy to restrict the software that can run on the host” - R-Click Host \ Stop Maintenance Mode
In which version of Windows were Shielded VMs introduced?
Server 2016
What generations of VMs do shielded VMs support?
Generation 2 VMs
What is a shielded VM?
A Generation 2 VM with virtual TPM, encrypted with BitLocker, and is restricted to run on healthy and approved hosts.
What assurances are offered by the Host Guardian Service?
BitLocker encrypted Disks (OS disks and data disks)
Deployment of new shiedled VMs from a trusted template
Protection of Passwords and other secrets
Tenant control of where a VM can be started
What are shielded template disks?
Trusted template disks for deploying shielded VMs that have computed signatures. These signatures are stored in a catalog.
When a shielded VM is provisioned the signature of the disk is computed and compared to the trusted signature. If the signatures match, the VM is deployed. If they do not match, the shielded VM is determined to be untrustworthy and the deployment fails.
What is a PDK File?
PDK files are known as shielding data files and are used to protect tenant keys and are uploaded to the fabric by the tenant. They protect important VM configuration data (admin password, RDP, and other certificates, domain join credentials, etc.).
Where are the tenant domain join credentials stored for shielded VMs?
PDK Files
These files also store certificates, admin password, and other important secure information.
What types of data is protected by a PDK file?
Administrator credentials
Answer file (unattend.xml)
Security Policy that determines whether the created VMs are configured as shielded or encryption supported
RDP Certificate
Volume signature catalog
Key protector that defines which guarded fabrics a VM is authorized to run on.
What is the difference in function between shielded VMs and encryption-supported VMs?
Shielded VMs are encrypted and protected from access by fabric admins.
Encryption-supported VMs can be encrypted but still are accessible by fabric admins.