{"id":5114,"date":"2017-05-12T17:13:44","date_gmt":"2017-05-12T22:13:44","guid":{"rendered":"https:\/\/www.poweradmin.com\/blog\/?p=5114"},"modified":"2017-05-16T09:57:27","modified_gmt":"2017-05-16T14:57:27","slug":"how-to-check-for-ms17-010-and-other-hotfixes","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/how-to-check-for-ms17-010-and-other-hotfixes\/","title":{"rendered":"How to check for MS17-010 and other HotFixes"},"content":{"rendered":"<p><span style=\"font-family: verdana, geneva, sans-serif;\"><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/ms17-010-warning.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-5135 alignright\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/ms17-010-warning.jpg\" alt=\"\" width=\"300\" height=\"262\"><\/a>Sometimes you need to check on the status of your applied updates and quickly. With news of the WannaCrypt\/WannaCry Ransomware spreading via the <a title=\"MS17-010\" href=\"https:\/\/technet.microsoft.com\/en-us\/library\/security\/ms17-010.aspx\" rel=\"nofollow\" target=\"_blank\">MS17-010<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a>\u00a0vulnerability <a title=\"Ransomware infections reported worldwide\" href=\"http:\/\/www.bbc.com\/news\/technology-39901382\" rel=\"nofollow\" target=\"_blank\">around the globe<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a> it\u2019s a good idea to double check that all your updates are applied correctly.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">The following is a quick PowerShell Execute Script monitor that you can add to Server Monitor to check for the presence of the HotFixes needed to mitigate MS17-010:<\/span><\/p>\n<p>\u00a0<\/p>\n<blockquote>\n<pre># KB4012598 KB4018466- Windows Server 2008\r\n# KB4012217 KB4015551 KB4019216 - Windows Server 2012\r\n# KB4012216 KB4015550 KB4019215 - Windows Server 2012 R2\r\n# KB4013429 KB4019472 KB4015217 KB4015438 KB4016635 - Windows Server 2016\r\n\r\n# List of all HotFixes containing the patch\r\n$hotfixes = \"KB4012598\", \"KB4018466\", \"KB4012217\", \"KB4015551\", \"KB4019216\", \"KB4012216\", \"KB4015550\", \"KB4019215\", \"KB4013429\", \"KB4019472\", \"KB4015217\", \"KB4015438\", \"KB4016635\"\r\n\r\n# Search for the HotFixes\r\n$hotfix = Get-HotFix -ComputerName $mon.ComputerName | Where-Object {$hotfixes -contains $_.HotfixID} | Select-Object -property \"HotFixID\"\r\n\r\n# See if the HotFix was found\r\nif ($hotfix) {\r\n\u00a0 \u00a0 $mon.FireActions = $false\r\n\u00a0 \u00a0 $mon.Details = \"Found HotFix: \" + $hotfix.HotFixID\r\n    # a blank value removes the property \r\n    $mon.SetComputerCustomPropByID(0, \"NEEDS-MS17-010-FIX\", \"\")\r\n} else {\r\n\u00a0 \u00a0 $mon.FireActions = $true\r\n\u00a0 \u00a0 $mon.Details = \"Didn't Find HotFix\"\r\n    $mon.SetComputerCustomPropByID(0, \"NEEDS-MS17-010-FIX\", \"YES\") \r\n}<\/pre>\n<\/blockquote>\n<p>\u00a0<\/p>\n<p>\n <span style=\"font-family: verdana, geneva, sans-serif;\"> The script should work in either Powershell v2 or v4 and contains all the Hot Fix numbers as of 5\/16\/2017 that contain the MS17-010 patch (each rollup update will replace the existing HotFix with a new KB number).<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">If you are using another version of Windows not listed above or if you\u2019re trying to apply this to another vulnerability, the process for getting the KB numbers for the <span style=\"font-family: 'courier new', courier, monospace;\">$hotfixes<\/span> variable is:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">1 \u2013 Go to the <a title=\"MS17-010\" href=\"https:\/\/technet.microsoft.com\/en-us\/library\/security\/ms17-010.aspx\" rel=\"nofollow\" target=\"_blank\">Vulnerability\u2019s page<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a>\u00a0and locate the original KB number(s) for your systems<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">2 \u2013 Use the original KB number(s) for the <span style=\"font-family: 'courier new', courier, monospace;\">$hotfixes<\/span> variable in the script above<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">3 \u2013 Go to the <a title=\"Windows Update Catalog\" href=\"\/\/www.catalog.update.microsoft.com\/Home.aspx\" rel=\"nofollow\" target=\"_blank\">Windows Update Catalog <img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a>and search for the KB number<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">4- Click the matching update(s)<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">5 \u2013 Under the Package Details, add any KB numbers in the \u201c<em>This update has been replaced by the following updates<\/em>\u201d box to the <span style=\"font-family: 'courier new', courier, monospace;\">$hotfixes<\/span> variable<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">6 \u2013 Repeat steps 4 and 5 for each additional Hot Fix number until you get to the Hot Fix number(s) that haven\u2019t been replaced yet.<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">7 \u2013 You should now have the full list of KB numbers that mitigate the vulnerability and you can deploy the script.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">This is only a quick way to assess what systems are missing the fix right now. The current KB numbers will eventually be replaced as new Rollup updates get released and replace the previous ones. You can keep the HotFix List up to date by adding new KB Numbers to the <span style=\"font-family: 'courier new', courier, monospace;\">$hotfixes<\/span> variable, but hopefully once you know which systems are vulnerable you can make sure that they\u2019re patched and remove the monitor entirely.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">This script will fire alerts for each server that is missing the HotFix. \u00a0It also sets a Custom Property on the server. With the Custom Property set, you could create a <a href=\"https:\/\/www.poweradmin.com\/blog\/have-you-tried-dynamic-server-lists\/\">Dynamic Group that will automatically contain all of the servers that need the HotFix<\/a>.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/dynamic-server-list-needs-ms17-010-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5132\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/dynamic-server-list-needs-ms17-010-1-1024x594.png\" alt=\"list of servers needing MS17-010 HotFix\" width=\"1024\" height=\"594\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/dynamic-server-list-needs-ms17-010-1-1024x594.png 1024w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/dynamic-server-list-needs-ms17-010-1-300x174.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/dynamic-server-list-needs-ms17-010-1-768x446.png 768w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/dynamic-server-list-needs-ms17-010-1.png 1106w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/a><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">With the Dynamic Server List in place, you can create a Dynamic Group to easily see the servers that need to be updated.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-group.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5129\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-group-300x127.png\" alt=\"Needs MS17-010 patch group\" width=\"300\" height=\"127\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-group-300x127.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-group.png 373w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Finally, you can also run an Inventory Details\u00a0report to get a list of affected server.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-report.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5130 size-full\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-report.png\" alt=\"\" width=\"818\" height=\"305\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-report.png 818w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-report-300x112.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2017\/05\/needs-ms17-010-patch-report-768x286.png 768w\" sizes=\"auto, (max-width: 818px) 100vw, 818px\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you need to check on the status of your applied updates and quickly. With news of the WannaCrypt\/WannaCry Ransomware spreading via the MS17-010\u00a0vulnerability around the globe it\u2019s a good idea to double check that all your updates are applied correctly. \u00a0 The following is a quick PowerShell Execute Script monitor that you can add [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":5135,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,13,8],"tags":[],"class_list":["post-5114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cryptolocker","category-pc-security","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/5114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=5114"}],"version-history":[{"count":5,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/5114\/revisions"}],"predecessor-version":[{"id":5140,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/5114\/revisions\/5140"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/5135"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=5114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=5114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=5114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}