惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
H
Hacker News: Front Page
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cisco Blogs
P
Palo Alto Networks Blog
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
S
Schneier on Security
The Hacker News
The Hacker News
Cyberwarzone
Cyberwarzone
T
Tenable Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tailwind CSS Blog
S
Secure Thoughts
N
Netflix TechBlog - Medium
T
The Exploit Database - CXSecurity.com
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Help Net Security
Help Net Security
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
L
LangChain Blog
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
Hacker News: Ask HN
Hacker News: Ask HN
www.infosecurity-magazine.com
www.infosecurity-magazine.com
有赞技术团队
有赞技术团队
P
Privacy International News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
Recorded Future
Recorded Future
The Last Watchdog
The Last Watchdog
G
Google Developers Blog
T
Threatpost
小众软件
小众软件
S
Securelist
Recent Commits to openclaw:main
Recent Commits to openclaw:main
O
OpenAI News

Security Research | Blog

ClaudeFix: Shared Claude Chats Meet ClickFix | Zscaler Why Do F1 Teams Need Cybersecurity, and What Is AI’s Role? Indirect Prompt Injection Targets AI Agents | ThreatLabz Splunk Enterprise RCE (CVE-2026-20253) | ThreatLabz Edgecution: Malicious Edge Extension Backdoor | ThreatLabz SmartApeSG Supply Chain Attack Targets Okendo | ThreatLabz AI Generated ClickFix Attack Delivers SmartRAT | ThreatLabz What the ThreatLabz 2026 Phishing and Initial Access Report Means for the Public Sector | Zscaler Shai-Hulud: Miasma, Hades, & AI Scanner Evasion | ThreatLabz Zscaler ThreatLabz 2026 Phishing and Initial Access Report Technical Analysis of MLTBackdoor | ThreatLabz When the Scanner Starts Thinking: Learnings from Mythos & GPT 5.5 Cyber in Security Testing | Zscaler OpenClaw Skill Distributes Remcos & GhostLoader | ThreatLabz Tropic Trooper: AdaptixC2 + Custom Beacon | ThreatLabz Do not delete blog (testing) | Zscaler Payouts King Takes Aim at the Ransomware Throne | ThreatLabz The Alibaba Incident and Why Zero Trust Matters More Than Ever In-Memory Loader Drops ScreenConnect | ThreatLabz Supply Chain Attacks Surge in March 2026 | ThreatLabz Claude Code Leak: Critical AI Security Threat 2026 Latest Xloader Obfuscation Code & C2 Protocol | ThreatLabz CVE-2026-20131: Analysis of FMC RCE | ThreatLabz Technical Analysis of SnappyClient | ThreatLabz China-nexus Group Targets Arabian Gulf Region | ThreatLabz Middle East Conflict Fuels Cyber Attacks | ThreatLabz Dust Specter APT Targets Gov’t Officials in Iraq | ThreatLabz APT37 Adds New Tools For Air-Gapped Networks | ThreatLabz GuLoader Malware Obfuscation Techniques Analyzed GuLoader Obfuscation Analysis | ThreatLabz Technical Analysis of Marco Stealer | ThreatLabz Latest Public Sector AI Adoption Trends: What Government, Healthcare, and Education Security Teams Need to Know | Zscaler Operation Neusploit: APT28 Uses CVE-2026-21509 | ThreatLabz 7 Predictions for 2026 | Zscaler SHEETCREEP, FIREPOWER, and MAILCREEP Analysis | ThreatLabz AI is Now Default Enterprise Accelerator: Takeaways from ThreatLabz 2026 AI Security Report | Zscaler GOGITTER, GITSHELLPAD, and GOSHELL Analysis | ThreatLabz Malicious NPM Packages Deliver NodeCordRAT | ThreatLabz What’s Powering Enterprise AI in 2025: ThreatLabz Report Sneak Peek | Zscaler BlindEagle Deploys Caminho and DCRAT | ThreatLabz Technical Analysis of the BlackForce Phishing Kit | ThreatLabz React2Shell RCE Vulnerability (CVE-2025-55182) | ThreatLabz Shai-Hulud V2 Poses Risk to NPM Supply Chain | ThreatLabz Technical Analysis of Matanbuchus 3.0 | ThreatLabz In-Depth Analysis: Water Gamayun APT Multi-Stage Attack Uncovered CVE-2025-50165: Windows Graphics Component Flaw | ThreatLabz Mobile, IoT, and OT Risks Converge in the Public Sector | Zscaler Industry Attacks Surge, Mobile Malware Spreads: The ThreatLabz 2025 Mobile, IoT & OT Report | Zscaler Zscaler Discovers Vulnerability in Keras Models Allowing Arbitrary File Access and SSRF (CVE-2025-12058) | Zscaler F5 Security Incident Advisory | Zscaler Under the Radar: How Non-Web Protocols Are Redefining the Attack Surface | Zscaler SEO Poisoning Targets Ivanti VPN: Credential Theft Alert Cisco Firewall and VPN Zero Day Attacks | ThreatLabz COLDRIVER Adds BAITSWITCH and SIMPLEFIX | ThreatLabz Technical Analysis of Zloader Updates | ThreatLabz Mitigating Risks from the Shai-Hulud NPM Worm | ThreatLabz Malicious PyPI Packages Deliver SilentSync RAT | ThreatLabz Technical Analysis of SmokeLoader Version 2025 | ThreatLabz Technical Analysis of kkRAT | ThreatLabz APT37: Rust Backdoor & Python Loader | ThreatLabz Anatsa’s Latest Updates | ThreatLabz Termncolor and Colorinal Explained | ThreatLabz GenAI Used to Impersonate Brazil’s Govt Websites | ThreatLabz Tracking Updates to Raspberry Robin | ThreatLabz Ransomware Surges, Extortion Escalates: ThreatLabz 2025 Ransomware Report | Zscaler China-nexus APT Targets the Tibetan Community | ThreatLabz CVE-2025-53770 | ThreatLabz Black Hat SEO Poisoning Search Engine Results For AI | ThreatLabz
YiBackdoor: Linked to IcedID and Latrodectus | ThreatLabz
ThreatLabz · 2025-09-23 · via Security Research | Blog

