Deploy Intel Meltdown-Spectre patches with Ivanti Automation

Introduction:
The beginning of 2018 has been all about the Intel Meltdown and Spectre vulnerabilities…….and cryptocurrency. These vulnerabilities take advantages of features that modern processors have to operate more efficiently. These features are ‘out-of-order execution’ (Intel Meltdown) and ‘branch prediction’ (Spectre).

Out-of-order execution allows a processor to execute instructions in a non-sequential manner, which will result in less time spent idle. Branch prediction is a feature that predicts what instructions will be executed and where. So in a way it will execute some instructions before they even are received from the running application.

There are several patches/updates that need to be done to mitigate these vulnerabilities. These range from new BIOS/UEFI updates, Firmware updates, driver updates and of course: patches.
There are patches from Microsoft, Red Hat, CentOS, VMware, etc. Basically just about every IT administrator has some work ahead of him/her (or he/she is already done and drinking his/her earned beer). The focus of this blogpost is the patches from Microsoft.

Which Microsoft patches?
In long-running MS tradition there will be a load of different patches to cover the different versions of every (supported) Windows operating system. If you don’t include the ARM and Itanium processors you end up with the following list:

KB4056897 – Windows 7 SP1 (x64 / x86) & Windows Server 2008 R2 (x64)
KB4056898 – Windows 8.1 (x64 / x86) & Windows Server 2012 R2 (x64)
KB4056893 – Windows 10 build 1507 (x64 / x86)
KB4056888 – Windows 10 build 1511 (x64 / x86)
KB4056890 – Windows 10 build 1607 (x64 / x86) & Windows Server 2016 build 1607 (x64)
KB4056891 – Windows 10 build 1703 (x64 / x86)
KB4056892 – Windows 10 build 1709 (x64 / x86) & Windows Server 2016 build 1709 (x64)
(The server x64 versions also work for the corresponding client OS)

That’s right, no patches for Windows Server 2008 & 2012 and Windows 8.0. But shame on you if you are still running those. Check this page for more information:
https://support.microsoft.com/en-us/help/4072698/windows-server-guidance-to-protect-against-the-speculative-execution
According to Microsoft, these are patches for the Enterprise edition of Windows 7/8.1/10. I have not tested them on other editions (Professional, Home, etc.)

If you download all these updates for 64-bit as well as 32-bit you end up with 14 different files. Next up would be installing those files on all your machines. Sure, you could use Windows Server Update Services (WSUS) or System Center Configuration Manager (SCCM). But some organizations want to use a more direct approach.

Deployment with Ivanti Automation
So on to the point of this blogpost: Deploying these patches with Ivanti Automation. If you have the full version of Automation, you could add all patches as a resource and create a module with 14 ‘Microsoft Update’ tasks with the correct conditions. But this would lead to a severe case of repetitive strain injury and you would be unable to lift the aforementioned beer.
If your organization does not have the money for the full version or does not see the benefits of automation, you might be running the new PoSh edition of Ivanti Automation. This version only has the ‘Windows PowerShell Script’ task and the use of Resources is not supported.
That would mean you would need to create a script that calls the .msu file from a central share and use conditions to determine which version you would need to install.

Since I had some time to kill, I did exactly that. I wanted to make an Ivanti Automation module that works in the Full version as well as the PoSh version of Ivanti Automation. However, I wanted to keep it simple from an Automation point of view. So I created a script that checks which version of Windows you have and shows the correct update file for your system. The name of the update is then added to a module parameter for use in the next task, which will install the patch for you.
You can define if you want the machine to automatically reboot or not.
After that it will make the recommended registry changes. Use the module parameters when scheduling the module to define which machines should receive the registry changes. These registry settings will enable the actual vulnerability mitigation.

Beware that there are reports of a 30% performance hit after installing (and enabling) these patches.

How to import
Download the building block I have provided at the bottom of this post. Import it into your Ivanti Automation (Passkey is included in the zip-file) and it will ask you to provide a location (CIFS or SMB share) where it can find the patches. You would need to download all these patches for the systems you have and put them in that share. I have added download links to the list I provided earlier, so it should not be much of a hassle. After that just run it on all your affected systems.
For each patch I chose the cumulative update (when available) rather than the delta update, because I had some issues with dependencies on Windows Server 2016?

Keep in mind that this is not the only change you need to do to your systems to mitigate these vulnerabilities. This can be firmwares, drivers, configuration adjustments, etc. So be sure to read up about these vulnerabilities (which I thought was really interesting, because you can also learn a bit about how your processor approaches the instructions it receives) and check your vendors for any updates and recommendations.

Also check these sites for more information:
https://meltdownattack.com/
https://www.ivanti.com/blog/meltdown-spectre-need-know/
https://www.kb.cert.org/vuls/id/584653
https://support.microsoft.com/en-ca/help/4073757/protect-your-windows-devices-against-spectre-meltdown

I have added the scripts below for anyone who is just interested in the scripts and not the building block.

DISCLAIMER: And again, as with the other building blocks I have posted: This is just my take on it. I am not saying this is the best way to go in your situation. So be sure to make a list what needs to be done in your IT environment and make a plan for deployment.

Building block:



PowerShell scripts:
Determine correct Intel Meltdown/Spectre update



Install Intel Meltdown/Spectre update



Install Intel Meltdown/Spectre registry settings

968 total views, 4 views today

1 thought on “Deploy Intel Meltdown-Spectre patches with Ivanti Automation

  1. Pingback: Scan Spectre and Meltdown Compliancy with Ivanti/ RES Automation - Workspace Guru

Leave a Reply

Your email address will not be published. Required fields are marked *