Hi Everyone,
We are working on applying a signed WDAC (Windows Defender Application Control) policy, but the policy is not getting enforced on the system, even though the policy creation, signing, and deployment steps appear to run without errors.
Below is the PowerShell script we are using to generate and sign the WDAC policy:
$PolicyPath="C:\Temp\WDAC\"
$PolicyName="DefaultWindows_Enforced"
$LamnaServerPolicy=$PolicyPath+$PolicyName+".xml"
cd $PolicyPath
Add-SignerRule -FilePath $LamnaServerPolicy -CertificatePath "C:\AppControl.cer" -Update
Set-RuleOption -FilePath $LamnaServerPolicy -Option 6 -Delete
$PolicyID= Set-CIPolicyIdInfo -FilePath $LamnaServerPolicy -ResetPolicyID
$PolicyID = $PolicyID.Substring(11)
$CIPolicyBin = "C:\Temp\WDAC\" + $PolicyID + ".cip"
ConvertFrom-CIPolicy $LamnaServerPolicy $CIPolicyBin
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\signtool.exe" sign -v /sha1 56cf1798c06f51bf680ee28628c8131a29ec85ad /sm -p7 . -p7co 1.3.6.1.4.1.311.79.1 -fd SHA256 "$CIPolicyBin"
certutil.exe -asn "C:\Temp\WDAC\{3858876e-8f3f-408a-a641-5a85a0f1a7f3}.cip.p7"
$CIPolicyBin = "C:\Temp\WDAC\{3858876e-8f3f-408a-a641-5a85a0f1a7f3}.cip.p7"
Add-Type -AssemblyName 'System.Security'
$SignedCryptoMsgSyntax = New-Object -TypeName System.Security.Cryptography.Pkcs.SignedCms
$SignedCryptoMsgSyntax.Decode([System.IO.File]::ReadAllBytes($CIPolicyBin))
$SignedCryptoMsgSyntax.Certificates | Format-List -Property *
$MountPoint = 'C:\EFIMount'
$EFIDestinationFolder = "$MountPoint\EFI\Microsoft\Boot\CiPolicies\Active"
$EFIPartition = (Get-Partition | Where-Object IsSystem).AccessPaths[0]
if (-Not (Test-Path $MountPoint)) { New-Item -Path $MountPoint -Type Directory -Force }
mountvol $MountPoint $EFIPartition
if (-Not (Test-Path $EFIDestinationFolder)) { New-Item -Path $EFIDestinationFolder -Type Directory -Force }
Copy-Item -Path "C:\Temp\WDAC\{3858876e-8f3f-408a-a641-5a85a0f1a7f3}.cip.p7" -Destination $EFIDestinationFolder -Force
What we observe:
- The policy gets created successfully
Signtool signs the policy without errors
The .cip.p7 file is correctly copied to EFI\Microsoft\Boot\CiPolicies\Active
But after reboot, the WDAC policy is not enforced (no blocking behavior, everything runs normally)
Questions:
What could be preventing the signed policy from being applied/enforced?
Is there a recommended way to verify whether the WDAC policy was parsed/loaded during boot?
Where can I find reliable logs to troubleshoot WDAC policy loading or enforcement failures?
Are there specific Event Viewer paths (CodeIntegrity/Operational, Microsoft-Windows-AppLocker, etc.) I should check?
Could the issue be related to:
Policy ID not matching
Incorrect P7 signing format
Wrong EFI location
Missing catalog signing
Secure Boot requirements
Certificate trust chain
```I have gone through the documentation, but I’m still unsure where the failure is occurring.
Any guidance on diagnosing WDAC enforcement issues, recommended logs, or validation steps would be greatly appreciated.
Thanks in advance