Technical Analysis

In 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-analysis

YiBackdoor 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:
    • VMWare
    • Xen
    • KVM
    • Virtual Box
    • Microsoft Hyper-V
    • Parallels
  • Decrypts 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 


It is worth noting that YiBackdoor stores the aforementioned information internally, but does not use the information or transmit it to the C2 server. As a result, the detection methods outlined above currently have no impact on the code’s behavior.

Initialization stage

There are several actions that YiBackdoor performs during the initialization phase including injecting code into a remote process and establishing persistence.

YiBackdoor first checks for existing instances of itself by attempting to create a mutex with a host-based name. If the mutex already exists, indicating another instance is active, YiBackdoor will terminate execution.

Code injection

Before proceeding to the core functionality, YiBackdoor ensures that it is running within an injected process. YiBackdoor determines this by checking whether its current memory address falls within the memory range of any loaded DLLs. If it does, YiBackdoor creates a new svchost.exe process and injects its code into it.

The injection begins with YiBackdoor allocating memory in the remote svchost.exe target process and copying its code into that new region. YiBackdoor patches the Windows API function RtlExitUserProcess with assembly code that pushes YiBackdoor’s entry point on the stack, which is then followed by a return instruction. Thus, when the RtlExitUserProcess function is called, the process execution flow will be redirected to the YiBackdoor’s entry point. Interestingly, the svchost.exe target process is created without any special flags (e.g., in a suspended state). However, YiBackdoor does have enough time to inject its code between the process creation and termination. Since the RtlExitUserProcess function is hooked, the malware’s code executes just as the target process is about to terminate. This injection technique may allow YiBackdoor to evade detection by some security products.

Persistence

After completing the code injection phase, YiBackdoor proceeds to establish persistence on the compromised host using the Windows Run registry key. YiBackdoor first copies itself (the malware DLL) into a newly created directory under a random name. Next, YiBackdoor adds regsvr32.exe malicious_path in the registry value name (derived using a pseudo-random algorithm) and self-deletes to hinder forensic analysis.

Backdoor configuration

YiBackdoor contains an embedded configuration stored in an encrypted state. The configuration blob is decrypted and initialized at runtime. The decryption algorithm uses a 64-byte string as the key, as shown in the decryption routine below.

def decrypt(data: bytes, key: bytes) -> 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] > ( rotation_x & 7), bits=key[y] 

The decrypted configuration data includes the following information:

  • A list of C2 servers (separated using a space delimiter) where each C2 server has a boolean flag to indicate if the requests should be in HTTP (false) or HTTPS (true). For instance, the entry 127.0.0.1:0 instructs YiBackdoor to communicate using HTTP to the C2 address 127.0.0.1.
  • Three strings that are used for deriving the TripleDES encryption/decryption keys and the  initialization vector (IV) during the network communication process.
  • Two integer values that YiBackdoor converts to numerical strings, which are used to construct the C2 URI.
  • An unknown string identifier, which could represent a campaign or botnet ID. In the sample analyzed by ThreatLabz, this value is set to the string test.

The configuration’s structure is provided below.

#pragma pack(push, 1)
struct configuration
{
 char C2s[300];
 char response_triple_des_key_table[192];
 char request_triple_des_key_table[192];
 char triple_des_iv[128];
 uint32_t uri1;
 uint32_t pad;
 uint32_t uri2;
 char botnet_id[64];
};
#pragma pack(pop)

