Featured image
Truesec pattern
Blog
2021-12-11
A Truesec investigation

Log4j - How To Secure Your VMware Horizon, UAG and vCenter Servers Against the Log4Shell vulnerability (CVE-2021-44228)

Log4Shell is a critical (10.0 CVSS) vulnerability that affects thousands of products running Apache Log4j. VMware vCenter Server, Horizon and VMware UAG (Unified Access Gateway) are some of them and since Horizon/UAG are sometimes reachable from the entire internet, they will most likely get attacked if they're not urgently secured.
Anders Olsson
4 min readAnders Olsson
Share

This blog post is a work in progress, since new information is constantly getting added. At the time of writing, very few VMware patches have been released, but most products have supported workarounds available.

(Update 2021-12-11, 21:00 CET: Workaround for UAG has just been announced, see link below)

(Update 2021-12-12, 17:00 CET: Added information about a workaround for vCenter Server)

(Update 2021-12-17, 10:30 CET: Added information about Horizon patches being released, and the updated information about vCenter patching)

Step 1

Identify which UAG or Horizon components are reachable from the internet, and start with those. Consider cutting them off from the internet, both for incoming and outgoing traffic, until the patch/workaround is fully implemented.

Patches have now been released. Upgrade to the following versions, if you can:

  • Horizon 8 version 2111
  • Horizon 7 versions 7.13.1, 7.10.3

If you can't upgrade, implement the latest workarounds: Workaround for UAG: VMware KB #87092. Workaround for Horizon Server: VMware KB #87073

After securing the internet-accessible servers, follow the instructions above and implement the patch/workaround for the remaining Horizon server(s) and then the Horizon agents. The workaround has to be implemented on all agents, including the master image(s) used for cloning.

Step 2

After that, proceed with the rest of your VMware systems running Log4j: vCenter Server, WS1 Access / Identity Manager, Log Insight, etc.

The workaround for vCenter Server is available at: VMware KB #87081. Note that the workaround needs to be re-run to also cover CVE-2021-45046! Download and run the updated script if you haven't already done it.

For vCenter Server, there is a Python script available that automates the workaround changes: VMware KB #87088 (VCSA only).

vCenter Server for Windows also has a workaround released: VMware KB #87096

The remaining workarounds can be found in the VMSA-2021-0028 main article, which is updated as new products/patches/workarounds get added. The workarounds are slightly differently implemented for each VMware product, but they were initially mostly based on adding the option '-Dlog4j2.formatMsgNoLookups=true' to the Log4j configuration, but has since been updated to instead delete or disable the vulnerable component .

Monitor the VMSA-2021-0028 article for information about patches being released. When the patches become available, make sure you test and install them. A tested patch is usually better than a temporary workaround, especially now that some workarounds have been deemed to not fully protect against all variants of attacks (CVE-2021-45046 (mitre.org)).

Take this opportunity to perform the necessary steps to prevent your ESXi hosts from executing ransomware: Secure Your VMware ESXi Hosts Against Ransomware

Step 3

Check the rest of your environment for vulnerable systems using Log4j and upgrade/patch/mitigate them. Start with the systems that are reachable from the internet. Check with your other software vendors regarding whether they are vulnerable or not. A good starting list of vendor articles can be found at https://gist.github.com/SwitHa...

Watch our video 'What You Need to Know About the Log4Shell / Apache Log4j Injection Vulnerability (CVE-2021-44228)':


Step 4

Check for possible compromise and malicious activity in your environment. Where are your Horizon components placed, and where could an attacker have gone from there if they compromised those servers/clients? Check for suspicious connections to the internet, lateral movement, processes, downloads, and other Indicators of Compromise using your EDR and logs. More details are available in our blog post: Log4j / Log4Shell Explained - All You Need to Know

Contact us if you need help with forensics or incident response! The contact details are on this page: Current cyber attack? | Get instant incident response - Truesec

References

More information about which VMware products are vulnerable to Log4Shell, their workarounds, and patches is being added to the advisory and FAQ:

Note that there is also a list of VMware products that are *not* affected by Log4Shell: VMware KB #87068. At the time of writing, the following products are some of the ones on the list:

  • VMware vSphere ESXi
  • VMware vCloud Director
  • VMware NSX Advanced Load Balancer (Avi)
  • VMware Software-Defined WAN (SD-WAN)
  • VMware Tanzu Kubernetes Grid
  • VMware App Volumes
  • VMware ThinApp
  • Dynamic Environment Manager (DEM)
  • Workspace ONE Unified Endpoint Management (UEM)
  • VMware Workstation
  • VMware Fusion


Good Luck!

Stay ahead in cyber

Join 1000+ other cyber professionals and get our regular updates with cyber knowledge and technical know-how.