Nymaim is a Windows malware family first documented in 2013, primarily used to download and execute additional malware. Early versions combined a first-stage downloader with a second-stage screen locker that demanded ransom payments. It subsequently evolved into a flexible malware-delivery platform with information-stealing and system-profiling capabilities. Its payloads have included ransomware and the Ursnif banking trojan. Nymaim has also incorporated web-injection functionality that monitors banking activity and modifies banking pages to facilitate fraud. The GozNym banking trojan combines Nymaim components with Gozi code.
Early campaigns distributed Nymaim through the Blackhole exploit kit and drive-by downloads. Later campaigns increasingly relied on malicious spam and phishing messages containing macro-enabled Microsoft Office documents or links to such documents. Operators have abused legitimate bulk email services and used payment, shipping, and public-health lures. Nymaim has also been delivered as a downstream payload by Emotet and PrivateLoader. Distribution has been associated with Storm-0324, Sangria Tempest, also known as FIN7, and TA564. Campaigns have affected victims internationally, including North America, Germany, Italy, and Poland.
Nymaim is notable for sophisticated custom code obfuscation and anti-analysis mechanisms. Analyzed versions detect antivirus processes, debugging and sandbox-related libraries, virtual-machine network adapters, and suspicious user or computer names. Some versions execute encrypted configuration bytecode through an embedded custom virtual machine supporting conditional logic and procedure calls. Its command-and-control mechanisms have used domain generation algorithms, transformed DNS responses, checksum validation, encrypted communications, and nameserver checks intended to avoid sinkholes. These mechanisms vary across versions; a variant observed in 2018 substantially reduced earlier obfuscation and introduced a wordlist-based domain generation algorithm.
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"
38 distinct techniques documented for this family, organized by ATT&CK tactic.
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.
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.
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.
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).
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).
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
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).
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.
In Figure 3, Nymaim is monitoring and replacing content of a banking website while the user is browsing it.
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.
intercepter les identifiants d’accès aux comptes de messagerie et aux programmes FTP, puis transmettre ces informations aux serveurs C2
German Design for Bomba Locker / Lyposit (which is the same as Nymaim based on Urausy...itself inspired by Reveton June 2012)
225 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
41 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.