The current campaign uses a common, but effective, technique to trick users by using fake delivery notifications from UPS, USPS ,and FedEx. The email attachment is either a ZIP file that archives a double extension file (*.doc.html) or a standalone double extension HTML file.
Figure 1: Sample emails
An overview of the infection process from the HTML attachment, through to the installation of the malware families is shown and discussed below.
Figure 2: Complete Infection Chain
The HTML document will trick the user to click and download an "Office365 plugin" but in the background, the HTML actually contains an embedded base64-encoded ZIP file.
Figure 3: Embbed ZIP file
When executed, the HTML extracts a JS file (Install-MSOffice365-WebView-Plugin-Update-0.165.11a.exe.js). This file will create a URL address based from different domain names listed in its array and tries to connect to each of them. Once connected, the fake WebView Plugin will download a JS file named as "COUNTER", and immediately executes it after a de-obfuscation process.
Figure 4: Install-MSOffice365-WebView-Plugin-Update-0.165.11a.exe.js
List of URLs:
Figure 5: The Obfuscated – COUNTER JS FIle
The COUNTER file, once properly de-obfuscated, will again try to build different URLs using different domain names. There will be two possible URLs from each domain. The first URL will download the CERBER family and the second URL will download KOVTER. Both URLs will download a file with a *.PNG extension that will be renamed to *.EXE and executed later.
Figure 6: The De-Obfuscated – COUNTER JS FIle
Figure 7: HTTP Download Stream – CERBER
Spam emails using fake delivery notifications are nothing new but are still being used with different combinations of attachments. In this case, HTML attachments are used to download malware instead of the usual EXE, PDF or Office Documents. Indeed, malicious HTML attachments themselves are also not new but the interesting thing in this case was that it contained encoded archives (ZIP) which led to multiple malwares being downloaded. Perhaps HTML is seen as more innocuous, and is used more to freely pass through email gateways. To make things even more interesting, layers of obfuscated files and multiple landing sites to download the binaries is incorporated in the whole infection chain.
One way to prevent this kind of attack is make sure that nothing will be executed in the first place. The Trustwave Secure Email Gateway can detects and blocks this campaign at the gateway.