
A USB worm’s second life: Retadup spreading CoffeeLoader
Security researchers have identified a resurgence of the 2017 Retadup worm, which is now being used to deliver the CoffeeLoader trojan to victims.
The malware campaign relies on a patched version of the 7-Zip library to install itself on a victim's computer. The malicious code replaces part of the legitimate 7z.dll file with a self-decrypting shellcode that acts as a new version of the Armoury packer.
This packer uses the computer's graphics processing unit to decrypt the malware's main body. Unlike previous variants that used the OpenCL library, this version employs the OpenGL library for the decryption process.
The decrypted payload is a new CoffeeLoader downloader. This component establishes persistence by copying itself to system folders and adding a registry entry to ensure it runs automatically.
The downloader then injects itself into a legitimate system process and downloads the final payload from a command-and-control server. The communication is encrypted and uses a hardcoded server address.
New infection chain
The new variant of the CoffeeLoader malware includes a downloader that combines the functions of a dropper, a stager, and a downloader. This component is responsible for installing the trojan and fetching its main body from the C2 server.
The malware uses a unique naming convention for its files and registry keys. It generates eight hexadecimal digits to create subfolders and library names, such as b79faace.dll, and uses the Windows Run registry key for autorun.
To protect itself, the downloader creates a registry key that prevents users from disabling autorun through Task Manager. This ensures that the malware remains active even if the user attempts to stop it.
Once persistence is established, the malware launches one of several processes (dllhost.exe, WerFault.exe, svchost.exe, OpenWith.exe, or AtBroker.exe), injects itself into it, and downloads the Trojan’s main body from a hardcoded C2 server address.
Distribution via Retadup
The most notable finding is how this CoffeeLoader variant spreads. Unlike previous campaigns that relied on email attachments and phishing, this infection comes from the Retadup worm.
Retadup is a malicious computer worm first discovered in 2017. It was written in the AutoIt and AutoHotkey scripting languages and copied itself to all connected USB flash drives and external drives.
In July 2019, French law enforcement took control of the Retadup botnet and disinfected more than 850,000 machines. However, the worm resurfaced in 2024 when someone began re-registering its command-and-control server domains.
The revived C2 servers were initially used to distribute the SmokeLoader downloader. By early 2025, the same servers began serving the CoffeeLoader variant, continuing the worm's legacy of spreading third-party malware.
Technical evolution
The malware's communication protocol has evolved since its initial discovery. The magic constant 0xC0FFEE42, which gave the malware its name, has been replaced by the value 0xD1D57871.
The attackers have also changed the keys used to encrypt requests to the C2 server and decrypt its responses. The new keys are A21251838432306F2CD2540593656B9E and 2026F751079659CF71C7BA64B345C12A.
The malware now verifies the integrity of the downloaded payload by checking the X-Signature and X-Content-MD5 headers in the HTTP response. This replaces the previous method of validating the certificate during the connection to the C2.
Despite these technical changes, the functionality of the CoffeeLoader trojan remains the same. It can run a payload received from the C2 by injecting it into a process, saving it to disk as an executable, or saving it as a DLL and running it via rundll32.exe.