In December 2018, Group-IB specialists detected a new JS-sniffer family called FakeSecurity. It was used by a cybercrime group targeting Magento-based websites. While attacking websites, attackers injected a link to a malicious code into the website's source code. Analysis showed that during a recent malicious campaign, the cybercrime group used password-stealing malware and tried to infect online merchants in order to infect their websites with the JS-sniffer. All the infected websites have been notified by Group-IB's Computer Emergency Response Team about the presence of malicious injects.
In December 2018, Group-IB specialists detected a new JS-sniffer family called FakeSecurity. It was used by one cybercrime group targeting Magento-based websites. While attacking websites, attackers injected a malicious code into the website's source code. The script runs every time that a victim browses an online shop. It steals user payment information during checkout and sends it to the attacker's server. During the first waves of attacks, the FakeSecurity sniffer used the domain name magento-security[.]org as a gate for stolen credentials and to store the sniffer source code.
The same sniffer was later detected on other Magento-based websites, but attackers had changed the domain names used for storing the JS-sniffer source code:
Both these domain names were registered using the same email address, email@example.com. Apart from these two domain names, attackers created a third domain name, firstofbanks.com, using the same email address.
While analyzing the three domain names used by those behind the FakeSecurity JS-sniffer, it was established that some of them were used in a malicious campaign. As part of this campaign, attackers had been spreading malware since March 2019. Attackers sent links to fake pages that informed victims about a missing plugin required to display the document correctly. If a user downloaded the plugin, their computer was infected with the password-stealing malware.
There were 11 unique links to fake pages that urged user to install a malicious application:
Potential victims of this malicious campaign received spam email messages containing a link to a 1st-level fake page. Such pages contain only one small HTML document with an embedded iframe element that loads content from a different 2nd-level page. Second-level pages are landing pages with content that urges users to install an application. In the case of this malicious campaign, attackers used a landing page that imitates an online PDF viewer and the page displays a message about a missing plugin for Adobe Reader, which is why the 1st-level link imitated a link to a PDF file. Second-level pages contain links to EXE files, which are installed on the victim's computer after they click on the "Download plugin" button.
Let's examine an example of a malicious landing page. A potential victim receives a link to an HTML file via a spam email message, e.g. hxxps://www.healthcare4all[.]co[.]uk/manuals/Statement00534521.html. This HTML file contains an iframe element with a link to the page's main content; in this case, all content was stored by the link hxxps://alloaypparel[.]com/view/public/Statement00534521/PDF/Statement001854.pdf. As we can see from this example, to store a fake page's main content, the attackers used not a compromised website but a domain name created for malicious purposes. In the fake page's interface, there is a button with the text "Download plugin". If the victim clicks on this button, they will download a malicious application through the URL address from the fake page's source code; in this case, the URL to the EXE file is hxxps://www.healthcare4all[.]co[.]uk/manuals/Adobe-Reader-PDF-Plugin-2.37.2.exe, which means that the malware was stored on a compromised website.
Analysis of the domain name alloaypparel.com helped experts establish that, to spread malware, attackers used the phishing kit Mephistophilus, which makes it possible to create and deploy phishing landing pages designed for distributing malware. Mephistophilus uses several types of pages that urge users to install a missing plugin for the application to function correctly, but instead of a plugin users download a malicious payload by URL, set by the operator in the admin panel of the Mephistophilus phishing kit.
"Mephistophilus", a system for targeted phishing attacks, appeared for sale in August 2016. It is based on the use of various phishing kits designed for malware distribution disguised as an installation of missing plugins (MS Word, MS Excel, PDF, YouTube) for viewing online documents or web pages. Mephistophilus was developed and released by an underground forum user with the nickname 'Kokain'. To successfully infect through a phishing kit, attackers must prompt users to click on the link leading to the page created by Mephistophilus. Regardless of the phishing page theme, users will see a pop-up window with a message that they need to install a missing plugin in order to view an online document or watch a YouTube video. To this end, Mephistophilus has various types of phishing pages that imitate legitimate online services:
Online viewer for Microsoft Office365 Word or Excel documents
Online viewer for PDF files
Cloned YouTube page
During this malicious campaign, the cybercrime group did not use only registered domain names to achieve their goals; they also used compromised e-commerce websites to store malware samples. Some of these websites were infected with the FakeSecurity JS-sniffer in previous attacks conducted by this cybercrime group.
In total, there were 5 unique links to 5 unique malware samples; four of them were stored on compromised websites running on CMS Magento:
The malware samples distributed during this campaign were samples of the Vidar password stealer, designed to intercept passwords from user browsers and various applications.
Vidar is a password stealer that intercepts passwords saved in browsers and various applications and files from infected computers. Apart from stealing passwords, Vidar collects files from infected computers by masks defined by malware operators and then sends these files to the C2 server. This feature facilitates the process of searching for and stealing cryptocurrency wallet files. Vidar is classed as malware-as-a-service; all data collected from infected computers is sent to the gate and then to a centralized administrative panel that each customer of the malware service can use to view collected data.
The Vidar stealer was developed and released in November 2018 by an underground forum user with the nickname 'Loadbaks'. According to the developer's description, Vidar steals passwords from browsers, files by predefined paths and masks, bank card information, cold cryptocurrency wallet files, Skype and Telegram chat history, and browser history. The rental price for this stealer ranges from $250 to $300 per month. The stealer's admin panel and domain names, which are used as gates, are located on servers controlled by Vidar's authors, which decreases the costs of stealer infrastructure support for customers.
In case of the malicious file msw070619.exe, apart from delivery via Mephistophilus landing pages, attackers also used a malicious DOC file with an embedded macro, BankStatement0040918404.doc (MD5: 1b8a824074b414419ac10f5ded847ef1), which drops executable files after editing is enabled. This DOC file was sent as an attachment in a malicious email message, which means that mass email sending was one of the aspects of the malicious campaign conducted by the cybercrime group.
The detected message (MD5: 53554192ca888cccbb5747e71825facd) was sent to the contact address of an e-commerce website running on the CMS Magento, which could mean that some of the campaign's targets were online shop administrators. The end goal of infecting Magento website administrators was to gain access to the Magento admin panel and other e-commerce CMSs in order to install a JS-sniffer and steal customer information.
The full infection process was therefore made up of these steps:
Attackers deployed the admin panel of the Mephistophilus phishing kit on the website alloaypparel.com.
Attackers used hacked websites and their own websites to store malicious payloads of password-stealing malware.
Using the phishing kit, attackers deployed multiple landing pages for malware distribution; they also created malicious documents containing macros designed to make victims download and install malicious payloads on infected computers.
Attackers sent mass emails containing malicious files and links to landing pages for malware installation. At least some of their targets were e-commerce website administrators.
If the website administrator's computer was successfully infected, attackers used the administrator's credentials to obtain access to the admin panel of e-commerce CMS in order to install a JS-sniffer designed to steal information about bank cards used by the customers of the infected online store.
Links to other attacks
Attacker infrastructure was deployed on the server with IP address 22.214.171.124, which is owned by a dedicated server provider, Panamaserver.com. Before the FakeSecurity malicious campaign, this server was used for phishing purposes and for deploying admin panels of various malware families in order to steal passwords.
Based on the characteristics of the FakeSecurity campaign, it is possible that the admin panels of Lokibot and AZORUlt stealers, which were deployed on this server, were used in previous attacks conducted by this group in January 2019. According to a blog post (https://myonlinesecurity.co.uk/lokibot-via-multiple-embedded-ole-objects-in-fake-invoice-rtf-word-docs/), on January 14th, 2019, unknown attackers sent mass emails containing malicious DOC files that installed Lokibot malware on infected computers. On January 18th, 2019, further mass emails were sent, this time containing malicious documents that installed samples of AZORUlt malware (https://twitter.com/dvk01uk/status/1086131035472048128). During this malicious campaign, there were three admin panels detected on the server with IP address 126.96.36.199:
The domain names chuxagama.com and umbra-diego.com were registered by the same user, using the email address firstname.lastname@example.org. This email address was also used to create the domain name worldcourrierservices.com in May 2016, which was later used as a website for the fake company World Courier Service.
Based on the fact that, during the FakeSecurity malware campaign, attackers used password-stealing malware, sent mass emails for its distribution, and used the server with IP address 188.8.131.52, we can suppose that both campaigns, including the campaign in January 2019, were conducted by the same cybercrime group.
Crime without punishment: in-depth analysis of JS-sniffers
JS-sniffers pose a growing threat by attacking online stores and stealing payment data and credentials of their users. When a website is infected with JS-sniffer, everyone is a victim – online shoppers, ecommerce websites, payment processing systems, and banks that issued compromised cards. Group-IB experts have researched this type of malware and have discovered 38 families of JS-sniffers, whereas only 12 were known previously.