Enhance Windows Security with Enabling Credential Guard : Step by step guide
I - What is credentil guard ?
Credential Guard is a security feature introduced by Microsoft from Windows 10 and Windows Server 2016, which protects credentials by isolating certain critical processes in a secure environment. It uses Virtualization Based Security (VBS) to protect security secrets such as user credentials, including NTLM hashes, Kerberos tickets and other sensitive information that can be used for attacks such as Pass-the-Hash or Pass-the-Ticket.
II - Advantages of enabling Credential Guard :
When enabled, Credential Guard provides the following benefits:
III - Integration in Windows versions
Credential Guard is available and can be activated on the following versions of Windows :
Starting in Windows 11, 22H2 and Windows Server 2025 (preview), VBS and Credential Guard are enabled by default on devices that meet the requirements.
The default enablement is without UEFI Lock, thus allowing administrators to disable Credential Guard remotely if needed.
When Credential Guard is enabled, VBS (Virtualization-based security) is automatically enabled too.
IV - Hardware and software requirements
To use Credential Guard, the following prerequisites must be met :
1 - Hardware requirements :
2 - Software requirements :
V - Enabling Credantial Guard through PowerShell :
The script first checks that the basic prerequisites are met (TPM and Secure Boot), then enables the necessary Hyper-V features and configures registry settings for Credential Guard. It will then request a reboot to apply the changes.
Important points to note:
This script requires administrator privileges to run.
It modifies important system parameters, so be sure to test it in a controlled environment before applying it on a large scale.
领英推荐
After activation, we recommend that you check that Credential Guard is working correctly using the Microsoft Security Compliance Toolkit, or by running msinfo32 and checking the “Virtualization-based security” status.
Enabling Credential Guard may have implications for the compatibility of certain applications or drivers. It is therefore important to thoroughly test your environment before deploying Credential Guard on a large scale.
# Check whether PowerShell is run as administrator
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "You need execute this script as administrator."
Break
}
# Check that the system meets basic requirements
$tpm = Get-Tpm
if (-not $tpm.TpmPresent) {
Write-Warning "TPM 2.0 is not present or enabled on system."
Break
}
$secureBootState = Confirm-SecureBootUEFI
if (-not $secureBootState) {
Write-Warning "Secure Boot Is not enabled on this device"
Break
}
# Enabling Hyper-V fonctionalities
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
# Configing Credential Guard
$hvciSettings = @{
"EnableVirtualizationBasedSecurity" = $true
"RequirePlatformSecurityFeatures" = "3" # Secure Boot and DMA Protection
"LsaCfgFlags" = "1" # Credential Guard with UEFI lock
}
# Appliquer les paramètres
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "EnableVirtualizationBasedSecurity" -Value $hvciSettings.EnableVirtualizationBasedSecurity -PropertyType DWORD -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name "RequirePlatformSecurityFeatures" -Value $hvciSettings.RequirePlatformSecurityFeatures -PropertyType DWORD -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "LsaCfgFlags" -Value $hvciSettings.LsaCfgFlags -PropertyType DWORD -Force
Write-Host "Credential Guard is succefully configured. you need to reboot to apply changes."
Read-Host "Press any key to reboot..."
Restart-Computer
VI - Enabling Credantial Guard through Microsoft Intune :
To enable Credential Guard through Microsoft Intune, follow these steps :
1 - Sign in to Microsoft Endpoint Manager Admin Center : endpoint.microsoft.com.
2 - Create a Configuration Profile:
3 - Configure Credential Guard Settings:
4 - Assign the Profile:
This process ensures that Credential Guard is properly enabled and protecting your devices.
VII - Conclusion:
Enabling Credential Guard significantly enhances the security of Windows systems by isolating critical credentials in a secure environment. By following the steps described, administrators can effectively protect their networks against advanced threats and credential theft attacks.
Thanks
Aymen EL JAZIRI
System Administrator