BendyBear Is a Next-Gen Shellcode Featuring Custom Cryptographic Routines

By Bill Toulas / February 10, 2021

Researchers of Unit42 (Palo Alto) have analyzed the BendyBear malware code to figure out how it works, what it can do, how versatile it is, and in what ways it attempts to hide itself or its activities from security solutions. The particular sample analyzed by the team of researchers is the same that was used in the 2020 attacks against the Taiwanese government and corporate entities, and which was shared by the country’s Ministry of Justice Investigation Bureau.

In August 2020, when these attacks took place, the fingers were pointed at the Chinese state. Indeed, the researchers now confirm that the particular malware is used by the “BlackTech” cyber-espionage group, which has been confirmed to have ties with China's government.

The x64 shellcode of the analyzed sample is a stage-zero malware meant to help the actors in the fetching and planting of a more robust payload from the C2. For a shellcode, the 10,000 bytes of BendyBear make it extraordinarily large, so here’s what it achieves through size and complexity:

Source: Unit42

In summary, BendyBear ensures that all functions and data transfer processes are taking place behind strong encryption, significantly lowering the chances of detection by network security solutions. Considering that the nasty piece of malware features sophisticated anti-analysis techniques like modified RC4 encryption, signature block verification, and polymorphic code, it actually appears smaller than expected, so it’s pretty lean and optimized.

Compared to the “WaterBear,” which was used previously by the same group of actors, BendyBear is lighter, features the additional encryption of XOR, and is naturally less dangerous on its own since it's a stage-0 malware. WaterBear is a stage-2 implant with many capabilities, including network traffic filtering, process hiding, and API hooking.

For a better user experience we recommend using a more modern browser. We support the latest version of the following browsers: For a better user experience we recommend using the latest version of the following browsers: