Purple Fox is a modular Windows malware family first documented in September 2018. It combines downloader functionality with kernel-mode rootkit components and is used to distribute additional malware, notably cryptocurrency miners. Its operators maintain botnet infrastructure comprising compromised systems, including Microsoft SQL Server hosts targeted for their computing resources.
Originally distributed through the Rig exploit kit, Purple Fox subsequently developed its own exploit kit. Infection routes include malicious websites, advertising redirects, trojanized installers impersonating legitimate applications, and phishing emails using Chinese- and Japanese-language invoice lures. Browser-based attacks exploit Internet Explorer, VBScript, and Flash vulnerabilities. Later infection chains replaced NSIS-based delivery with staged PowerShell execution and abuse of Windows Installer. When administrative privileges are unavailable, Purple Fox attempts local privilege escalation using publicly available Windows kernel exploits, including CVE-2015-1701, CVE-2018-8120, CVE-2020-1054, and CVE-2021-1732. SQL Server campaigns use credential brute-force attacks and malicious .NET CLR assemblies to execute code through database stored procedures.
Purple Fox supports 32-bit and 64-bit Windows payloads. It establishes persistence through boot-time system-file replacement and service creation, injects code into Windows service-host processes, and deploys rootkit drivers that conceal files and registry entries and restrict access to protected components. Evasion techniques include in-memory loading, encrypted shellcode, image steganography, VMProtect packing, and malicious drivers signed with stolen or revoked code-signing certificates. Associated kernel modules can disable antivirus file-system filters and terminate security processes. Its operators have also deployed FatalRAT-derived backdoors through staged loaders, while the Purple Fox exploitation framework has served as a delivery channel for the DirtyMoe botnet.
12 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
47 distinct techniques documented for this family, organized by ATT&CK tactic.
Originally, it was a trojan that was delivered using the Rig exploit kit (EK). Since then its developers have added new capabilities, including a rootkit component and an exploit kit (also known as Purple Fox EK) to deliver the malware.
Once the user accesses a malicious site hosting one of Rig’s landing pages | Once the user accesses a malicious site hosting one of Rig’s landing pages, there are three methods used to ultimately redirect the user to a malicious PowerShell script
In previous blogs1, we discussed the initial access techniques for this malware, which, in earlier activities, included targeting SQL databases.
“Since early 2023, Proofpoint observed an increase in the email distribution of malware… The email subjects and content are usually written in Chinese… related to business themes like invoices, payments, and new products.”
“Sainbox RAT and ValleyRAT delivered via Excel and PDF attachments containing URLs… [Purple Fox] deliver zipped LNK attachments…”
“Commonly, the emails contain URLs linking to compressed executables… Excel and PDF attachments containing URLs linking to compressed executables.”
The exploit runs mshta.exe with VBScript code as a command line, which then runs PowerShell. The PowerShell code downloads and executes in memory the next stage of code
Installation command behavior: /c start “” “C:WindowsTEMPFastpic_u44047309_sv67_52_1.exe” /at=591 /tid1=67
The exploit runs mshta.exe with VBScript code as a command line, which then runs PowerShell.
After the shellcode loads and allocates memory for loading the stuffed PE modules inside svchost.txt, the execution flow will call into the first PE module found after the shellcode.
Our investigations reveal that Purple Fox has iterated to include use of two recent CVEs – CVE-2020-1054 and CVE-2019-0808 – through publicly-available exploit code.
The installers are actively distributed online to trick users and increase the overall botnet infrastructure.
The attackers distribute their malware using disguised software packages that encapsulate the first stage loader.
The Trojan will perform multiple deletions and replacements... We call the file replaced to the system file Sense.dlll as FakeSense.dll.
It is worth noting that all of the scripts check for a specific and consistent registry value named “StayOnTop” under HKCUSoftware7-Zip. It appears that setting this value enables the malware to determine if the payload ran successfully.
Review all the SQL Server’s Stored Procedures and Assemblies for any suspicious assemblies not recognized by the DBAs. | Once the DLLs have been imported, they can be linked to stored procedures that can be executed via a TSQL script.
Then decrypt the non-PE and create a service start
we found that this is a kind of Trojan using “Pending File Rename Operations” mechanism to replace the system file and automatically start the load driver when booting.
if it decrypts the memory DLL and driver files, create the Svchost process and inject the Shellcode to execute, and then write the DLL and driver remotely into the Svchost process
PowerShell scripts are extracted from the downloaded images, which are then executed and lead to privilege escalation through one of the integrated exploits: CVE-2015-1701 CVE-2018-8120 CVE-2019-1458 CVE-2019-0808 CVE-2020-1054 CVE-2021-1732
Then decrypt the non-PE and create a service start
we found that this is a kind of Trojan using “Pending File Rename Operations” mechanism to replace the system file and automatically start the load driver when booting.
Register the MiniFilter and thread callback at the driver entry... Hide its own Trojan files in MiniFilter... The 32-bit hook NtEnumerateKey function hides its own registry entries... Then replace the NtfsFsdCreate dispatch function of Ntfs.sys
Examining the exploit code shows that it is obfuscated in several stages and encrypted using AES.
Notably, malicious code is hidden inside the images using steganography to avoid detection by web proxies and firewalls.
We still see the use of PendingFileRenameOperations for placing the files under the system32 directory after a reboot. | In the past, Purple Fox would download local privilege escalation (LPE) binaries that used an image file extension ( update.jpg) but which was in fact a regular executable file.
if it decrypts the memory DLL and driver files, create the Svchost process and inject the Shellcode to execute, and then write the DLL and driver remotely into the Svchost process
Following this, copy the DLL code to the temporary memory, then free the DLL, and then write the temporary memory back to the process code to hide and delete the Trojan DLL... Erase the driver information
This client supports five different commands... Delete Files from Kernel 0x222008 d 1 File Path to delete
Then decrypt the non-PE and create a service start
used to abuse msiexec.exe ... to download and execute Purple Fox’s main component
The script checks whether the user is an administrator and installs the malware using an MSI file if this is the case.
The 32-bit hook NtEnumerateKey function hides its own registry entries | Hide its own Trojan files in MiniFilter
The Trojan will perform multiple deletions and replacements... We call the file replaced to the system file Sense.dlll as FakeSense.dll.
The PowerShell code downloads and executes in memory the next stage of code
During the analysis, we noticed that the exploit is not triggered in every case because geofencing was used to control who is targeted.
It is worth noting that all of the scripts check for a specific and consistent registry value named “StayOnTop” under HKCUSoftware7-Zip. It appears that setting this value enables the malware to determine if the payload ran successfully.
If the malware authors acquire any certificate that has been verified by a trusted certificate authority and by Microsoft, even if it was revoked, attackers can use it for malicious purposes.
They are also trying to improve their signed rootkit arsenal for [antivirus] evasion and trying to bypass detection mechanisms by targeting them with customized signed kernel drivers.
Both implement a similar keylogging functionality, as seen in Figure 42.
The main propagation method for Purple Fox when infecting SQL servers uses brute-force attacks rather than acting as a worm that exploits only the vulnerable services.
They query the registry key “HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\\"~MHz\” to identify the resources of the infected machine.
When a SQL server starts having unusual traffic related to UDP and TCP, there should be a massive surge in traffic since it scans public IP addresses and the local network.
Svchost.txt backdoor implements a process checker list for common AV and EDR products.
It sends all the fingerprinting logs collected from the victim’s system... They query the registry key “HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\\"~MHz\” to identify the resources of the infected machine.
The user-mode client supports five different commands... Copy Files from Kernel ... Delete Files from Kernel
The script checks whether the user is an administrator and installs the malware using an MSI file if this is the case.
Both implement a similar keylogging functionality, as seen in Figure 42.
Both use a similar COM APIs sequence to find video capture devices installed on the victims’ machines, such as a webcams.
It also initiates a second stage C&C channel with another set of servers. It sends all the fingerprinting logs collected from the victim’s system and then waits for new commands from the C&C server.
The C&C servers used in the communication schemes that have been described here are infected servers that are part of the botnet used to host the various payloads for Purple Fox.
After starting the downloader, the Trojan installation package download address will be downloaded online
Both initial DNS requests are CNAMEs to subdomains under kozow[.]com, which is a free dynamic domain service provided by dynu[.]com. This service can be updated with an API to make it point to different IP addresses — a technique the attacker uses to change the IP address at a regular interval.
Both attacks also share the same goal of mining Monero.
93 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
16 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.