ZeroHour
Security Affairspublished ()ingested @securityaffairs1

RustDuck: The Botnet That's Still Small but Engineering Like It Plans to Grow

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2017-17215
Huawei HG532 with some customized versions has a remote code execution vulnerability.

Huawei HG532 with some customized versions has a remote code execution vulnerability. An authenticated attacker could send malicious packets to port 37215 to launch attacks. Successful exploit could lead to the remote execution of arbitrary code.

NVD description · AI analysis pending
8.878%
  • huawei hg532 firmware
CVE-2018-8007
Apache CouchDB administrative users can configure the database server via HTTP(S).

Apache CouchDB administrative users can configure the database server via HTTP(S). Due to insufficient validation of administrator-supplied configuration settings via the HTTP API, it is possible for a CouchDB administrator user to escalate their privileges to that of the operating system's user that CouchDB runs under, by bypassing the blacklist of configuration settings that are not allowed to be modified via the HTTP API. This privilege escalation effectively allows an existing CouchDB admin user to gain arbitrary remote code execution, bypassing already disclosed CVE-2017-12636. Mitigation: All users should upgrade to CouchDB releases 1.7.2 or 2.1.2.

NVD description · AI analysis pending
7.212% PoC
  • apache couchdb
CVE-2024-1781
A vulnerability was found in Totolink X6000R AX3000 9.4.0cu.852_20230719.

A vulnerability was found in Totolink X6000R AX3000 9.4.0cu.852_20230719. It has been rated as critical. This issue affects the function setWizardCfg of the file /cgi-bin/cstecgi.cgi of the component shttpd. The manipulation leads to command injection. The exploit has been disclosed to the public and may be used. The identifier VDB-254573 was assigned to this vulnerability. NOTE: The vendor was contacted early about this disclosure but did not respond in any way.

NVD description · AI analysis pending
9.815% PoC
  • totolink x6000r firmware
CVE-2025-29635
Authenticated Command Injection in D-Link DIR-823X Routers Exploited by Mirai Botnet

CVE-2025-29635 is a command injection flaw (CWE-77) in D-Link DIR-823X router firmware builds 240126 and 240802 that permits arbitrary command execution on the device. It is triggered by sending a crafted POST request to the /goform/set_prohibiting endpoint, and because the flaw requires high privileges (CVSS PR:H), the attacker must hold valid administrative credentials, which in botnet campaigns is typically achieved via default or weak passwords. Successful exploitation yields full remote command execution on the router, which in the observed campaign has been used by Mirai-variant botnets to enroll devices for DDoS activity. Any DIR-823X running the listed firmware builds is affected, with exposure concentrated in units whose web administration interface is reachable from the internet. The flaw was added to CISA's KEV catalog on 2026-04-24 after documented in-the-wild exploitation (an Akamai report on a Mirai campaign and a public PoC), and its EPSS score of 87.9% places it in the top percentile for near-term exploitation risk.

Do: Apply updated DIR-823X firmware per D-Link's guidance (a fixed build is not specified in this data) or the applicable BOD 22-01 mitigation deadline, reported as May 2026 for federal agencies. Until patched, ensure the router's admin interface is not exposed to the WAN and change default/weak credentials, since exploitation requires valid administrative access. Check devices for indicators of Mirai-style compromise (unexpected processes, outbound scanning or DDoS traffic) and review logs for POST requests to /goform/set_prohibiting from untrusted sources.

7.288% KEV PoC ×2
  • D-Link DIR-823X firmware 240126 and 240802 (the builds named in the advisory; no fixed version is specified in this data)
moderatelikely thousands of internet-exposed DIR-823X routers (roughly 1k-10k units directly attackable; installed base of the model could be higher)

Indicators of compromiseAll →

TypeIndicatorContext
domainduckdns.orgC2 domains lean on free dynamic DNS services, specifically duckdns.org, which is where the name comes from. Once a device checks i
ipv4192.0.2.1worth 35 points makes an asynchronous connection attempt to 192.0.2.1, an IP address reserved for testing that should never respo
Full article1,271 words · extracted from securityaffairs.com · click to collapse

RustDuck is a small, evolving DDoS botnet migrating to Rust. It uses advanced encryption, anti-analysis evasion, and exploits known IoT flaws.

Since February 2026, researchers at QiAnXin’s XLab have been tracking a new malware family, called RustDuck, that hijacks routers, cameras, Android set-top boxes, and exposed servers, then uses them to flood targets with junk traffic until they go offline. It’s not the biggest DDoS botnet around right now, and that’s almost beside the point.

“The reason XLab flagged it is the speed at which it’s changing. The codebase is actively migrating from C to Rust, and each new variant brings meaningfully more sophisticated encryption, evasion, and communication design.” reads the report published by XLab.

“Although the family’s current activity level and influence in DDoS attacks are not yet comparable to some mainstream botnets, its speed of technological evolution deserves significant attention. Research has found that the family is undergoing a comprehensive technological transition from C to Rust, and its anti-defense and traffic encryption techniques are also iterating rapidly.”

RustDuck doesn’t rely on a single entry point. It combines weak and default passwords on Telnet and SSH interfaces with a broad list of known device vulnerabilities. Targeted hardware includes Android ADB interfaces, DVRs and cameras from TVT, and networking gear from Ruijie, TP-Link, and ZTE. On the software side, it goes after exposed ThinkPHP installations, Jenkins servers, and Hadoop YARN endpoints, which pushes its reach from cheap home hardware into server environments.

