<# .SYNOPSIS Lab 09.4 — Immediate PQC Rollback (Disable X25519_MLKEM768) & Post-Rollback Verification .DESCRIPTION Reverts hybrid X25519_MLKEM768 key exchange back to classical curves on a pilot/lab host, restores Schannel EventLogging to default 1, and verifies classical TLS 1.3 negotiation in a fresh PowerShell child process. NOTE: On Intune-managed devices, exclude the device from SEC-PQC-Win11-TLS-SupportedGroups-Pilot first. Classification : Production-applicable rollback change Required Roles : Local Administrator .NOTES Author : Caner Cetinkaya (canercetinkaya.com/labs/09-post-quantum-cryptography/) #> [CmdletBinding(SupportsShouldProcess)] param() Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' if ($PSCmdlet.ShouldProcess($env:COMPUTERNAME, 'Disable X25519_MLKEM768 and restore Schannel EventLogging=1')) { Write-Host '[1/3] Disabling X25519_MLKEM768 TLS ECC curve...' -ForegroundColor Yellow Disable-TlsEccCurve -Name 'X25519_MLKEM768' -ErrorAction SilentlyContinue Write-Host '[2/3] Restoring Schannel EventLogging to default (1)...' -ForegroundColor Yellow Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL' -Name EventLogging -Value 1 -Type DWord Write-Host '[3/3] Verifying restored curve order and fresh classical TLS 1.3 handshake...' -ForegroundColor Cyan Get-TlsEccCurve $trace = powershell.exe -NoProfile -Command "Invoke-RestMethod -Uri 'https://pq.cloudflareresearch.com/cdn-cgi/trace' -TimeoutSec 15" $trace -split "`n" | Where-Object { $_ -match '^(tls|kex|http)=' } }