Memory integrity, also called hypervisor-protected code integrity (HVCI), uses virtualisation-based security to make sure only validated code runs in the Windows kernel, and it is one of the most effective controls against attackers who load vulnerable drivers to switch off security tools. It is also one of the most asked about Windows settings, because it is sometimes greyed out, sometimes blocked by an "incompatible driver", and sometimes blamed for a game or peripheral that stops working. This guide explains what memory integrity actually does, how to check its state reliably, how to deal with incompatible drivers without simply turning protection off, and how it fits into a defence against bring your own vulnerable driver (BYOVD) attacks across a managed estate.
It complements our Credential Guard and VBS guide, which focuses on protecting credentials inside virtualisation-based security. Here the focus is kernel code integrity and drivers.
This is an independent guide from NHI Mgmt Group, based on Microsoft's public documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.
Key takeaways
- Memory integrity moves kernel-mode code integrity decisions into a hypervisor-protected environment, so even code running in the kernel cannot mark its own memory as executable or patch protected code pages.
- Microsoft states that memory integrity is enabled by default on many new Windows 11 devices that meet hardware and compatibility requirements, and that it is expanding enablement to eligible existing Windows 11 devices. Never assume it is on; verify it.
- When memory integrity, Smart App Control or S mode is active, Windows enforces the Microsoft vulnerable driver blocklist, which blocks drivers known to be abused for kernel privilege escalation.
- The reliable check is the
Win32_DeviceGuardWMI class:SecurityServicesRunningcontaining 2 means memory integrity is running, not just configured. - An incompatible driver is almost always an old or unused driver. Update or remove it rather than leaving the kernel unprotected.
- For BYOVD defence, combine memory integrity, the vulnerable driver blocklist (ideally the more complete downloadable version through App Control for Business) and the attack surface reduction rule for vulnerable signed drivers.
What memory integrity does
Windows has long enforced code integrity in the kernel: drivers must be signed, and the kernel checks signatures before loading them. The weakness is that this check runs inside the same kernel an attacker is trying to compromise. If a malicious or vulnerable driver gets kernel execution, it can tamper with the very structures that enforce the rules.
Memory integrity changes where the decision is made. Using virtualisation-based security (VBS), Windows runs a small, isolated secure environment protected by the hypervisor. Kernel-mode code integrity (KMCI) decisions move into that environment. According to Microsoft, memory integrity uses processor virtualisation extensions to ensure that only validated code can execute in kernel mode. It also protects modification of the Control Flow Guard (CFG) bitmap for kernel-mode drivers and restricts kernel memory allocations that could compromise the system.
The practical effect is that kernel memory pages cannot be both writable and executable, and the normal kernel cannot grant itself execute permission on new pages. Malware that relies on injecting and running code in the kernel, a technique Microsoft associates with attacks such as WannaCry, fails. This maps to NIST SP 800-53 SI-7 (software, firmware and information integrity) and SC-39 (process isolation).
A historical note causes some confusion: memory integrity was originally released as part of Device Guard. Microsoft says Device Guard is no longer used as a product name, except to locate memory integrity and VBS settings in Group Policy and the registry. So when you see DeviceGuard in a registry path or policy name, it refers to these settings.
Hardware, version and default enablement
Microsoft lists memory integrity as applying to Windows 11, Windows 10 and Windows Server 2022, 2019 and 2016. The requirements and behaviour that matter in practice are:
- Processor support. It works best with Intel Kaby Lake and later processors that have Mode-Based Execution Control (MBEC), and AMD Zen 2 and later with Guest Mode Execute Trap (GMET). Older processors use an emulation called Restricted User Mode, which has a bigger performance impact. That difference explains most reports of noticeable slowdown.
- Virtualisation and firmware. Hardware virtualisation must be enabled in firmware, and Secure Boot is part of the expected baseline for VBS.
- Defaults. Memory integrity is on by default on many new Windows 11 devices that meet the requirements, and Microsoft is extending this to eligible existing Windows 11 devices. Actual protection still depends on device eligibility, driver compatibility, policy, rollout assignment and a restart. Microsoft says existing explicit user or administrator settings are respected, so a device where somebody turned it off will stay off.
- Visibility. From Windows 11 22H2, Windows Security shows a warning when memory integrity is off. Users can dismiss it, so it is not a control on its own.
Virtual machines and cloud
Memory integrity protects a Hyper-V virtual machine in the same way it protects a physical device, and the steps inside the guest are the same. It protects against malware inside the guest, not against the host administrator. Microsoft lists requirements: the host must run Windows Server 2016 or Windows 10 version 1607 or later, and the VM must be Generation 2 running Windows Server 2016 or Windows 10 or later. Virtual Fibre Channel adapters and the AllowFullSCSICommandSet option for pass-through disks are incompatible; a host administrator can opt a VM out with Set-VMSecurity -VMName <VMName> -VirtualizationBasedSecurityOptOut $true. In Azure, Microsoft notes that memory integrity is not supported when Secure Boot with DMA is selected: VBS shows as enabled but not running. Choose Secure Boot only.
Checking whether memory integrity is really running
The toggle in Windows Security tells you what is configured on that device. It does not tell a security team, at scale, whether protection is actually running. Use the WMI class Microsoft documents, from an elevated PowerShell session:
Get-CimInstance -ClassName Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard
| Property | Values that matter |
|---|---|
VirtualizationBasedSecurityStatus | 0 not enabled, 1 enabled but not running, 2 enabled and running |
SecurityServicesConfigured | Contains 2 when memory integrity is configured (1 is Credential Guard, 3 is System Guard Secure Launch) |
SecurityServicesRunning | Contains 2 when memory integrity is running |
CodeIntegrityPolicyEnforcementStatus | 0 off, 1 audit, 2 enforced |
AvailableSecurityProperties | Includes 1 hypervisor support, 2 Secure Boot, 3 DMA protection, 7 MBEC or GMET |
RequiredSecurityProperties | Properties required to enable VBS, using the same numbering |
The state "configured but not running" (2 in SecurityServicesConfigured but not in SecurityServicesRunning, or a VBS status of 1) is the most important one to hunt for. It usually means the device has not restarted since policy arrived, a hardware requirement is missing, or a driver blocked enablement. For a quick look on one machine, msinfo32.exe lists VBS features at the bottom of the System Summary.
At estate level, collect these properties through your endpoint management or EDR tooling and report three numbers: devices running memory integrity, devices configured but not running, and devices not configured. The middle group is where effort pays back fastest.
Turning it on: consumer and managed devices
Single device
On an individual PC, go to Windows Security, then Device security, then Core isolation details, and switch on Memory integrity. Restart when prompted. If the toggle refuses because of incompatible drivers, Windows lists them; see the next section before doing anything else.
Managed estate
Microsoft documents several enablement routes: Windows Security, Intune or the configuration service provider (CSP), Group Policy, the registry and App Control for Business. For managed fleets, use one route consistently so you do not end up with conflicting settings.
- Intune or another MDM. Deploy a device configuration or endpoint security profile that turns on VBS with memory integrity. This gives you reporting alongside the setting.
- Group Policy. The setting lives under the Device Guard node in Administrative Templates (System), in the policy that turns on virtualisation-based security, where you choose how virtualisation-based protection of code integrity is enforced. Check the exact option names against the Microsoft page for your Windows version.
- Registry. The scenario key is
HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegritywith theEnabledDWORD. Use it for scripted builds or troubleshooting, not as the primary management channel.
UEFI lock
Memory integrity can be turned on with a UEFI lock, which stores the configuration in firmware so that malware or a local administrator cannot simply switch it off in the registry. The trade-off is recoverability: Microsoft notes that if memory integrity was turned on with UEFI lock, you must disable Secure Boot to complete recovery steps from Windows RE. Use UEFI lock for high-value devices (administrator workstations, servers holding secrets) once you are confident in driver compatibility, and leave it off during pilot rings.
Driver compatibility: finding and fixing incompatible drivers
Microsoft warns that some applications and drivers may be incompatible with memory integrity, which can cause malfunctions and, in rare cases, a boot failure. This is the main reason people turn it off. A better approach is to treat each incompatible driver as a finding.
Why drivers fail
Microsoft's driver guidance sets out what compatible code must do: opt in to non-executable (NX) memory by default, use NX allocation APIs and flags such as NonPagedPoolNx, avoid sections that are both writable and executable, never modify executable system memory directly, avoid dynamic code in the kernel, never load data files as executable, and keep section alignment a multiple of 0x1000. Older drivers written before these rules often allocate executable pool memory or ship with writable and executable sections. They are not necessarily malicious, but they rely on exactly the behaviour memory integrity exists to stop.
Remediation order
- Identify the driver. Windows Security names the incompatible driver files. Map each file to its device or application.
- Remove what is unused. Many blocking drivers belong to hardware that is no longer attached, old VPN clients, abandoned overclocking or RGB utilities, or legacy anti-cheat and monitoring tools. Uninstall the software and remove the driver package.
- Update what is used. Microsoft suggests updating the driver through Device Manager. Check the vendor for a current release; most mainstream vendors ship compatible drivers.
- Replace what cannot be fixed. If a vendor has no compatible driver for hardware you still need, plan replacement and record a time-limited exception rather than disabling protection permanently.
- Enable and verify. Turn memory integrity on, restart, and confirm with
Win32_DeviceGuardthat it is running.
For driver developers and vendors
If you build drivers, or require them from suppliers, test with the Driver Verifier code integrity option (verifier.exe /flags 0x02000000 /driver <driver.sys>) and the Hardware Lab Kit tests Microsoft names, including the HyperVisor Code Integrity Readiness Test. Make HVCI compatibility a procurement requirement for any product that installs a kernel driver. This is consistent with NIST SP 800-53 CM-14 (signed components) as part of a wider supply chain control.
Recovering from a boot problem
If a device fails to boot after enablement, Microsoft's recovery path is: disable any policy that enables VBS and memory integrity (so it does not come back), boot into Windows RE, set the Enabled value under the HypervisorEnforcedCodeIntegrity key to 0, and restart. Document this in your service desk runbook before a wide rollout, and test it on one pilot device.
Memory integrity and BYOVD defence
In a bring your own vulnerable driver attack, the attacker already has administrator rights and installs a legitimately signed but vulnerable driver. They then exploit it to gain kernel execution and use that access to kill EDR processes, remove kernel callbacks or hide activity. This maps to MITRE ATT&CK T1068 Exploitation for Privilege Escalation and, where it is used to hide, T1014 Rootkit. Ransomware affiliates use these "EDR killers" routinely before encryption. Our Bring Your Own Vulnerable Driver and EDR Killers Guide covers the attack in detail; here we focus on how memory integrity contributes.
Layer 1: the vulnerable driver blocklist
Microsoft maintains a blocklist of non-Microsoft kernel drivers that have known vulnerabilities exploitable for kernel privilege escalation, show malicious behaviour or were signed with certificates used to sign malware, or circumvent the Windows security model. Microsoft states the blocklist is enforced when memory integrity, Smart App Control or S mode is active (with an exception for Windows Server 2016), and that since the Windows 11 2022 update it is enabled by default on all devices. Users and administrators can see the Microsoft vulnerable driver blocklist setting in Windows Security.
Two points matter for defenders. First, the in-box list is updated through monthly Windows updates, with Microsoft describing quarterly blocklist updates. Second, the downloadable version usually contains more known vulnerable drivers than the in-box version, because Microsoft holds some blocks back to avoid breaking functionality while partners release fixed drivers. If you can tolerate that risk, deploy the downloadable list through App Control for Business. Microsoft recommends testing the audit version first, reviewing audit block events, and then deploying the enforced version. Successful policy activation appears as event ID 3099 in the CodeIntegrity Operational log, and drivers already running are only stopped after a reboot.
Layer 2: memory integrity itself
Even if an attacker loads a vulnerable driver that is not yet blocklisted, memory integrity removes many of the techniques they would use next. Kernel shellcode cannot be made executable, protected code pages cannot be patched, and CFG bitmap tampering is blocked. Microsoft notes that memory integrity can disrupt techniques such as those used by BlackByte 2.0 when the abused driver is on the blocklist. It is not a guarantee: data-only attacks that change kernel structures without running new code are still possible, which is why the other layers matter.
Layer 3: preventing the driver reaching disk
Microsoft also recommends the attack surface reduction rule Block abuse of exploited vulnerable signed drivers. It prevents a vulnerable driver being written to disk but does not stop a driver already present from loading, so it complements rather than replaces the blocklist. For the strongest position, Microsoft recommends an explicit driver allowlist through App Control for Business (WDAC) where feasible.
Layer 4: detection
Alert on new kernel driver service creation (MITRE ATT&CK T1543.003 Windows Service), on CodeIntegrity block and audit events, on any change that disables memory integrity or VBS, and on EDR sensors that stop reporting. A device where memory integrity was running and suddenly is not should be treated as a potential incident. The EDR Tampering and BYOVD Response Playbook describes what to do next.
Rolling out across an organisation
- Inventory. Collect
Win32_DeviceGuardstate and loaded drivers across the estate. Identify devices with incompatible drivers before enforcing anything. - Fix drivers centrally. Most incompatibilities come from a small number of drivers. Updating or removing them through software distribution clears large groups of devices at once.
- Pilot ring. Enable memory integrity without UEFI lock on IT and security staff devices, then a representative business ring. Watch for boot failures, peripheral issues and performance complaints on older processors.
- Broad deployment. Roll out by ring, and track the configured but not running population until it is near zero.
- Harden high-value devices. Apply UEFI lock to privileged access workstations and sensitive servers, and add the downloadable vulnerable driver blocklist through App Control.
- Govern exceptions. Every device without memory integrity needs a named owner, a reason, a compensating control and an expiry date.
Home and small office users can follow a short version: open Core isolation details, switch Memory integrity on, restart, and if a driver blocks it, uninstall the software that owns it or update it from the vendor. Do not install third-party "driver fixers" to resolve the issue.
Common failure patterns
- Turning it off to fix a game or gadget. A single old driver is accepted as a reason to leave the kernel unprotected indefinitely.
- Reporting the setting, not the state. Compliance dashboards show the policy applied, while many devices are configured but not running because they have not restarted or lack hardware support.
- Assuming new hardware means protection. Default enablement depends on eligibility, drivers, rollout and prior settings.
- Relying on the in-box blocklist only. The downloadable version blocks more drivers, and the in-box list lags behind.
- Selecting Secure Boot with DMA on Azure VMs. VBS shows as enabled but memory integrity is not running.
- UEFI lock without a recovery plan. Service desks discover during an outage that recovery requires disabling Secure Boot.
- No alert when protection disappears. An attacker or a user disables memory integrity and nobody notices.
Practitioner checklist
- Collect
Win32_DeviceGuarddata across all Windows devices and report running, configured but not running, and not configured. - Identify incompatible drivers centrally and update, remove or replace them before enforcement.
- Enable memory integrity through one management channel (Intune or Group Policy) in rings, starting without UEFI lock.
- Apply UEFI lock to privileged access workstations and sensitive servers once compatibility is proven.
- Confirm the Microsoft vulnerable driver blocklist is on, and deploy the downloadable version through App Control in audit then enforce mode.
- Enable the attack surface reduction rule Block abuse of exploited vulnerable signed drivers.
- Alert on CodeIntegrity blocks, new kernel driver services and any change that disables VBS or memory integrity.
- Add HVCI compatibility to procurement requirements for any product that installs a kernel driver.
- Document and test the Windows RE recovery procedure before broad rollout.
- Track every exception with an owner, compensating control and expiry date.
Standards and references
- Microsoft: Enable memory integrity
- Microsoft: Recommended driver block rules (vulnerable driver blocklist)
- Microsoft: Implement HVCI compatible code
- MITRE ATT&CK: Exploitation for Privilege Escalation (T1068)
- NIST: SP 800-53 Rev. 5 (SI-7, SC-39, CM-14)
- CIS: Critical Security Controls v8.1
- CISA: #StopRansomware Guide
Related NHI Mgmt Group resources: Bring Your Own Vulnerable Driver and EDR Killers Guide · Credential Guard and VBS · App Control for Business (WDAC) · EDR Tampering and BYOVD Response Playbook