Windows Fails to Boot With Signed WDAC Policy

Brian Benavidez 201 Reputation points
2021-05-11T22:34:50.483+00:00

I am deploying a signed WDAC policy to a Dell Latitude 7200 running Windows Enterprise (20H2 at the time this question was written) which includes TPM 2.0 with Secure Boot. The policy is being added to the target system using the Application Control CSP. It's based on the DefaultWindows_Enforced policy from C:\Windows\schemas\CodeIntegrity\ExamplePolicies. When deployed, it predictably blocks unsigned code. After restarting once, it still works. Restarting a third time results in a boot failure (Dell detects boot failures and drops you into an OS recovery mode). The only way to get around this is to disable Secure Boot. After disabling Secure Boot, I am able to boot into Windows and, taking a look at the WDAC events, nothing appears to have been blocked (not surprising as it may be blocking some kernel mode drivers and I don't know of an event for those being blocked). I've also tried scanning the entire target system using New-CIPolicy but it results in the same boot failure. Even if I put the policy in "Boot Audit on Failure" it still fails to boot.

Since this is a Dell manufactured device, they have OEM Secure Boot keys. Do these need to be included in a WDAC policy somehow? I would have assumed these would be detected with New-CIPolicy if they were required, but perhaps not. I would test this but I don't know how to add these. I am able to export them from the BIOS as text files and I can see the (presumably) key names among the keys' data bytes: Dell Inc. Key Exchange Key; Dell Inc. UEFI DB; Dell Inc. Platform Key. I was thinking maybe the policy needs to be signed by the PK or KEK or something that has a chain back to these but I haven't found a way to do that. Maybe also the signer I used to sign the policy needs to be added to the Secure Boot DB but I haven't found a clear way to do that either. I couldn't find much information on Microsoft's WDAC documentation concerning this so any guidance is greatly appreciated.

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,765 questions
0 comments No comments
{count} votes

Accepted answer
  1. Brian Benavidez 201 Reputation points
    2021-05-14T20:09:41.11+00:00

    I think I may have found the issue. It looks like the driversipolicy.p7b from %windir%\System32\CodeIntegrity\ is being automatically applied as soon as I deploy a custom policy. Using the policy recovery tool from Matt Graeber (https://github.com/mattifestation/WDACTools) I can take a look at the rules (driversipolicy.xml) and it appears to be a driver blacklist. The issue here is that it is not signed. So when I deploy my signed policy, which does not allow unsigned policies, the Microsoft Windows Driver Policy (driversipolicy.p7b), which is also a base policy, conflicts with it. Since that driver policy does not have the Boot Audit on Failure rule enabled, my guess is that they cancel each other out and Secure Boot prevents booting altogether. If so, this is strange behavior as I would expect the unsigned policy to not apply at all.


2 additional answers

Sort by: Most helpful
  1. Teemo Tang 11,351 Reputation points
    2021-05-12T02:10:21.613+00:00

    You may need to consult with Dell firmware support for an idea, what operations should be done on WDAC policy side to adapt their product, and vice versa.
    Besides, due to limited condition Q&A forum can’t reproduce your scenario for test or remote assistance, you could open a request with Microsoft for deep research on WDAC deployment.
    Support for business (microsoft.com)
    https://support.serviceshub.microsoft.com/supportforbusiness

    -------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Teemo Tang 11,351 Reputation points
    2021-05-13T01:46:56.663+00:00

    “does WDAC require the PK or KEK public certs (or a cert in that chain) to allow Secure Boot to run successfully”
    Yes, I think it is required.
    WDAC policies enforce kernel mode drivers, it is important that they be thoroughly tested on each software and hardware configuration before being enforced and signed. Signed WDAC policies are validated in the pre-boot sequence by using Secure Boot.

    Firmware: Securing Boot Configuration and Management
    • Required BIOS capabilities: Ability of OEM to add ISV, OEM, or Enterprise Certificate in Secure Boot DB at manufacturing time.
    • Required configurations: Microsoft UEFI CA must be removed from Secure Boot DB. Support for 3rd-party UEFI modules is permitted but should leverage ISV-provided certificates or OEM certificate for the specific UEFI software.
    Deployment guidelines for Windows Defender Device Guard (Windows 10) - Windows security | Microsoft Learn
    https://learn.microsoft.com/en-us/windows/security/threat-protection/device-guard/requirements-and-deployment-planning-guidelines-for-virtualization-based-protection-of-code-integrity#additional-security-qualifications-starting-with-windows-10-version-1607-and-windows-server-2016

    -------------------------------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.