The named CVEs in its arsenal range from recent to ancient. CVE-2025-29635 is a command-injection flaw in discontinued D-Link DIR-823X routers that CISA added to its Known Exploited Vulnerabilities list in April 2026. CVE-2017-17215 is a remote code execution bug in Huawei HG532 routers that Mirai variants were already abusing nine years ago. CVE-2024-1781 hits Totolink X6000R routers whose manufacturer never responded to the disclosure. CVE-2018-8007 targets an authenticated admin code execution path in Apache CouchDB. XLab observed more than 20 IP addresses actively spreading the botnet, with 176.65.139[.]204 the most active delivery source.

The XLab researchers reported that RustDuck installs itself in two stages. A loader arrives first, decrypts a compressed payload, and hands execution to a heavier core module. The loader itself has gone through four documented variants, each with a different encryption scheme: the first used a Linear Congruential Generator with XOR and LZ4 compression; the second upgraded to Xoshiro128 with hardcoded constants designed to make batch decryption nearly impossible; the third reverted to standard XOR with a fixed magic string; the fourth introduced ChaCha20 as the stream cipher. The progression isn’t random. Each step reflects the authors responding to detection.

The core module is where the Rust rewrite is happening, and Rust binaries are genuinely harder to analyze than the C that has powered device malware for years. That’s not a minor operational detail. It means the newer samples resist the standard toolkit analysts have used on IoT malware since Mirai.

Before RustDuck does anything visible, the core module runs a weighted scoring system to decide whether it’s sitting on a real victim device or inside a researcher’s lab. Each detected condition adds points to a risk score. Hit the threshold, and the malware erases its traces and exits cleanly.

“To thwart automated sandbox analysis and dynamic debugging by reverse engineers, the Core module incorporates a dynamic weight scoring mechanism. During runtime, the software iterates through various environment checks.” continues the report. “When the accumulated risk score exceeds a preset threshold, the program automatically erases traces and exits.”

The highest-weight checks, worth 100 points each, scan the process list for tools like Wireshark, gdb, and Frida, read /proc/self/status to detect an attached debugger, and verify a SHA256 checksum appended to the malware’s own file so it knows if anyone has modified it or inserted breakpoints. A check worth 50 points looks for honeypot configuration files from Cowrie and Dionaea in standard system paths. Another worth 35 points makes an asynchronous connection attempt to 192.0.2.1, an IP address reserved for testing that should never respond on a real network. If it does respond, the malware knows it’s inside a fake environment built to fool it, and leaves.

The timing check is particularly well-constructed. It samples two independent clocks before and after a deliberate half-second sleep, then compares the difference. A sandbox that speeds up time to rush malware through its behavior, or a debugger that pauses execution at a breakpoint, will show an anomaly in that comparison. Both conditions trigger an exit.

Once the malware decides the environment is genuine, it initiates a structured two-phase connection to its command-and-control infrastructure. The handshake phase uses ChaCha20-Poly1305 encryption and a Curve25519 key exchange, with session keys derived through HKDF-SHA256. The key rotates every ten minutes. After the handshake completes, the session switches to AES-GCM with separate keys for traffic going up to the server and commands coming down, a design that breaks the assumption that capturing one key gives you both directions of the conversation.

The command loop traffic adds a three-byte header that mimics the structure of standard TLS records, which helps the traffic blend into normal encrypted web traffic at the network layer.

“The new variant’s network communication protocol deeply references the IK pattern of the Noise protocol framework. Relying on the client’s hardcoded server static public key and the ephemeral public key generated at runtime for ECDH, session keys are derived. Additionally, the protocol introduces a global MsgID across all phases, which is used for message sequence verification and participates in rolling generation of new keys.” continues the report. “This design cuts off the possibility of decrypting traffic on the network side using plaintext keys.”

The C2 domains lean on free dynamic DNS services, specifically duckdns.org, which is where the name comes from.

Once a device checks in successfully, the operator has five commands available: launch a DDoS attack across various flood types, stop an active attack, fetch the device’s current status and resource usage, upgrade the malware to a newer build, and push new C2 infrastructure dynamically. That last one matters because it means the operator can rotate away from a blocklisted domain without losing the infected device.

RustDuck isn’t the first botnet to pick up Rust. Fortinet documented RustoBot in April 2025, a Rust-based DDoS botnet spreading through Totolink and other routers using a structurally similar playbook. The broader DDoS landscape has been brutal this year: AISURU and related botnets, combining over three million hijacked devices, drove attacks approaching 30 Tbps before a US-led takedown this spring. Next to that scale, RustDuck is currently small.

One detail XLab flags without drawing a firm conclusion: the most active delivery IP, 176.65.139[.]204, sits in the same small address block as infrastructure tied to a separate ADB-targeting DDoS botnet reported earlier in 2026. Shared bulletproof hosting is a plausible explanation. Worth noting either way.

There’s no single patch for RustDuck because it’s not a single vulnerability. Shutting down its entry points means getting remote management interfaces off the public internet entirely, disabling Android Debug Bridge where it isn’t needed, and never leaving Telnet or SSH reachable with default credentials. CouchDB has patched releases available. The D-Link DIR-823X does not, and CISA’s guidance is to pull it from service. The Totolink maker never responded to the disclosure at all. Gear past end-of-life needs to be replaced, not managed around.

XLab’s full report includes the loader SHA1 hashes, known C2 domains, and the active delivery addresses. Feed them into your monitoring now, before the next variant makes the current indicators stale.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, newsletter)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/194556/malware/rustduck-the-botnet-thats-still-small-but-engineering-like-it-plans-to-grow.html