Early March of this year, we blogged about multiple malspam campaigns utilizing Excel 4.0 Macros in .xls 97-2003 binary format. In this blog, we will present one more Excel 4.0 Macro spam campaign in the same format crafted with another old MS Excel feature to evade detection.
Different themes were used in this campaign – ranging from generic themes like fake invoices to the hottest theme nowadays, Coronavirus. The subjects of the spam are composed of a word related to the theme and a series of numbers.
The spam in this campaign have a one-liner email body and one attachment, and they both contain the series of numbers found in the Subject. The text in the email body just directs the recipient’s attention to the attachment which is an Excel file. The filename of the attached Excel file includes the local part of the recipient’s email address.
The “Password Protected“ Attachment
The XLS attachments from the spams shown in Figure 1 were encrypted through password protection. A password has been applied to the Excel files, which used the Microsoft Enhanced Cryptographic Provider v1.0 algorithm to encrypt the attachments. Password-protected documents can only be opened with the correct password as this is the key needed in the decryption process.
In MS Excel with macros disabled, we tried opening the attachments obtained from Figure 1. However, the Excel application did not display the password prompt as expected. Since their file structures indicate the XLS files are password protected, we used Didier Stevens’ msoffcrypto-crack tool to obtain their passwords. All the XLS attachments have the password “VelvetSweatshop”.
Excel first attempts to open a password protected Excel file using its default password “VelvetSweatshop” in read-only mode. If this default password fails to open the encrypted Excel file, then the application will launch the password prompt and ask the user for the password. This read-only technique has been known about for over 10 years and is now being leveraged by spammers recently.
Since the XLS files were encrypted using the default password, they ran in Excel as if they were not password protected. In the background, Excel already opened them using the default password. Hence, no password input was required from the user nor was a warning from the application prompted. The content of the XLS files was immediately displayed.
All the Excel files in this campaign had macro downloaders. They contain a worksheet which acts as a lure for the victim to enable the macro setting, and multiple hidden Excel 4.0 macro sheets. Although the number of hidden macro sheets varies between the samples, the characteristics of their filenames are consistent. Two of the macro sheets have randomized filenames and the rest start with “Macro” then followed by a number.
The malicious behavior of the XLS files arises from one of the hidden macro sheets with a randomized name - this is always the one referenced by the autorun as shown in figure 5. The macro will download a binary from a compromised site, save it on disk under C drive, and execute them.
Each set of spams shown in Figure 1 leads to a compromised site that hosts malware Gozi, a banking trojan. The first download URL is already inaccessible at the time of investigation however the site was known to host the said malware.
As for the second URL, we were able to download a GOZI malware Sha1: c42006626c38640404ca4e0b0402bf7ffa0d53b0. Its C&C is dropshipbear[.]xyz.
Usually, the major component to the success of delivering malware via a password protected attachment is the email recipient’s intuition. The user must be enticed enough to open the attachment using the password provided in the email. But with the campaign presented here, the spammers found a way to eliminate this step. Using Excel’s own feature, the spammers were able to bypass the user input for the password protected Excel files.
We are observing an increasing number of malspam leveraging these password protected Excel 4.0 macro likely because the malware authors found it effective in evading email gateway and other scanners. One of the Excel files we have seen from the campaign above has a VT score of 2/59 as of this writing. The Trustwave Secure Email Gateway is currently blocking this threat.
Note: Malware crafted using the two old Excel features shown in this blog are still macros and are still ineffective if Trust Center settings are set to at least medium security which will prevent macros from automatically running.
jack_697121_.xls SHA1: ec7ebd1e4acfb2aae63f79e85084937c18f17f0b
vish_362106_.xls SHA1: 9296d886c0d2f1254df234507301409990fa34a9
dmitry.nosickow_283615_.xls SHA1: 29cd551c40014f93792c47dc4766abc85857bd92
jason_961079_.xls SHA1: ee819a9d0a467deaf1c2855ed441ad52029118fc
jbishop_737231_.xls SHA1: 358e5086c38aa2e67add6a14bfc89cffec06af37
lindsay.polkinghorne_577859_.xls SHA1: 6d1d801d856cd363f2e6b058c141c31e7f9d1628
dmitry.nosickow_831493_.xls SHA1: 4192ace9a8d9c5b905db4cdc18a1628633cf18f5
dmitry.nosickow_612949_.xls SHA1: 7029603deebdd8c4a15a3bd2cc23a719dadc194b
dmitry.nosickow_487325_.xls SHA1: bab3fc09504f73f177cb9005be1b732e9118dde3
katie_366948_.xls SHA1: 5f4c8cc1ee2953d52894d1f2e44f0e2d406f9249
teresa-646071021.xls SHA1: 5ADB73196A8511561A0ACD130C80F02A8698F059