diff --git a/scripts_wip/Win_SecCheck_Print_kb5005010.ps1 b/scripts_wip/Win_SecCheck_Print_kb5005010.ps1 new file mode 100644 index 00000000..7acf5e8f --- /dev/null +++ b/scripts_wip/Win_SecCheck_Print_kb5005010.ps1 @@ -0,0 +1,22 @@ +# Checking for insecure by design print features being enabled +# See https://support.microsoft.com/en-us/topic/kb5005010-restricting-installation-of-new-printer-drivers-after-applying-the-july-6-2021-updates-31b91c02-05bc-4ada-a7ea-183b129578a7 + +$PointAndPrintNoElevation = (Get-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrintNoElevation").NoWarningNoElevationOnInstall +$PointAndPrintUpdatePrompt = (Get-ItemProperty -Path "HKLM:\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrintNoElevation").UpdatePromptSettings + +if ($PointAndPrintNoElevation -Eq 1) { + Write-Output "Point and Print WarningNoElevationOnInstall set to true. WARNING: You are insecure-by-design." + exit 1 +} + +elseif ($PointAndPrintUpdatePrompt -Eq 1) { + Write-Output "Point and Print PointAndPrintUpdatePrompt set to true. WARNING: You are insecure-by-design." + exit 1 +} + +else { + Write-Output "WarningNoElevationOnInstall UpdatePromptSettings set to false. No vulnerabilities" + exit 0 +} + +Exit $LASTEXITCODE \ No newline at end of file