COMpfun
- Type
- RAT
- Capabilities
- KeyloggingExfiltrationPersistencePost exploitationDefense evasionReconnaissanceProcess injection
- Delivery
- Lure
- Platforms
- Windows
COMpfun is a Windows malware family associated with stealthy persistence through COM object hijacking and used in espionage-oriented intrusions. It has been described both as a remote access trojan and, in some distribution chains, as a downloader for follow-on payloads. The malware achieves persistence by hijacking COM class registrations so that Windows loads an attacker-controlled library in place of a legitimate component, allowing execution inside normal user processes without conventional DLL injection. This approach is notably quiet, blends into standard process activity, and has been observed as a long-term covert foothold mechanism.
COMpfun-related activity has been linked with medium-to-low confidence to Turla based on code similarities, tradecraft, and victimology. Reported targeting has included European diplomatic entities, and related tooling derived from the same code base has been used in broader espionage campaigns. Researchers also identified strong code overlap between COMpfun and Reductor, assessing that Reductor was likely developed by the same authors. In at least one observed infection path, already infected COMpfun hosts were used to download Reductor components, indicating COMpfun can function as a staging mechanism for additional malware.
A later COMpfun-related Trojan variant used an unusual command-and-control design based on uncommon HTTP or HTTPS status codes to queue and trigger actions. Reported capabilities for this code base include host fingerprinting, command execution, file upload and download, keylogging, screenshot capture, clipboard collection, network resource enumeration, USB propagation, process injection, and encrypted exfiltration. The malware also incorporates anti-analysis checks for virtualized environments, debuggers, and security tooling. Across reporting, COMpfun and closely related variants consistently target Windows systems and are characterized by stealthy persistence, covert surveillance, and post-compromise control in support of intelligence collection.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The Kaspersky Attribution Engine shows strong code similarities between this family and the COMPfun Trojan. Moreover, further research showed that the original COMpfun Trojan most probably is used as a downloader in one of the distribution schemes.
Techniques & procedures
24 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
In other words, it’s a normal full-fledged Trojan that is also capable of propagating itself to removable devices.
We registered two initial infection schemes: Reductor spreads by either infecting popular software distributions (Internet Downloader Manager, WinRAR, etc. and, for at least one victim, through a popular warez website over HTTP)...
The campaign operators retained their focus on diplomatic entities, this time in Europe, and spread the initial dropper as a spoofed visa application.
Persistence
1 technique
Persistence
In the second scenario, the targets are already infected with the COMpfun Trojan, which uses COM CLSID for persistence.
Privilege Escalation
2 techniques
Privilege Escalation
The module then chooses a process to inject the code into, in order of decreasing priority, starting from Windows (cmd.exe, smss.exe), security-related applications ... and browsers
In the second scenario, the targets are already infected with the COMpfun Trojan, which uses COM CLSID for persistence.
Stealth
6 techniques
Stealth
As with all modules with a similar code base, the dropper begins by dynamically resolving all the required Windows API function addresses and puts them into structures.
The file name related to the visa application process perfectly corresponds with the targeted diplomatic entities.
The module then chooses a process to inject the code into, in order of decreasing priority, starting from Windows (cmd.exe, smss.exe), security-related applications ... and browsers
It then decrypts the next stage malware from its resource (.rsrc) section. The algorithm used to decrypt the next stage is a one-byte XOR using the key “0x55”, followed by LZNT1 decompression.
It includes a number of anti-analysis checks for virtual machine-related devices (VEN_VMWARE, VBOX_HARDDISK, Virtual_DVD_ROM, etc.) to avoid controlled execution.
Before every communication with the C2, the malware checks if software such as debuggers (WinDbg, OllyDbg, Visual Studio) and host (Process Explorer or Monitor, etc.) or network monitoring (Wireshark, TCPView, etc.) programs are running.
Credential Access
1 technique
Credential Access
Its functions include the ability to acquire the target’s geolocation, gathering host- and network-related data, keylogging and screenshots.
Discovery
8 techniques
Discovery
424 Failed Dependency (WebDAV) Fingerprint target. Send host, network and geolocation data
The module obtains the processor architecture (32- or 64-bit) and Windows OS version.
If initialization is successful, the malware starts one more thread for dispatching Windows messages, looking for removable devices related to a WM_DEVICECHANGE event.
429 Too Many Requests Enumerate network resources on target
It includes a number of anti-analysis checks for virtual machine-related devices (VEN_VMWARE, VBOX_HARDDISK, Virtual_DVD_ROM, etc.) to avoid controlled execution.
It also notes which security products are running on the host (Symantec, Kaspersky, Dr.Web, Avast).
Its functions include the ability to acquire the target’s geolocation ... The malware geolocates victims using legitimate web services
Before every communication with the C2, the malware checks if software such as debuggers (WinDbg, OllyDbg, Visual Studio) and host (Process Explorer or Monitor, etc.) or network monitoring (Wireshark, TCPView, etc.) programs are running.
Lateral Movement
2 techniques
Lateral Movement
The first stage dropper was downloaded from the LAN shared directory.
In other words, it’s a normal full-fledged Trojan that is also capable of propagating itself to removable devices.
Collection
3 techniques
Collection
Its functions include the ability to acquire the target’s geolocation, gathering host- and network-related data, keylogging and screenshots.
In a separate thread, the Trojan takes a bitmap screenshot using the GDIPlus library ... and sends it to the control server.
For clipboard content, the module calculates an MD5 hash and if it changes, encrypts the clipboard content with the same RSA public key and then sends it.
Command and Control
3 techniques
Command and Control
We observed an interesting C2 communication protocol utilizing rare HTTP/HTTPS status codes ... Several HTTP status codes (422-429) from the Client Error class let the Trojan know what the operators want to do.
After getting into the browser’s address space, the Trojan can receive the command to download additional modules from the C2. As a result, the target’s browser downloaded Reductor’s custom dropper-decryptor.
the attackers used a combination of recently updated remote administration trojans (RATs) and remote procedure call (RPC)-based backdoors
Exfiltration
1 technique
Exfiltration
To exfiltrate the target’s data to the C2 over HTTP/HTTPS, the malware uses RSA encryption.
Observables
18 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.