EquationDrug
- Type
- Spyware
- Capabilities
- Credential theftKeyloggingExfiltrationPersistencePost exploitationDefense evasionReconnaissanceProcess injection
- Platforms
- Windows
EquationDrug is a long-running, highly modular cyberespionage platform associated with the Equation Group and in use since at least 2003. It is widely regarded as one of the group’s principal Windows espionage frameworks, succeeding EquationLaser and later being superseded for some operations by GrayFish. The platform is designed for selective, victim-specific deployment rather than indiscriminate mass infection and reflects the tradecraft of a mature nation-state intrusion capability.
Architecturally, EquationDrug combines kernel-mode and user-mode components with a plugin-based framework that allows operators to tailor functionality per target. Its startup chain includes low-level components for older and newer Windows generations, a user-mode loader, and a central orchestrator that manages configuration, module loading, and tasking. The platform uses encrypted configuration storage and an encrypted virtual file system to stage collected data prior to exfiltration. Multiple components implement stealth and survivability features, including rootkit functionality, hidden or protected objects, process injection, suppression of audit logging, and passive network backdoor behavior triggered by crafted traffic.
Observed capabilities include system profiling, file and directory collection, screenshot capture, keylogging, clipboard monitoring, browser activity monitoring, browser history and autofill theft, cached password collection, WMI-based collection, reverse DNS resolution, process and file management, network sniffing and interception, removable-media monitoring, NTFS-level access and disk forensics, and manipulation of HDD and SSD firmware. The framework’s plugin ecosystem also supports multiple communications methods and covert data handling. These features make EquationDrug a full espionage platform rather than a simple standalone Trojan.
EquationDrug primarily targets Windows systems, including legacy Windows families as well as NT-based versions. Reporting has also linked Equation Group tooling more broadly to Linux and Solaris operations, but the high-confidence characterization of EquationDrug itself is as a Windows espionage framework. The malware is notable for its longevity, engineering sophistication, and extensive modularity, and remains one of the best-known examples of advanced state-sponsored surveillance malware.
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.
EquationDrug is one of the main espionage platforms used by the Equation Group... EquationDrug, which is still in use, dates back to 2003, although the more modern GrayFish platform is being pushed to new victims.
Techniques & procedures
41 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
5 techniques
Execution
WMI information gathering.
Backdoor command is stored in the first byte of the decrypted request... 3 CallWinExec Disable Windows Audit and start new process via standard code injection in Winlogon.exe.
The rootkit code in the driver hooks several Native API functions that lets it hide or protect registry keys, files and running processes.
Next, the module injects extra code into a newly started target process. The injected code loads the payload DLL (“mscfg32.dll”) into the target process
The injection of code into winlogon.exe and services.exe ensures that the newly started process will have SYSTEM user privileges.
Persistence
4 techniques
Persistence
The module uses a unique algorithm for generating registry value names.
Passive network backdoor (runs Equation shellcode from raw traffic).
HDD and SSD firmware manipulation.
The platform is started by the kernel mode driver component (“msndsrv.sys” on Windows 2000 or above and “mssvc32.vxd” on Windows 9x). The driver then waits for the system to start and initiates execution of the user-mode loader “mscfg32.exe”.
Privilege Escalation
2 techniques
Privilege Escalation
Next, it crafts and injects a shellcode in “services.exe” or “winlogon.exe”. The shellcode is designed to spawn the loader process from the executable called “mscfg32.exe”.
The platform is started by the kernel mode driver component (“msndsrv.sys” on Windows 2000 or above and “mssvc32.vxd” on Windows 9x). The driver then waits for the system to start and initiates execution of the user-mode loader “mscfg32.exe”.
Stealth
9 techniques
Stealth
The driver acts as the first stage of the EquationDrug platform on Windows 2000+ and implements rootkit functions for hiding the components of the platform.
Next, it crafts and injects a shellcode in “services.exe” or “winlogon.exe”. The shellcode is designed to spawn the loader process from the executable called “mscfg32.exe”.
Code Patcher The driver patches OS code to dynamically disable or enable Windows audit logging.
Panic Disable packet filtering, securely delete driver file, clear related registry keys, set ClearPageFileAtShutdown flag, unbind adapters, delete devices and prepare for unloading.
Passive network backdoor (runs Equation shellcode from raw traffic).
HDD and SSD firmware manipulation.
The rootkit code in the driver hooks several Native API functions that lets it hide or protect registry keys, files and running processes.
The rootkit code in the driver hooks several Native API functions that lets it hide or protect registry keys, files and running processes.
If the module runs on Win9x, it executes Win9x-specific function RegisterServiceProcess to hide from the Windows Task Manager application.
Defense Impairment
3 techniques
Defense Impairment
The module uses a unique algorithm for generating registry value names.
The code also patches “SepAdtLogAuditRecord” inside “ntoskrnl.exe” to “retn 4” instead of the first opcode of the function.
Code Patcher The driver patches OS code to dynamically disable or enable Windows audit logging.
Credential Access
4 techniques
Credential Access
Network traffic interception for stealing or re-routing.
Keylogging and clipboard monitoring.
Collection of cached passwords.
Browser history, cached passwords and form auto-fill data collection.
Discovery
6 techniques
Discovery
Network traffic interception for stealing or re-routing.
System information gathering: OS version Computer name User name Locale Keyboard layout Timezone Process list
System information gathering: OS version Computer name User name Locale Keyboard layout Timezone Process list
Computer management: Start/stop processes Load drivers and libraries Manage files and directories
Monitoring removable storage drives.
Browsing network resources and enumerating and accessing shares.
Lateral Movement
1 technique
Lateral Movement
Browsing network resources and enumerating and accessing shares.
Collection
7 techniques
Collection
These include common features such as file collection and the making of screenshots.
Monitoring removable storage drives.
Keylogging and clipboard monitoring.
These include common features such as file collection and the making of screenshots.
Keylogging and clipboard monitoring.
Monitoring LIVE user activity in web browsers.
A dedicated thread (“dumper”) gathers the collected data, compresses the results with LZO appends it every 30 minutes to a file
Command and Control
6 techniques
Command and Control
Many encryption algorithms used in communication and information... Network communication encryption... This sub key is used for encrypting and decrypting to send and receive data.
These include common features such as file collection and the making of screenshots. Sophistication is added by storing stolen data inside a custom-encrypted virtual file system before it is sent to the command and control servers.
EquationDrug Plugins: Plugin ID File name Description 800C perfcom.dll HTTP communication ... 80BE vnetapi.dll C&C communication via WinHTTP API
Reverse DNS resolution (DNS PTR records).
Passive network backdoor (runs Equation shellcode from raw traffic).
Passive network backdoor (runs Equation shellcode from raw traffic).
Exfiltration
1 technique
Exfiltration
Sophistication is added by storing stolen data inside a custom-encrypted virtual file system before it is sent to the command and control servers.
Impact
1 technique
Impact
Sophistication is added by storing stolen data inside a custom-encrypted virtual file system before it is sent to the command and control servers.
Observables
27 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.