China-linked APT UNC3886 used VMware ESXi Zero-Day

Pierluigi Paganini June 14, 2023

A China-linked APT group tracked as UNC3886 has been spotted exploiting a VMware ESXi zero-day vulnerability.

Mandiant researchers observed a China-linked cyberespionage group, tracked as UNC3886, exploiting a VMware ESXi zero-day vulnerability tracked as CVE-2023-20867.

“VMware Tools contains an Authentication Bypass vulnerability in the vgauth module.” reads the advisory published by VMware. “A fully compromised ESXi host can force VMware Tools to fail to authenticate host-to-guest operations, impacting the confidentiality and integrity of the guest virtual machine.”

Researchers from Mandiant first detailed the activity of the group in September 2022 when they discovered a novel malware persistence technique within VMware ESXi Hypervisors.

The technique was used by malware authors to achieve administrative access within VMware ESXi Hypervisors and take over vCenter servers and virtual machines for Windows and Linux.

The highly targeted and evasive nature of this attack leads the experts into believing that the attack was carried out for cyberespionage purposes by a China-linked actor tracked as UNC3886.

In the attack investigated by Mandiant in September 2022, threat actors relied on malicious vSphere Installation Bundles (“VIBs”) to install two backdoors on the ESXi hypervisors, tracked as VIRTUALPITA and VIRTUALPIE. VIBs are collections of files that are designed to manage virtual systems, they can be used to create startup tasks, custom firewall rules, or deploy custom binaries upon the restart of an ESXi machine.

Further investigation conducted by Mandiant revealed additional techniques used by the group UNC3886 used to target multiple organizations avoiding EDR solutions. 

The cyberespionage group was observed harvesting credentials for service accounts from a vCenter Server for all connected ESXi hosts from the embedded vPostgreSQL server built into vCenter Server Appliance.  The threat actors are exploiting the zero-day vulnerability CVE-2023-20867 to execute privileged commands across Windows, Linux, and PhotonOS (vCenter) guest VMs without authentication of guest credentials from a compromised ESXi host and no default logging on guest VMs. 

The CVE-2023-20867 flaw is exclusively exploitable by an attacker with root access to the ESXi server.

Then the attackers deploy backdoors on ESXi hosts using an alternative socket address family, use VMCI, for lateral movement and maintain persistence.

In recent attacks, Chinese hackers were also spotted modifying and disabling logging services on compromised systems.

UNC3886 VMware Esxi zero-day

“Mandiant previously noted in 2022 that it did not identify evidence of a CVE being exploited during past investigations. As investigations into UNC3886 activity continued in 2023, Mandiant discovered that the attacker utilized a zero-day vulnerability, CVE-2023-20867, to execute commands and transfer files to and from guest VMs from a compromised ESXi host without the need for guest credentials.” reads the analysis published by Mandiant. “Additionally, the use of CVE-2023-20867 does not generate an authentication log event on the guest VM when commands are executed from the ESXi host.”

Mandiant observed the group UNC3886 using of multiple VMCI backdoors deployed as malicious VIBs on ESXi hosts. 

Once the attackers opened a communication channel between guest and host they were able to use new means of persistence to regain access to a backdoored ESXi host as long as a backdoor is deployed and the attacker gains initial access to any guest machine.

Then the malware can bypass network segmentation needed to access the ESXi host and most security reviews for open listening ports and odd NetFlow behavior.

“UNC3886 continues to target devices and platforms that traditionally lack EDR solutions and make use of zero-day exploits on those platforms. UNC3886 continues to present challenges to investigators by disabling and tampering with logging services, selectively removing log events related to their activity.” concludes the report. “The threat actors’ retroactive cleanup performed within days of past public disclosures on their activity indicates how vigilant they are.”

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, UNC3886)

you might also like

leave a comment