The end-of-year holidays are a lucrative time for phishing attackers and spammers as they try to leverage the festive season to victimize online consumers. This season also puts pressure on the retail industry to build up their inventory to meet the seasonal demand. Netskope Threat Research Labs has been tracking multiple campaigns where phishing emails are crafted to target the retail industry. The email body observed in these campaigns is specifically crafted to lure the warehouse managers and other smaller firms who provide inventory support to larger retail businesses. Netskope Threat Protection detects these malicious MS Office file attachments as Trojan.Valyria.111 and the dropped payload as Gen:Variant.Graftor.421418.
Attack Vector
As mentioned earlier the attack vector arrives as an email with an attachment as shown in Figure 1.
Figure 1: Email example targeting specific businesses
The email contains a weaponized Microsoft Excel or Word document file with embedded macros. In a number of enterprises, email attachments are often automatically synced to cloud storage services using file collaboration settings in popular SaaS applications and third-party applications. Since the file names appear less suspicious, they are more likely to be viewed as coming from within the organization (and therefore trusted) and shared with others in the same user group thereby resulting in a CloudPhishing fanout effect.
The doughnut chart shown in Figure 2 depicts the top enterprise cloud applications where CloudPhishing is dominant. Applications linked with email clients are mostly affected. For example, Microsoft OneDrive and Google Drive seamlessly integrate with their email clients and hence the files get synced across all users accessing the synced drive folders.
Figure 2: Distribution of malicious attachments stored in Cloud Applications
Analysis of malicious document
The attack follows the usual scenario wherein the office document contains an embedded macro and upon opening it prompts to enable editing. The list of indicators from the embedded macros upon executing Olevba from Oletools is shown in Figure 3.
Figure 3: List of indicators captured by Olevba
As shown in the above figure, the Excel document contains workbook_open() function which denotes the execution of the macro code when the document is opened. The initial macro code is highly obfuscated with the nature of the subroutines containing long variable declarations. All these functions are then called within workbook_open() as shown in Figure 4.
Figure 4: Obfuscated functions called by workbook_open()
Upon deobfuscation, the VB macro launches command prompt which in turn invokes Powershell. A simple representation of the shell command is shown in Figure 5.
Figure 5: Powershell command execution performed by the malicious macro
The PowerShell command then begins to download the payload from an SSL website https://lambda[.]sx , which appears to be a web server built using the GO programming language and open-sourced here: