ANDROMEDA
- Type
- Botnet
- Capabilities
- PersistenceDefense evasionProcess injectionReconnaissanceExfiltration
- Delivery
- MalspamExploit kitDrive byUSB
- Platforms
- Windows
Andromeda, also known as Gamarue and Wauchos, is a modular, HTTP-based botnet malware family targeting Windows. First observed in 2011, it provides a persistent foothold for collecting host information and downloading and executing additional malware. Its command-driven architecture supports plug-in installation, self-updating, component removal, and uninstallation. It has delivered threats including Chthonic, CoalaBot, and Neutrino Bot, and was used by the Carbanak cybercriminal group.
Andromeda uses process hollowing to execute its payload inside other processes and employs packing, encrypted payloads, dynamically resolved APIs, and anti-debugging and anti-virtualization checks to obstruct analysis. Some versions divert execution into dummy routines or prolonged sleep loops when analysis environments are detected. Persistence mechanisms include registry autoruns and, in some versions, cooperating injected processes with watchdog threads that restore deleted malware files or modified persistence settings. Its command-and-control communications use HTTP POST requests with RC4 encryption and CRC32 validation; message formatting and encoding vary across versions.
Distribution mechanisms include exploit kits hosted on compromised websites, malicious email campaigns, and infected USB drives. Some Gamarue variants exhibit worm-like propagation and use deceptive Windows shortcuts to facilitate execution. Andromeda has also been delivered as a secondary payload by other downloaders. An international law-enforcement operation disrupted its infrastructure in 2017, accompanied by the arrest of a suspected administrator in Belarus.
Associated vulnerabilities
4 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
6 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Début 2013, avant que le code malveillant Carbanak (alias Anunak, Sekur) ne soit développé, le groupe cybercriminel aurait souscrit à des Malware-as-a-Service, tels qu’Andromeda (alias Gamarue) et Pony.
...later campaigns occasionally used Pony or Andromeda as intermediate loaders to distribute various instances of Dridex.
"...use of the Andromeda Trojan as an initial payload in their attacks to download and execute other tools in their toolset."
"...a legacy ANDROMEDA sample was automatically installed and began to beacon out."
C0026 ... selective distribution of KOPILUWAK and QUIETCANARY malware to previous ANDROMEDA malware victims in Ukraine through re-registered ANDROMEDA C2 domains.
...CodeFork leveraging the popular downloader Andromeda (aka Gamarue) to distribute a miner module to their existing botnets.
Techniques & procedures
57 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
4 techniques
Resource Development
I found it spread as a tasks in a Betabot and in an Andromeda spread via RIG fed by at least one HilltopAds malvertising.
Multiple actors (e.g., APT1, APT28, APT32, APT38, APT42, FIN7, Lazarus Group, etc.) are described as registering/acquiring/purchasing domains, including look-alike domains, for operations.
“One of its C2 domains… had expired, was found to be newly re-registered… This novel technique of claiming expired domains used by widely distributed… malware…”
The XBL is Spamhaus’s block list which lists IP addresses that host bots and malware-infected computers.
Initial Access
5 techniques
Initial Access
[ANDROMEDA](https://attack.mitre.org/software/S1074) has been spread via infected USB keys.(Citation: Mandiant Suspected Turla Campaign February 2023)
I met one of those bot (v2.5 ... ) as a second stage of an Andromeda pushed in Nuclear Pack
In recent months, the authors have mainly focused on spreading Andromeda via exploit kits (Neutrino, Nuclear, Angler,..) located on compromised websites or advertisement services.
They have all been used to deliver much of the spam, phishing lures and malware that was received globally.
When sending messages containing an exploit, cybercriminals attached a specially crafted RTF document, designed to exploit the CVE-2014-1761 vulnerability in Microsoft Office products. The file has a .DOC extension to make it look less suspicious.
Execution
10 techniques
Execution
Eventually, waiting for a command in an infinite loop, it sniffs port 8000. A received command will then be run in the command window.
Eventually, waiting for a command in an infinite loop, it sniffs port 8000. A received command will then be run in the command window.
We’ve seen a packer very similar to Zbot (based on its source code), obfuscated Visual Basic and .NET binaries
This malware uses very uncommon API functions in low-level form (Nt/Rtl), which is probably used to avoid standard API monitors/tracers, sandboxes and other dynamic analysis tools
...les aurait distribués par point d’eau via le kit d’exploitation Neutrino.
"...illegal software downloads... as a means of distribution."
the attached document instructs the end user to download and enable its content. This allows the macro malware to execute, thus completing the initial infection of Andromeda.
Additionally, the two processes communicate with each other through an instance of creating a pipe connection.
This part of code is executed when the environment variable ‘svch’ has not been found. The bot tries to connect to the pipe name, which is ‘kill’ xor’ed by the VolumeSerialNumber.
As part of its evolution, version 2.07 implements a custom exception handler using a call to SetUnhandledExceptionFilter. Similarly, version 2.08 calls RtlAddVectoredExceptionHandler and adds the custom handler as the first handler into the vectored exception handler chain (VEH).
Persistence
4 techniques
Persistence
First, it modifies the registry entry HKLM\system\currentcontrolset\services\sharedaccess\parameters\firewallpolicy\standardprofile\authorizedapplications\list to the value of %s:*:Generic Host Process, which points to the path of the current process.
A suspended process of the file to be injected is created... Before it calls ResumeThread to resume the process, it changes the entry point of the injected file to point to its code.
[ANDROMEDA](https://attack.mitre.org/software/S1074) can establish persistence by dropping a sample of itself to `C:\ProgramData\Local Settings\Temp\mskmde.com` and adding a Registry run key to execute every time a user logs on.(Citation: Mandiant Suspected Turla Campaign February 2023)
Gamarue, Dinihou and now also Spora use Windows shortcuts (.LNK files) instead. Spora adds the hidden attribute to files and folders on the desktop, in the root of removable drives and the system drive. Spora then puts Windows shortcuts with the same name and icon as the hidden files and folders as a visible replacement.
Privilege Escalation
6 techniques
Privilege Escalation
[ANDROMEDA](https://attack.mitre.org/software/S1074) can inject into the `wuauclt.exe` process to perform C2 actions.(Citation: Mandiant Suspected Turla Campaign February 2023)
It then calls QueueUserAPC, which creates an asynchronous procedure call object. This object points to the code which decrypts some encrypted strings using RC4 decryption.
Eventually, in all versions, the loader injects the payload into a remote process using a process hollowing technique and runs it in memory.
A suspended process of the file to be injected is created... Before it calls ResumeThread to resume the process, it changes the entry point of the injected file to point to its code.
[ANDROMEDA](https://attack.mitre.org/software/S1074) can establish persistence by dropping a sample of itself to `C:\ProgramData\Local Settings\Temp\mskmde.com` and adding a Registry run key to execute every time a user logs on.(Citation: Mandiant Suspected Turla Campaign February 2023)
Gamarue, Dinihou and now also Spora use Windows shortcuts (.LNK files) instead. Spora adds the hidden attribute to files and folders on the desktop, in the root of removable drives and the system drive. Spora then puts Windows shortcuts with the same name and icon as the hidden files and folders as a visible replacement.
Stealth
18 techniques
Stealth
Version 2.10 also keeps an array of API hash values. The hash algorithm is a custom function and, in order to complicate static analysis further, the author incorporates opaque predicates.
When the message is prepared for the required information, in all versions except the most recent one, the string is encrypted in two steps. The first step uses a 20-byte hard-coded RC4 key and the second step uses base64 encoding. Version 2.10 encrypts the message only using the RC4 algorithm.
If the bot does detect the presence of either a debugger or a virtual machine, it decrypts the dummy code. This code copies itself under %alluserprofiles% as svchost.exe with hidden system file attributes.
[ANDROMEDA](https://attack.mitre.org/software/S1074) has been installed to `C:\Temp\TrustedInstaller.exe` to mimic a legitimate Windows installer service.(Citation: Mandiant Suspected Turla Campaign February 2023)
ANDROMEDA has been delivered through a LNK file disguised as a folder.
[ANDROMEDA](https://attack.mitre.org/software/S1074) has been delivered through a LNK file disguised as a folder.(Citation: Mandiant Suspected Turla Campaign February 2023)
[ANDROMEDA](https://attack.mitre.org/software/S1074) can inject into the `wuauclt.exe` process to perform C2 actions.(Citation: Mandiant Suspected Turla Campaign February 2023)
It then calls QueueUserAPC, which creates an asynchronous procedure call object. This object points to the code which decrypts some encrypted strings using RC4 decryption.
Eventually, in all versions, the loader injects the payload into a remote process using a process hollowing technique and runs it in memory.
They call the DeleteFile API to remove the :Zone.Identifier flag from the newly created ms*.exe file
It uses this path to create a copy of the original file before deleting it, and saves it in %alluserprofile% with a random filename... The original file in the old path is deleted.
the file time is set to the file time obtained from the original msiexec.exe file. The well known functions - GetFileTime and SetFileTime are used.
The majority of Gamarue activity we see involves rundll32.exe executing with unusual command lines that include long filenames with repeating characters and random function names.
In these variants, the loader enumerates the processes running on the machine and compares them against a list of unwanted processes.
Iterating through process names and computing their CRC32 hash values... Trying to load the libraries guard32.dll and sbiedll.dll... Querying for a value... to search for the presence of any virtual machine.
This code copies itself under %alluserprofiles% as svchost.exe with hidden system file attributes.
As part of its evolution, version 2.07 implements a custom exception handler using a call to SetUnhandledExceptionFilter. Similarly, version 2.08 calls RtlAddVectoredExceptionHandler and adds the custom handler as the first handler into the vectored exception handler chain (VEH).
The malware acquires the timestamp counter (by calling rdtsc) twice and calculates the difference between the two. If the difference is less than 512ms, it proceeds to resolve imports and decrypt the payload.
Defense Impairment
1 technique
Defense Impairment
First, it modifies the registry entry HKLM\system\currentcontrolset\services\sharedaccess\parameters\firewallpolicy\standardprofile\authorizedapplications\list to the value of %s:*:Generic Host Process, which points to the path of the current process.
Credential Access
1 technique
Credential Access
Formbook ... can retrieve authorization and login credentials from a web data form before the information reaches a secure server, bypassing HTTPS encryption. ... Formgrabbers intercept HTTP(S) data and use inline hooking ... to capture a user's information before the user submits it
Discovery
8 techniques
Discovery
Querying for a value in the system\currentcontrolset\services\disk\enum registry to search for the presence of any virtual machine.
the malware includes ... rg Administrator rights Set 1 if malware process runs under an administrator account.
The malware tries to connect various legal servers on port 80 with a crafted socket and obtain the infected machine’s IP address from the sockaddr structure via the getsockname API function.
The main aim of Andromeda's payload is to steal the infected system's information, talk to the command-and-control (C&C) server, and download and install additional malware onto the system.
In these variants, the loader enumerates the processes running on the machine and compares them against a list of unwanted processes.
Iterating through process names and computing their CRC32 hash values... Trying to load the libraries guard32.dll and sbiedll.dll... Querying for a value... to search for the presence of any virtual machine.
Language exclusions Another interesting feature is the detection of keyboard layout settings. If Andromeda detects the Russian, Ukrainian, Belarusian or Kazakh keyboard, it sets a special flag that disables the infection
The malware acquires the timestamp counter (by calling rdtsc) twice and calculates the difference between the two. If the difference is less than 512ms, it proceeds to resolve imports and decrypt the payload.
Lateral Movement
2 techniques
Lateral Movement
[ANDROMEDA](https://attack.mitre.org/software/S1074) has been spread via infected USB keys.(Citation: Mandiant Suspected Turla Campaign February 2023)
the machines infected by Avalanche are still out there spreading the infection to new machines.
Collection
2 techniques
Collection
Il télécharge d'autres logiciels malveillants à partir de ses serveurs de contrôle, souvent dans le but de voler des informations sur les systèmes infectés.
Formbook ... can retrieve authorization and login credentials from a web data form before the information reaches a secure server, bypassing HTTPS encryption. ... Formgrabbers intercept HTTP(S) data and use inline hooking ... to capture a user's information before the user submits it
Command and Control
9 techniques
Command and Control
All communication is RC4 encrypted ... Andromeda contains a hard-coded RC4 key, which is used for C&C server communication, for the downloaded plugin decryption and also for decrypting hard-coded C&C URLs
As shown in Table 2, each version has two message formats, both sent as HTTP POST requests: Action Request and Task Report.
[ANDROMEDA](https://attack.mitre.org/software/S1074) has the ability to make GET requests to download files from C2.(Citation: Mandiant Suspected Turla Campaign February 2023)
The hooked GetAddrInfoW API performs a DNS query for the input host name from Google DNS server 8.8.4.4... The DNS record received is then used for querying the C&C domain name.
“USB spreading malware continues to be a useful vector to gain initial access… a USB infected… was inserted… When the system's user double clicked a malicious link file (LNK) disguised as a folder within the USB drive…”
[ANDROMEDA](https://attack.mitre.org/software/S1074) can download additional payloads from C2.(Citation: Mandiant Suspected Turla Campaign February 2023)
These bots can now be controlled via a control panel to perform different commands such as downloading and executing files, performing remote shell
“yelprope.cloudns[.]cl is a ClouDNS dynamic DNS subdomain…”
This string is encrypted using RC4 with a hard-coded key of length 0x20 and is further encrypted using base64... Later it is decrypted using RC4 with the VolumeSerialNumber as the key.
Observables
248 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
59 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.