Nymaim
- Type
- Downloader
- Capabilities
- Defense evasionReconnaissanceExtortion
- Delivery
- PhishingMalspamExploit kitDrive byLure
- Platforms
- Windows
Nymaim is a Windows malware family first documented in 2013, primarily used to download and execute additional malicious payloads. Early infections combined a first-stage downloader with a second-stage screen locker that demanded ransom payments. Later versions emphasized flexible payload delivery, information stealing, and system profiling. Nymaim has delivered ransomware and banking malware, notably Ursnif, and has also exhibited banking web-injection functionality that monitors banking-site visits and modifies page content to facilitate fraud. Its downloader and evasion components were combined with Gozi code to create the distinct GozNym banking trojan.
Early Nymaim campaigns relied heavily on the Blackhole exploit kit and drive-by downloads. Subsequent campaigns increasingly used phishing and malicious spam containing macro-enabled Microsoft Office documents or links to such documents. Delivery themes have included payments, shipping notifications, and public-health notices. Distributors have abused legitimate bulk email services to benefit from trusted sender and link reputations. Nymaim has also been delivered by other malware, including Pony, Emotet, and PrivateLoader.
Nymaim is notable for custom code obfuscation and anti-analysis mechanisms. Analyzed versions use encrypted configuration bytecode interpreted by an embedded virtual machine, allowing conditional execution, procedure calls, system inspection, and interaction with the malware's other components. Environment checks identify security software, debugging and sandbox-related libraries, virtualization-associated network adapters, and suspicious user or computer names. Command-and-control mechanisms have included domain generation algorithms, transformed DNS responses with checksum validation, nameserver filtering intended to avoid sinkholes, and encrypted HTTP communications. Implementation details vary between versions, and some variants substantially reduced earlier obfuscation.
Nymaim has appeared in global campaigns, including activity targeting North America, Germany, Italy, and Poland. Storm-0324, Sangria Tempest, and TA564 have been associated with its distribution. These distribution relationships do not establish ownership or development of the malware.
Associated threat actors
5 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
“The threat actors Sangria Tempest and Storm-0324 previously had been associated with the distribution of ... Nymaim downloader and locker.”
“The threat actors Sangria Tempest and Storm-0324 previously had been associated with the distribution of ... Nymaim downloader and locker.”
This threat actor typically targets Canada with false shipping lures, such as CanadaPost and DHL, and have attempted to deliver Ursnif, DanaBot, and Nymaim in the past.
Poland (Defunct) Polish Nymaim Medium Volume Manufacturing Campaigns began regularly in March of 2017 and appear to have gone on hiatus in May of 2018.
"Malicious Microsoft Office Document using encoded macros ... also seen for Nymaim ransomware delivery"
Techniques & procedures
38 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
Active since 2009, the Avalanche botnet has been used for money muling schemes, distributing a wide variety of malware, and as a fast-flux communication infrastructure for other botnets.
Initial Access
5 techniques
Initial Access
At that time, Nymaim was largely distributed via the Black Hole Exploit Kit (BHEK) as a "drive-by download."
kits d'exploitation (Exploit Kits), qui scannent silencieusement les vulnérabilités des navigateurs web ou des plugins obsolètes
In 2016, we documented distribution of the Ursnif banking Trojan via email campaigns
On February 17, for example, we tracked a malicious document attachment campaign in which Microsoft Word documents attached to emails with subjects "February payment" or "Fedex Delivery Notification" used macros to drop Pony onto PCs.
The emails include links from legitimate domains used by the service provider but redirect users to malicious macro-embedded documents to deliver Nymaim.
Execution
3 techniques
Execution
When users open one of these documents, the macros download and install Nymaim.
+++ using tricky locker deployment method - not just simply starting it up immediately(in this way your servers will stay 'clean' longer)
When the user clicks the image thinking they are opening it locally, it will be downloaded using a web browser.
Stealth
10 techniques
Stealth
Nymaim ... is well known for using an advanced custom obfuscation engine, which makes it very difficult to analyse the code ... the way in which the code is written and obfuscated.
the custom "ARCH" structure known to be used by Nymaim in order to keep the aplib32 compressed data is also used by Xpaj
When it comes to Nymaim obfuscation capabilities it’s not nearly over. For example external functions are not called directly, instead of it an elaborate wrapper is used: This wrapper pushes hash of function name on the stack... A second dispatcher pushes hash of a dll name on the stack... And finally real dispatcher is executed.
POST variable value = encrypted request (base64 encoded)... To decrypt it, we need to concatenate the key with the salt – and use that password with the rc4 algorithm.
SignalEvent(); // pre-process termination ... Exit(0); // Exit process
Almost every constant used in the program is stored in a special data section. When Nymaim needs to use one of that constants, it is using special encrypted_memcpy function.
"%!system32W6432%\rundll32.exe; -%!rndl_0_0_2_1_3% %!rndl_0_0_2_3_8%.dll"
Detecting sandboxing and debugging environment (IsDebugged())
The virtual machine uses IsDebugged() for anti-debugging checks, looking for blacklisted items associated with research environments: MAC addresses associated with virtual machine platform vendors VmWare, Dell, PCS Computer Systems GmbH, Microsoft Corporation, Parallels, and Xensource.
Loaded libraries "dbghelp.dll" and "SbieDll.dll" (parts of Debugging Tools For Windows and Sandboxie).
Defense Impairment
1 technique
Defense Impairment
For example we can find strings typical for adding exception to Windows Firewall (and of course – that’s what malware did when executed on a real machine).
Credential Access
2 techniques
Credential Access
payload – banker module (responsible for web injects – passive member of botnet)
L’un de ces modules est notamment conçu pour intercepter les identifiants d’accès aux comptes de messagerie et aux programmes FTP, puis transmettre ces informations aux serveurs C2
Discovery
6 techniques
Discovery
Determine presence of certain processes running (IsProcessRunning())
the config interpreter can communicate with other parts of the Nymaim code using a structure holding initial data, which includes: IsAdmin flag; System version from a OSVERSIONINFOEXW structure; SubAuthID; Locale obtained by GetLocaleInfoA; Pointer to the PEB
Detecting sandboxing and debugging environment (IsDebugged())
The virtual machine uses IsDebugged() for anti-debugging checks, looking for blacklisted items associated with research environments: MAC addresses associated with virtual machine platform vendors VmWare, Dell, PCS Computer Systems GmbH, Microsoft Corporation, Parallels, and Xensource.
All of these point to executables associated with antivirus applications, suggesting that IsProcessRunning() is used to detect installed AV utilities.
Loaded libraries "dbghelp.dll" and "SbieDll.dll" (parts of Debugging Tools For Windows and Sandboxie).
Lateral Movement
1 technique
Lateral Movement
Another suspicious behavior is opening ports on a router with help of UPNP. Because of this, infected devices from around the world can connect to it directly.
Collection
1 technique
Collection
In Figure 3, Nymaim is monitoring and replacing content of a banking website while the user is browsing it.
Command and Control
9 techniques
Command and Control
we have discovered interesting similarities in ... the communication protocol
This screenshot shows traffic generated by the malware to its injection control IP address 31.184.234[.]21. The malware reports that the user is visiting a banking site. It then receives instructions on how to modify and replace content to initiate fraud on the user’s account.
Avalanche used fast-flux DNS, a technique to hide the criminal servers, behind a constantly changing network of compromised systems acting as proxies.
Payload is very different from dropper when it comes to network communication: No hardcoded domain But has DGA And P2P
Nymaim on its own is a dropper. It acts solely as a gateway—a delivery system for other strands of malware. GozNym uses Nymaim’s advanced stealth capabilities to unload the previously mentioned Gozi malware.
A distinctive feature of Nymaim is the DNS query for the name server record (NS). Nymaim checks if any of the answers contains a word from a list it calls BlackNsWords... If Nymaim finds any of those word in the NS resource record, it will not use the domain.
Avalanche used fast-flux DNS, a technique to hide the criminal servers, behind a constantly changing network of compromised systems acting as proxies.
README.md ... Domain Generation Algorithms (DGAs) of Malware reimplemented in Python.
Like the earlier version of Nymaim, the A resource records are not the C2 IPs. The real addresses are obtained by transforming the IPs with a sequence of easily reversible XOR and substraction steps.
Exfiltration
1 technique
Exfiltration
intercepter les identifiants d’accès aux comptes de messagerie et aux programmes FTP, puis transmettre ces informations aux serveurs C2
Impact
1 technique
Impact
German Design for Bomba Locker / Lyposit (which is the same as Nymaim based on Urausy...itself inspired by Reveton June 2012)
Observables
225 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
42 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.