Exploit databaseDownload repository ZIP
GH-f22125ec25c3717be860e86edd45c491
paddlingcode/cve-2022-30190
Sources for CVE-2022-30190
60 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
paddlingcode/cve-2022-30190Revision 5aaa91112236
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
cve-2022-30190.ps1
PowerShell · 4,174 bytes<#
.SYNOPSIS
Script to remove values and objects from the registry.
.DESCRIPTION
This script is to remove Windows registries such as ms-msdt due
to vulnerability CVE-2022-30190. Please note this powershell
does not perform a backup of the registry.
.PARAMETER Path
The path to the registry you want removed.
.PARAMETER Name
The name of the registry you want removed. Wildcards are supported.
.OUTPUTS
None
.EXAMPLE
.\cve-2022-30190.ps1 -Path 'HKCR:\ms-msdt' -Name '*'
.NOTES
Author: https://github.com/PaddlingCode/
-//-` .:///:`
`/dNd--+yhmNds-.-/+hNmyo+-
Word up! ./ods+/``- `..`` .dd+ `/o+`
:sosmm`-N-sNo :mm:`.:.-o+`
`:hsh`sM. .MmdMN. -. .os:sMmo.-+o:`
.----omMN.No./ `hMhoMM- -::ho .hmMd. `+d+..
`-/y++mNMMMNs/y/hy -ho`/MM: +y/`syNMh+ `.:ydyo+odNmh+-`
`.``..--/oo+/. `:NMMMsymyNms .ymh: :yy`-oshm/ ` .+smhshmm/ydo:--`
./shs:::::-. `:+oodMMmNMMMN+` :dmd -yy- `/:.. .ss:///o-`..-``/ho/oy:`
`.:ooso-` ``:o+yddhmMMMNmdhy+- .. .:/+dmhdo` .:/shhhhho:` `:+o:-..`
ohyyys. `osydddddddmmh+.` :ddddddmmh` .:::/smNdsss/::::::-`.-:sys+-
`````` `....`.............. -:::-
.LINK
Source Repo:
https://github.com/PaddlingCode/cve-2022-30190/
.LINK
Microsoft Security Advisory & Workaround
https://msrc-blog.microsoft.com/2022/05/30/guidance-for-cve-2022-30190-microsoft-support-diagnostic-tool-vulnerability/
.LINK
Cameo - Word up (1986)
https://open.spotify.com/track/7LoGfKBAaOl0nxhodJ1240?si=N0LTMb4tTrmXPBJPcOb4gg
#>
[CmdletBinding()]
param(
[Parameter(
Mandatory=$true,
Position=0,
HelpMessage = "The path to the registry you want removed.")]
[ValidateNotNullOrEmpty()]
[string]$Path,
[Parameter(
Mandatory=$true,
Position=1,
HelpMessage = "The name of the registry objects you want removed. Wildcards are supported.")]
[string]$Name
)
Function Remove-RegistryObject {
[CmdletBinding()]
Param(
[Parameter( Mandatory=$true,
Position=0,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[string] $Path,
[Parameter( Mandatory=$false,
Position=1,
ValueFromPipelineByPropertyName=$true)]
[string] $Name,
[Parameter( Mandatory=$false,
Position=2,
ValueFromPipelineByPropertyName=$true)]
[boolean] $Force = $true,
[Parameter (Mandatory=$false,
ValueFromPipelineByPropertyName=$true)]
[boolean] $WhatIf = $false
)
BEGIN {
# HKCR is not a default registry provider and must be created
try {
New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR
}
catch {
Write-Error $_.Exception.Message
}
$registryParams = @{
'Path' = $Path
'Name' = $Name
'Force' = $Force
'WhatIf' = $WhatIf
}
}
PROCESS {
try {
$result = Remove-ItemProperty @registryParams
Write-Output = $result
}
catch {
Write-Error $_.Exception.Message
}
}
END {
}
}
try {
Remove-RegistryObject -Path $Path -Name $Name
}
catch {
Write-Error $_.Exception.Message
}