ANALYST NOTE: Before decrypting the configuration data, YiBackdoor ensures that the encrypted configuration does not start with the hardcoded string “YYYYYYYYYY”. If a match is found, the embedded configuration data is considered corrupted and the execution stops. ThreatLabz has not been able to confirm the reason for this check yet. Moreover, two of the three configuration C2s are local IP addresses, which further supports the argument that YiBackdoor is still in a development or testing phase.

Network communication

Before initializing a network session with the C2, YiBackdoor derives the C2 URL by reading the following values from the decrypted configuration blob.

Thus, the C2 URL is structured as http(s)://C2/bot_id/uri1/uri2.

Next, YiBackdoor creates a JSON packet that contains the host’s system time (UTC format) and username. The JSON packet is then encrypted using the TripleDES encryption algorithm. The creation of encryption/decryption keys along with the IV is quite unique. The configuration blob includes three strings with each one of them used for deriving the encryption key, decryption key, and IV. However, YiBackdoor does not use their entire values. Instead, it uses the current day of the week as an offset to calculate the starting address of the target value. Using this approach, YiBackdoor manages to have dynamic (and different) encryption keys per day and as a result makes the network traffic more resilient against static-based signatures. This algorithm is shown in the figure below:

Network dynamic key derivation function for YiBackdoor.

Figure 1: Network dynamic key derivation function for YiBackdoor.

The encrypted output is then Base64-encoded and appended to the HTTP header X-tag, and sent in an HTTP GET request.

The C2 response decryption process is similar. YiBackdoor verifies the presence of the HTTP header X-tag and decrypts it. The decrypted header contains the same information that was included in the HTTP request. YiBackdoor then decrypts and parses the HTTP body data, which contains incoming commands, which are in a JSON format. 

Network commands

YiBackdoor supports the commands described in the table below.

Command Name

Command Parameters

Description

Systeminfo

None

Collects the following system information:

  • Windows version.
  • List of process names.
  • Network and miscellaneous system information by executing the system commands provided below.
    • chcp 65001
    • whoami /all
    • arp -a
    • ipconfig /all
    • net view /all
    • nltest /domain_trusts /all_trusts
    • net share
    • net localgroup
    • wmic product get name

screen

None

Takes a screenshot of the compromised host’s desktop.

CMD

  • Base64-encoded command line to execute.
  • Timeout value.

Executes a system shell command using cmd.exe.

PWS

  • Base64-encoded command line to execute.
  • Timeout value.

Executes a system shell command using PowerShell.

plugin

  • Plugin name.
  • Command data for the plugin to execute.

Passes a command to an existing plugin to execute based on its name and reports the result to the C2 server.

task

  • Base64-encoded and encrypted plugin data.

Initializes and executes a new plugin. If the plugin already exists, then reload the plugin using the data that was received.

Table 1: YiBackdoor network commands.

Note that the command names above use inconsistent casing (e.g., camel case, lowercase, and uppercase).

The structures (in C format) that YiBackdoor uses to parse both tasks received and network commands are shown below.

enum Command
{
 system_info = 0x3,
 screenshot = 0x4,
 execute_new_plugin = 0x5,
 execute_loaded_plugin = 0x8,
 execute_cmd = 0x9,
 execute_powershell = 0xA,
};
struct custom_string
{
 char *string;
 size_t size;
 size_t capacity;
};
#pragma pack(push, 1)
struct task_info
{
  uint32_t task_id;
  Command cmd_id;
  uint32_t unknown_ID;
  custom_string command_parameter;
  custom_string plugin_name;
  uint32_t  timeout_time;
};
#pragma pack(pop)


Command status

YiBackdoor reports the output of each command to the C2 by sending an HTTP POST request. Each command status packet is in a JSON format and includes the following information:

  • Task ID.
  • A boolean value that represents the execution status of the command.
  • The output of the command.

The reported output is summarized in the table below.

Network Command

Reported Information

Systeminfo

  • Collected system information.
  • A list of loaded plugins that include the ID and name of each plugin in the format plugin_name-ID.bin.

screen

  • Screenshot encoded in Base64 format.

task

  • A list of loaded plugins that include the ID and name of each plugin in the format plugin_name-ID.bin.

plugin

  • Output data resulting from executing a command within the specified plugin.

CMD/PWS

  • Output data resulting from executing a system shell command formatted in Base64.

Table 2:  YiBackdoor command status messages.

ANALYST NOTE: The task status for the network command ‘task’ is always set to true (success) regardless of the plugin’s loading status.

Plugins

YiBackdoor stores each plugin that is received locally in the Windows temporary folder using a random filename with the file extension .bin. The malware identifies a target plugin by validating the filename against its own filename generation algorithm. The plugins are reloaded each time YiBackdoor is executed.

Each plugin is stored in an encrypted format. The following Python code snippet represents the encryption/decryption algorithm.

   def fix_key(key: bytearray, x: int, y: int) -> 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 similarities

ThreatLabz 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.

Comparison of YiBackdoor and IcedID GZIP decryption routines.

Figure 2: Comparison of YiBackdoor and IcedID GZIP decryption routines.