Exploit databaseDownload repository ZIP
GH-75b437c873cdd6860a2a399ca0bf77e9
abeldemiss/vulnerability-management-program
Sources for CVE-2013-3900
11 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
abeldemiss/vulnerability-management-programRevision 8cb60fcf7d27
- ↑..Parent directory
- remediate-CVE-2013-3900.ps1
- remediation-wireshark-uninstall.ps1
- toggle-cipher-suites.ps1
- toggle-guest-local-administrators.ps1
- toggle-protocols.ps1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
remediation scripts/remediate-CVE-2013-3900.ps1
PowerShell · 2,868 bytes<#
.SYNOPSIS
Remediates CVE-2013-3900 by enabling certificate padding checks.
Tested on Windows Server 2019 Datacenter.
Please test thoroughly in a non-production environment before deploying widely.
Make sure to run as Administrator or with appropriate privileges.
.NOTES
Author : Abel Demiss
Date Created : 2025-03-29
Last Modified : 2025-03-29
Version : 1.0
.TESTED ON
Date(s) Tested : 2025-03-29
Tested By : Abel Demiss
Systems Tested : Windows Server 2019 Datacenter, Build 1809
PowerShell Ver. : 5.1.17763.6189
.USAGE
Example syntax:
PS C:\> .\remediate-CVE-2013-3900.ps1
#>
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Error "Run as Administrator."
exit 1
}
# Ensure the Config key exists and set the value
$configPath = "HKLM:\Software\Microsoft\Cryptography\Wintrust\Config"
if (-not (Test-Path $configPath)) {
try{
New-Item -Path $configPath -Force | Out-Null
Set-ItemProperty -Path $configPath -Name "EnableCertPaddingCheck" -Value 1 -Type DWORD -Force
Write-Host "Config key created and EnableCertPaddingCheck set successfully."
}
catch{
Write-Error "Failed to create config key or set EnableCertPaddingCheck value: $($_.Exception.Message)"
}
} else {
try{
Set-ItemProperty -Path $configPath -Name "EnableCertPaddingCheck" -Value 1 -Type DWORD -Force
Write-Host "EnableCertPaddingCheck set successfully."
}
catch{
Write-Error "Failed to set EnableCertPaddingCheck value: $($_.Exception.Message)"
}
}
# Ensure the Wow6432Node Config key exists and set the value (for 64-bit systems)
if ([Environment]::Is64BitOperatingSystem) {
$wowConfigPath = "HKLM:\Software\Wow6432Node\Microsoft\Cryptography\Wintrust\Config"
if (-not (Test-Path $wowConfigPath)) {
try{
New-Item -Path $wowConfigPath -Force | Out-Null
Set-ItemProperty -Path $wowConfigPath -Name "EnableCertPaddingCheck" -Value 1 -Type DWORD -Force
Write-Host "Wow6432Node Config key created and EnableCertPaddingCheck set successfully."
}
catch{
Write-Error "Failed to create Wow6432Node config key or set EnableCertPaddingCheck value: $($_.Exception.Message)"
}
} else {
try{
Set-ItemProperty -Path $wowConfigPath -Name "EnableCertPaddingCheck" -Value 1 -Type DWORD -Force
Write-Host "Wow6432Node EnableCertPaddingCheck set successfully."
}
catch{
Write-Error "Failed to set Wow6432Node EnableCertPaddingCheck value: $($_.Exception.Message)"
}
}
}
Write-Host "Script completed."
#Optional Restart
#Restart-Computer -Force