<# .SYNOPSIS Lab 09.1 — Windows PQC Baseline, Cipher Suites, BitLocker & AD CS Certificate Audit .DESCRIPTION Read-only inventory of OS build, Legacy FIPS mode, Schannel Supported Groups (Get-TlsEccCurve), TLS cipher suite distribution (TLS 1.3 vs ECDHE vs non-PFS TLS_RSA_*), BitLocker encryption method, and optional AD CS Root CA / LDAPS certificate validity inventory. Classification : Read-only audit (Salt okunur denetim) Required Roles : Local Administrator Run On : WIN11-01, WIN11-02, or DC01 (Windows 11 24H2+ / Windows Server 2025) .NOTES Author : Caner Cetinkaya (canercetinkaya.com/labs/09-post-quantum-cryptography/) #> [CmdletBinding()] param( [switch]$IncludeAdcsAudit ) Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' $os = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' $fips = Get-ItemPropertyValue 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy' -Name Enabled -ErrorAction SilentlyContinue Write-Host '=== 1. OS, FIPS & SCHANNEL SUPPORTED GROUPS ===' -ForegroundColor Cyan [PSCustomObject]@{ ComputerName = $env:COMPUTERNAME DisplayVersion = $os.DisplayVersion Build = "$($os.CurrentBuild).$($os.UBR)" FipsModeEnabled = [bool]$fips SupportedGroups = ((Get-TlsEccCurve | ForEach-Object { $_ }) -join ', ') } | Format-List Write-Host '=== 2. TLS CIPHER SUITE DISTRIBUTION ===' -ForegroundColor Cyan $ciphers = @(Get-TlsCipherSuite | ForEach-Object { $_ }) [PSCustomObject]@{ TotalCiphers = $ciphers.Count Tls13Count = @($ciphers | Where-Object { $_.Name -like 'TLS_AES_*' -or $_.Name -like 'TLS_CHACHA20_*' }).Count EcdheCount = @($ciphers | Where-Object { $_.Name -like 'TLS_ECDHE_*' }).Count RsaKexCount = @($ciphers | Where-Object { $_.Name -like 'TLS_RSA_*' }).Count } | Format-Table -AutoSize Write-Host '=== 3. BITLOCKER SYMMETRIC ENCRYPTION METHOD ===' -ForegroundColor Cyan manage-bde -status C: | Select-String 'Conversion Status|Encryption Method|Protection Status' if ($IncludeAdcsAudit) { Write-Host '=== 4. AD CS ROOT CA & LOCAL MACHINE CERTIFICATES ===' -ForegroundColor Cyan certutil -cainfo name | Select-String 'CA name' certutil -cainfo type | Select-String 'CA type' Get-ChildItem Cert:\LocalMachine\My | ForEach-Object { [PSCustomObject]@{ Subject = $_.Subject KeyAlg = $_.PublicKey.Oid.FriendlyName KeySize = $_.PublicKey.Key.KeySize SigAlg = $_.SignatureAlgorithm.FriendlyName NotAfter = $_.NotAfter.ToString('yyyy-MM-dd') ValidityDays = ($_.NotAfter - $_.NotBefore).Days } } | Format-Table -AutoSize }