BendyBear
- Type
- Downloader
- Capabilities
- ReconnaissanceDefense evasionPost exploitation
- Platforms
- Windows
BendyBear is a sophisticated Windows x64 stage-zero shellcode implant associated with the WaterBear malware lineage and linked to BlackTech, a China-aligned cyber-espionage group. Its primary role is to establish covert command-and-control communications and download a more capable follow-on implant for in-memory execution. BlackTech operations have historically targeted organizations in East Asia as well as entities in the United States and Japan, including government, media, telecommunications, technology, electronics, industrial, and related sectors.
BendyBear is notable for unusually large and complex shellcode that incorporates multiple stealth and anti-analysis features. It uses runtime decryption of internal function blocks with XOR-based protection, byte randomization, and polymorphic self-modifying behavior to hinder static analysis and signature-based detection. It also performs timing-based and debugger-related checks, including use of GetTickCount and inspection of process environment structures, to identify analysis environments. The implant dynamically resolves Windows API functions through shellcode API hashing and loads required libraries at runtime.
For host profiling and configuration, BendyBear can determine local system time and query Windows Registry data, including values under the current user console configuration, to derive operational parameters. For network communications, it uses a custom protocol over TCP port 443 designed to blend with common encrypted traffic. Its command-and-control channel employs modified RC4-style encryption together with XOR-encrypted chunks and per-connection session keys, providing authenticated and obfuscated communications.
BendyBear’s supported tasking is narrowly focused on payload retrieval. It downloads encrypted payload chunks from command and control, decrypts them in memory, validates the retrieved content as a Windows DLL, and then loads the module directly in memory in a manner intended to reduce normal module-tracking visibility. This makes BendyBear best characterized as an advanced downloader-stage implant used to bootstrap more feature-rich espionage tooling.
Associated threat actors
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Techniques & procedures
19 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
A sophisticated hacking group tied to the government of China is exploiting routers in attacks on a variety of organizations... The group specifically targets “branch routers” — smaller appliances used at more remote branch offices to connect to a corporate headquarters.
Execution
1 technique
Execution
[BendyBear](https://attack.mitre.org/software/S0574) can load and execute modules and Windows Application Programming (API) calls using standard shellcode API hashing.(Citation: Unit42 BendyBear Feb 2021)
Persistence
1 technique
Persistence
Specifically, upon gaining an initial foothold into a target network and gaining administrator access to network edge devices, BlackTech cyber actors often modify the firmware to hide their activity across the edge devices to further maintain persistence in the network.
Stealth
6 techniques
Stealth
BitPaymer has used dynamic API resolution to avoid identifiable strings within the binary, including RegEnumKeyW.
Transmits payloads in modified RC4-encrypted chunks... Table 1 ... Payloads in modified RC4-encrypted chunks ... T1027.002: Obfuscated Files or Information: Software Packing
[BendyBear](https://attack.mitre.org/software/S0574) has encrypted payloads using RC4 and XOR.(Citation: Unit42 BendyBear Feb 2021)
BendyBear changes its runtime footprint during code execution to evade signature-based defenses.(Citation: Unit42 BendyBear Feb 2021)
[BendyBear](https://attack.mitre.org/software/S0574) has decrypted function blocks using a XOR key during runtime to evade detection.(Citation: Unit42 BendyBear Feb 2021)
[BendyBear](https://attack.mitre.org/software/S0574) can check for analysis environments and signs of debugging using the Windows API <code>kernel32!GetTickCountKernel32</code> call.(Citation: Unit42 BendyBear Feb 2021)
Defense Impairment
1 technique
Defense Impairment
Specifically, upon gaining an initial foothold into a target network and gaining administrator access to network edge devices, BlackTech cyber actors often modify the firmware to hide their activity across the edge devices to further maintain persistence in the network.
Credential Access
1 technique
Credential Access
Specifically, upon gaining an initial foothold into a target network and gaining administrator access to network edge devices, BlackTech cyber actors often modify the firmware to hide their activity across the edge devices to further maintain persistence in the network.
Discovery
4 techniques
Discovery
[BendyBear](https://attack.mitre.org/software/S0574) can query the host's Registry key at <code>HKEY_CURRENT_USER\Console\QuickEdit</code> to retrieve data.(Citation: Unit42 BendyBear Feb 2021)
The shellcode begins by locating the target’s Process Environment Block (PEB) to check if it’s currently being debugged... This routine is performed 52 times... Table 1 ... T1082: System Information Discovery
[BendyBear](https://attack.mitre.org/software/S0574) has the ability to determine local time on a compromised host.(Citation: Unit42 BendyBear Feb 2021)
[BendyBear](https://attack.mitre.org/software/S0574) can check for analysis environments and signs of debugging using the Windows API <code>kernel32!GetTickCountKernel32</code> call.(Citation: Unit42 BendyBear Feb 2021)
Command and Control
7 techniques
Command and Control
Many entries describe XOR, XOR/ADD, bitwise NOT and XOR, ROR plus XOR, hexadecimal encoding after encryption, and custom encoding/obfuscation of HTTP traffic or beacons.
[BendyBear](https://attack.mitre.org/software/S0574) has used byte randomization to obscure its behavior.(Citation: Unit42 BendyBear Feb 2021)
[BendyBear](https://attack.mitre.org/software/S0574) is designed to download an implant from a C2 server.(Citation: Unit42 BendyBear Feb 2021)
[BendyBear](https://attack.mitre.org/software/S0574) has used a custom RC4 and XOR encrypted protocol over port 443 for C2.(Citation: Unit42 BendyBear Feb 2021)
The content is a catalog of malware and threat groups that encrypt command-and-control communications using algorithms such as DES, AES, RC4, XOR, Blowfish, RSA, Camellia, RC2, RC6, and custom ciphers.
[BendyBear](https://attack.mitre.org/software/S0574) communicates to a C2 server over port 443 using modified RC4 and XOR-encrypted chunks.(Citation: Unit42 BendyBear Feb 2021)
Obscures its connection protocol by connecting to the C2 server over a common port (443)... Table 1 ... Command and Control ... T1573.002: Encrypted Channel: Asymmetric Cryptography
Observables
9 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
20 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.