Skip to content

Instantly share code, notes, and snippets.

@technion
Last active September 12, 2021 08:43
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save technion/1b1a2e06d0a1c8393236b30fe351546a to your computer and use it in GitHub Desktop.
Save technion/1b1a2e06d0a1c8393236b30fe351546a to your computer and use it in GitHub Desktop.
CVE-2021-40444 Mitigation Script
Set-Strictmode -Version 2
# Applies reg keys from https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444
# Although the above document is still "Revision 1.0", Microsoft has removed the WOW6432 section
for($i = 0; $i -le 3; $i++) {
$RegPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\$i"
if (-not (Test-Path $RegPath)) {
New-Item $RegPath -Force
}
New-ItemProperty -Path $RegPath -Name "1001" -PropertyType DWORD -Value 00000003 -Force
New-ItemProperty -Path $RegPath -Name "1004" -PropertyType DWORD -Value 00000003 -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment