DoubleFantasy
- Type
- Backdoor
- Capabilities
- Credential theftExfiltrationPost exploitationDefense evasionReconnaissance
- Platforms
- macOSLinuxWindows
DoubleFantasy is an Equation Group implant used as an early-stage validation and reconnaissance component in targeted intrusion operations. It is associated with the broader Equation malware ecosystem alongside platforms such as EquationDrug, GrayFish, and Fanny, and has been described as a lightweight foothold used to profile victims, collect credentials and system information, and provide generic remote access before deployment of more fully featured tooling.
DoubleFantasy has been documented on multiple operating systems, including Windows, Linux, Solaris, and macOS, indicating a cross-platform operational capability uncommon outside highly resourced espionage actors. On Linux, it has been observed gathering host profiling data such as operating system and kernel details, platform characteristics, uptime, language, network configuration, and user information, while also collecting account and password data, clearing login records, and communicating with command infrastructure for tasking. Analysis of Linux samples indicates anti-debugging behavior, encrypted internal strings, and custom encrypted communications consistent with the Equation toolchain. Solaris-related reporting describes both a DoubleFantasy component and supporting rootkit functionality used for daemonization, command execution, file operations, configuration updates, and collection of host and process information, including access to account password data. macOS reporting identifies DoubleFantasy as one of the notable government-grade implants analyzed for that platform.
Within the Equation ecosystem, DoubleFantasy is closely tied to staged post-compromise operations. It has been characterized as a target-screening implant that can exfiltrate collected data, relay commands, and download or hand off to more capable follow-on malware. Windows-related analysis also links DoubleFantasy to the distinctive Equation cryptographic implementation seen across leaked and previously documented tooling, reinforcing its placement within that espionage framework.
DoubleFantasy is best understood as a modular espionage backdoor used for victim validation, credential collection, reconnaissance, and controlled follow-on access in high-end intelligence operations rather than as a mass-distributed commodity threat.
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.
We have captured the samples on Linux platform and confirmed that the sample is DoubleFantasy component after analyzing. The component is used to perform incipient detection on targets with Linux platform.
Techniques & procedures
16 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
1 technique
Execution
When executing file, escalate privilege of file first, then use the excele function with parameter executable files... execle("/usr/bin/sample","sample", NULL, %envp%);
Persistence
2 techniques
Persistence
The script realizes the startup by using the service. It creates the script in the etc / rc.d / directory (S85s%). This script will run with the start parameter as the service which is executed when open the computer.
Run with the daemon mode in the sample, achieve the ability of self-protection.
Privilege Escalation
2 techniques
Privilege Escalation
The script realizes the startup by using the service. It creates the script in the etc / rc.d / directory (S85s%). This script will run with the start parameter as the service which is executed when open the computer.
Run with the daemon mode in the sample, achieve the ability of self-protection.
Stealth
6 techniques
Stealth
These components act as Rootkits... This is a rootkit program on the Solaris platform of the SPARC architecture. It is primarily responsible for hiding the main function sample files like other rootkit programs, as well as the associated derived files and itself, including process, file, and service information.
The function and data called by this sample is dynamically loaded and debugged... We explain the calling addresses through dynamic analysis decryption.
After running, it can combine two sets of strings... to generate file name as its own new file name, and copy itself to the / sbin / directory... these words are highly frequency words or suffix used in system files and system command.
Traversing system files, clearing / var / log / lastlog records... 0x42 Clear traces of infection, delete itself.
The sample will generate MD5 based on HOSTID... splice .tmp with the first six bits into a folder name and create the folder... It is responsible for hiding all the files in this folder.
The malware starts process fork() and determine the PID number of its child process. If the execution succeeds, then the main function will exit and cannot debug.
Credential Access
1 technique
Credential Access
Traversing system files, clearing / var / log / lastlog records, obtaining system account password information... Reading the system account password file, retrieve user information and password.
Discovery
3 techniques
Discovery
If the parameter '-c' engages in, only system information can be obtained and it can be regarded as scene detection... Collecting information about infected computers, including system directory, file extension, and other information.
Obtaining user’s login information getpwnam... Getting user’s login password getpwuid... Reading the system account password file, retrieve user information and password.
The malware starts process fork() and determine the PID number of its child process. If the execution succeeds, then the main function will exit and cannot debug.
Collection
1 technique
Collection
This implant collects system information and credentials and provides generic access to an infected computer.
Command and Control
3 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.
Connecting remote sever and making different operations based on remote control instructions... 'GET ', 'POST ', 'HTTP/1.1\r\n' ... Connecting remote URL address.
The download executable samples are the same as Windows, use the same instruction tag through three steps (create, write, execute) to complete the download and execution function.
Observables
2 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.