SBN

YiBackdoor: A New Malware Family With Links to IcedID and Latrodectus

IntroductionZscaler ThreatLabz has identified a new malware family that we named YiBackdoor, which was first observed in June 2025. The malware is particularly interesting because it contains significant code overlaps with IcedID and Latrodectus. Similar to Zloader and Qakbot, IcedID was originally designed for facilitating banking and wire fraud. However, IcedID has since been repurposed to provide initial access for ransomware attacks. The exact connection to YiBackdoor is not yet clear, but it may be used in conjunction with Latrodectus and IcedID during attacks. YiBackdoor enables threat actors to collect system information, capture screenshots, execute arbitrary commands, and deploy plugins. Key TakeawaysIn June 2025, ThreatLabz identified a new malware family that we have named YiBackdoor, which may be used to facilitate initial access for ransomware attacks.YiBackdoor shares a considerable amount of code with Latrodectus and IcedID, including a unique encryption algorithm.YiBackdoor contains code to hinder analysis and identify virtual environments to evade malware sandbox detection.YiBackdoor is able to execute arbitrary commands, collect system information, capture screenshots, and deploy plugins that dynamically expand the malware’s functionality.ThreatLabz has observed limited deployments of YiBackdoor, which may indicate that the malware is currently in a development or testing phase.Technical AnalysisIn this section, the features and capabilities of YiBackdoor are described along with the code similarities with IcedID and Latrodectus.ANALYST NOTE: YiBackdoor generates and uses pseudo-random values at different stages (e.g. for generating the registry persistence value name). The malware implements custom algorithms for deriving random values, which are primarily based on the bot ID (used as a seed) combined with an implementation of Microsoft’s Linear Congruential Generator (LCG). Since not all pseudo-random values are generated using a single method, ThreatLabz reversed each function and ported them to Python individually. To ensure consistency and clarity throughout this blog, the random values that are referenced can be derived using the Python script available in the ThreatLabz GitHub repository.Anti-analysisYiBackdoor includes a limited set of anti-analysis techniques with most of them targeting virtualized environments, and by extension, malware sandboxes. The malware employs the following anti-analysis methods:Dynamically loads Windows API functions by walking the loaded modules list, computing an ROR-based hash for each function name, and comparing the results with expected values to identify specific Windows API functions.YiBackdoor utilizes the CPUID instruction with the parameter 0x40000000 to retrieve hypervisor information. The result is then compared to values that match known hypervisors, including the following:VMWareXenKVMVirtual BoxMicrosoft Hyper-VParallelsDecrypts strings at runtime by pushing an encrypted string onto the stack, which is then decrypted by performing an XOR operation with a 4-byte key (that is unique for each encrypted string).Measures the execution time of a code block to determine if the host is running on a hypervisor. Specifically, YiBackdoor begins by calling the Windows API function SwitchToThread followed by a call to the instruction rdtsc. Next, YiBackdoor calls the CPUID instruction, which triggers a VM exit, and then calls rdtsc again to calculate the time taken to execute the CPUID instruction. Once the time has been calculated, YiBackdoor calls the rdtsc instruction two more times and calculates the execution time again. This process is repeated 16 times and the final calculated value must be greater than 20 to bypass the detection. This behavior can be reproduced using the following code example.[[nodiscard]] bool isHyperVisor()
{
uint64_t timer1 = 0;
uint64_t timer2 = 0;
int loop_counter = 16;
int cpuInfo[4] = { 0 };
while (loop_counter)
{
SwitchToThread();
uint64_t first_rdtsc_timer_value = __rdtsc();
__cpuid(cpuInfo, 1);
timer1 += __rdtsc() – first_rdtsc_timer_value;
SwitchToThread();
uint64_t second_rdtsc = __rdtsc();
uint64_t third_rdtsc = __rdtsc();
timer2 += ((third_rdtsc bytearray:
decrypted_config = bytearray()
for i in range(len(data)):
x = i % len(key)
y = (i + 1) % len(key)
cipher = key[x] + key[y] cipher = (cipher ^ data[i]) & 0xFF
decrypted_config.append(cipher)
rotation_x = ror(n=key[x] >> (key[y] & 7), bits=key[x] — ( 32 – ( key[y] & 7) ), max_bits=32) & 0xFFFFFFFF
rotation_x += 1
key[x] = rotation_x
rotation_y = ror(n=key[y] — ( rotation_x & 7), bits=key[y] bytearray:
temp_val = key[y:y + 4] temp_val = int.from_bytes(temp_val, byteorder=”little”)
rot_val = (temp_val & 7) & 0xFF
temp_val = key[x:x + 4] temp_val = int.from_bytes(temp_val, byteorder=”little”)
temp_val = ror(temp_val, rot_val) & 0xFFFFFFFF
temp_val += 1
temp_val &= 0xFFFFFFFF
temp_val_x = temp_val.to_bytes(4, byteorder=”little”)
rot_val = (temp_val & 7) & 0xFF
temp_val = key[y:y + 4] temp_val = int.from_bytes(temp_val, byteorder=”little”)
temp_val = ror(temp_val, rot_val) & 0xFFFFFFFF
temp_val += 1
temp_val &= 0xFFFFFFFF
temp_val_y = temp_val.to_bytes(4, byteorder=”little”)
temp_key = key[:x] + temp_val_x + key[x + 4:] temp_key = temp_key[:y] + temp_val_y + temp_key[y + 4:] return temp_key
def crypt_plugin(data: bytes, key: int) -> bytes:
decrypted_plugin = [] for i in range(len(data)):
x = (i & 3)
y = ((i + 1) & 3)
c = key[y * 4] + key[x * 4] c = (c ^ data[i]) & 0xFF
decrypted_plugin.append(c.to_bytes(1, byteorder=”little”))
key = fix_key(key, x * 4, y * 4)
return b”.join(decrypted_plugin)YiBackdoor manages and parses any plugins by using the structures provided below.#pragma pack(push, 1)
struct struct_plugin_execution_info
{
uint32_t unknown_field;
uint32_t plugin_id;
uint8_t do_start_plugin;
char plugin_disk_name[16];
IMAGE_DOS_HEADER* plugin_memory_data;
};
#pragma pack(pop)
struct plugin
{
custom_string plugin_name;
void *plugin_entry_address;
void *plugin_data;
void *sizeof_plugin_data;
struct_plugin_execution_info *plugin_execution_info;
void *mapped_plugin_memory_address;
};
struct plugin_manager
{
plugin *plugins[1];
uint64_t number_of_plugins;
uint64_t max_allowed_plugins;
};Code similaritiesThreatLabz observed notable code overlaps between YiBackdoor, IcedID, and Latrodectus. IcedID is a malware family that consists of several different components such as a downloader (which has gone through various updates in the past), a main module backdoor, and a main module loader. These similarities are present in both critical and non-critical parts of YiBackdoor’s code.The code similarities between YiBackdoor, IcedID, and Latrodectus are the following:The use of identical alphabet charsets to derive bot-specific randomized strings. The identified charsets are aeiou and abcedfikmnopsutw.The format (Base64) and length (64-bytes) of YiBackdoor’s configuration decryption key matches the RC4 keys used by Latrodectus to encrypt its network traffic.YiBackdoor hooks the Windows API function RtlExitUserProcess as part of the remote code injection process. This code injection technique is quite uncommon and resembles IcedID’s extensive use of this Windows API.Although YiBackdoor uses a different approach to calculate the bot ID, part of the process involves the Fowler–Noll–Vo (FVN) hashing algorithm, which is also present in the codebase of IcedID and Latrodectus.YiBackdoor includes a Windows GUID list that is not used during execution. The exact same array of GUIDs is present and utilized in both IcedID and Latrodectus. Hence, the GUIDs in YiBackdoor may be code remnants from the latter two malware families.The most significant code similarity is the decryption routines for the configuration blob and the plugins. The plugins’ decryption routine is identical to the algorithm previously used by IcedID to decrypt the core payload and configuration data. The figure below shows the algorithm, comparing the decryption routine from a (GZIP) IcedID downloader sample and the plugins’ decryption routine found in YiBackdoor. Furthermore, the algorithm used to decrypt YiBackdoor’s embedded configuration blob is similar to the aforementioned decryption routine found in IcedID samples.Figure 2: Comparison of YiBackdoor and IcedID GZIP decryption routines.
ConclusionIn summary, YiBackdoor is a newly discovered backdoor that has been active since at least June 2025. Based on code similarities observed by ThreatLabz during analysis, ThreatLabz assesses with medium to high confidence that there is a connection between the developers of YiBackdoor, IcedID, and Latrodectus. YiBackdoor by default has somewhat limited functionality, however, threat actors can deploy additional plugins that expand the malware’s capabilities. Given the limited deployment to date, it is likely that threat actors are still developing or testing YiBackdoor.Zscaler CoverageThe Zscaler Cloud Sandbox has been successful in detecting this campaign. The figure below depicts the Zscaler Cloud Sandbox, showing detection details for YiBackdoor.Figure 3: Zscaler Cloud Sandbox report for YiBackdoor.Indicators Of Compromise (IOCs) IndicatorDescriptionaf912f6f4bea757de772d22f01dc853fc4d7ab228dc5f7b7eab2a93f64855fbeYiBackdoor SHA256http://136.243.146[.]46:8898YiBackdoor C2