Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check if the System is effected by CVE-2017-0290 and update the Defender definition if needed
#requires -Version 2.0 -Modules Defender
<#
.SYNOPSIS
Check if the System is effected by CVE-2017-0290
.DESCRIPTION
Check if the System is effected by CVE-2017-0290 and update the Defender definition if needed
.PARAMETER WSUS
Use a WSUS Server instead of the Microsoft Update Server as definition source.
.EXAMPLE
PS C:\> .\check-CVE20170290.ps1
.NOTES
Use the Defender PowerShell Module
#>
param
(
[Parameter(ValueFromPipeline = $true,
Position = 1)]
[switch]
$WSUS
)
PROCESS {
if (-not (Get-MpComputerStatus).AMEngineVersion -ge '1.1.13704.0')
{
Write-Warning -Message 'This system could be effected by CVE-2017-0290'
Write-Output -InputObject 'Defender update enforced.'
if ($WSUS)
{
# Get the latest Virus and spyware definitions from a WSUS
Update-MpSignature -Verbose -UpdateSource InternalDefinitionUpdateServer
}
else
{
# Get the latest Virus and spyware definitions from Microsoft
Update-MpSignature -Verbose -UpdateSource MicrosoftUpdateServer
}
}
else
{
Write-Output -InputObject 'This system not effected by CVE-2017-0290'
}
}
# SIG # Begin signature block
# MIIYpQYJKoZIhvcNAQcCoIIYljCCGJICAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUzZFpdoLVjZz47MQLrMekL3Lk
# AoOgghPNMIID7jCCA1egAwIBAgIQfpPr+3zGTlnqS5p31Ab8OzANBgkqhkiG9w0B
# AQUFADCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIG
# A1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhh
# d3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcg
# Q0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iuVAmzKRaN/cOkUAFmCO3LIq39NJB4RbOFyWu4f
# 1x08eykKB6b2LwftkTvAgA52G2KpEaIKeGahggILMIICBwYJKoZIhvcNAQkGMYIB
# +DCCAfQCAQEwcjBeMQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29y
# cG9yYXRpb24xMDAuBgNVBAMTJ1N5bWFudGVjIFRpbWUgU3RhbXBpbmcgU2Vydmlj
# ZXMgQ0EgLSBHMgIQDs/0OMj+vzVuBNhqmBsaUDAJBgUrDgMCGgUAoF0wGAYJKoZI
# hvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNTEwMTA0ODU4
# WjAjBgkqhkiG9w0BCQQxFgQU2hUqMN80jQqUe7vVPKEJle3ZRAowDQYJKoZIhvcN
# AQEBBQAEggEAUUYi5najmuFT9ql3BPTdVfTFUCpWYqrjHfk/ESN3juF7Z8zoTMN1
# nUJtNdm5StEfIloS27vNeeJMEU/4jycT+8wSYROM5s1haS0Yy9col9Dp8vD8jW1I
# ekWxrUhjsjayq9PPy+HfUX/LoNegCN4YVAdr/SPHbszox57PoDNmH96aGLR+o+Hv
# gaaDMkTyeNaa5q6XHpxPN7VNUcjMB1HQXOj/nCYdHwqtYMCnO5hsOTtmm2AwrOYV
# w4WivMHzXxpvGXisSbzITUSOveZCfOfIw3xUUeWdVjSAp7Q558I3Xv7llEQ0XxF5
# /n2aRup221bLhvnmk3f8I3mf0Rv86M3uFQ==
# SIG # End signature block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.