MoonBounce UEFI implant used by spy group sheds light on firmware security


1 credit

Researchers have uncovered a stealth UEFI rootkit that is being used in highly targeted campaigns by a notorious Chinese cyber-espionage group with alleged government ties.

The group is known to have used supply chain software attacks in the past. Dubbed MoonBounce by Kaspersky Lab researchers, the implant’s goal is to inject a malicious driver into the Windows kernel during boot stages, providing attackers with a high level of persistence and stealth.

Although MoonBounce is not the first UEFI rootkit found in the wild – LoJax, MosaicRegressor are two examples – these types of implants are not common as they require knowledge of low-level firmware programming. They are usually found in the arsenal of sophisticated and well-resourced attack groups.

What is a UEFI rootkit?

UEFI (Unified Extensible Firmware Interface) is the modern replacement for BIOS. In fact, the terms are still used interchangeably in many cases, as most modern BIOSes follow the UEFI standard and specifications.

Firmware is stored on a memory chip called flash SPI which is soldered onto the motherboard and contains the code needed to initialize all other hardware components and configure them before execution is passed to the bootloader code which starts the main operating system and its kernel.

UEFI contains various drivers that are used to communicate with other chips on the motherboard as well as with the processor and other peripherals. Getting malicious code running in such an early initialization phase of a device is extremely powerful because there is no antivirus or intrusion detection solution that runs at this level.

Additionally, operating system security features, such as driver digital signature verification, have not yet been initialized and can be disabled or bypassed.

UEFI rootkits are essentially one step ahead and in a privileged position over most other defenses found on a typical computer. They can be difficult to detect and may even prevent normal UEFI updates. Researchers recently discovered a similar low-level implant that infects the Baseband Management Controller (BMC) firmware of HPE servers and operates on similar principles.

Boot-level rootkits are the reason the PC industry has added security features to firmware over the past 10 years. For example, UEFI has SecureBoot, which relies on public key cryptography to verify that all code loaded during the boot process – from UEFI drivers and applications to the operating system boot loader and system kernel. operation – has been digitally signed by a trusted party. Various regions of UEFI memory must remain read-only or non-executable.

However, although UEFI is a standard, PC manufacturers maintain their own custom implementations for their devices. This means that the UEFI firmware of a computer from one vendor will be slightly different from the UEFI firmware of a computer from another manufacturer.

Vulnerabilities have been identified over the years in various vendors’ UEFI firmware implementations that could allow attackers to bypass UEFI security features. That’s why it’s also important to maintain the ability to easily deploy UEFI updates from inside the operating system and keep firmware up-to-date.

How does MoonBounce work?

MoonBounce was found in a UEFI component called CORE_DXE, where DXE stands for Core Execution Environment. This component initializes data structures and function interfaces which are then called by other DXE drivers. The attackers added malicious shellcode to the top of the CORE_DXE image, then made code changes to hook some legitimate function calls and hijack their execution to their shellcode.

“Note that at the time of writing, we lack sufficient evidence to trace how the UEFI firmware was infected in the first place,” Kaspersky researchers said in their report.

“The infection itself, however, is believed to have occurred remotely. Whereas previous UEFI firmware compromises (i.e., LoJax and MosaicRegressor) have manifested themselves in DXE driver additions to the overall firmware picture on the SPI flash, the current case features a much more subtle and stealthy technique where an existing firmware component is modified to change its behavior.”

This type of modification implies that the attackers had access to the original firmware image. This can be achieved if the attackers had remote access to the machine and administrative privileges to extract and flash the firmware.

Once executed, the malicious UEFI shellcode injects a malicious driver into the early stages of Windows kernel execution and this driver then injects user-mode malware into the svchost.exe process once the operating system is up and running. The user-mode malware is a loader that accesses a hard-coded command-and-control server to download and execute additional payloads, which researchers have not yet been able to retrieve.

Kaspersky researchers said they have identified MoonBounce on only one victim machine so far, so it’s hard to say how widespread its use is. However, this is likely part of a highly targeted cyber espionage campaign.

Researchers have found additional malware on other machines on the same network, including one called ScrambleCross or SideWalk that has been documented in the past and attributed to a Chinese cyber-espionage group known by various names, including APT41, Barium, or Winnti.

Who is APT41?

APT41 is considered a cyber espionage group linked to the Chinese government. It has been operating since at least 2012 and has targeted organizations in many industries for intelligence gathering.

However, the group is also known to have launched financially motivated attacks on the online gambling industry which do not appear to correspond to a state-connected interest, so they may be acting as a contractor rather than a team within an intelligence agency.

In September 2020, the US Department of Justice released indictments against three Chinese nationals and two Malaysian nationals in connection with the APT41 attacks. Three of them were involved in running a company called Chengdu 404 Network Technology which allegedly served as a front company for the group’s activities.

APT41 uses an arsenal of over 46 different malware families and tools as well as sophisticated techniques such as software supply chain attacks. One example is the 2017 attack on CCleaner that resulted in the distribution of poisoned copies of the popular utility to 2.2 million users. The group is also believed to be responsible for ShadowPad, a software supply chain attack that resulted in the distribution of malicious versions of a commercial enterprise server management tool called Xmanager.

“As a security measure against this attack and others like it, it is recommended to update the UEFI firmware regularly and check that BootGuard, if present, is enabled,” the Kaspersky researchers said.

“Similarly, enabling Trusted Platform Modules, in case corresponding hardware is supported on the machine, is also advised. On top of everything, a security product that has image visibility firmware should add an extra layer of security, alerting the user to a potential compromise if it occurs.”

Join the newsletter!

Error: Please verify your email address.


Comments are closed.