Update August 31, 2017: Netskope Threat Research Labs has spotted that Locky variant LUKITUS now using 7Z format for email attachments. It uses simple names for attachment like documents.7z, photos.7z, scans.7z. The attachment contains malicious VBS script code which downloads Locky Ransomware and encrypts user files with “.LUKITUS” extensions as detailed in our recent blog. Netskope Threat Protection detects the VBS archived in the 7zip as “vb:trojan.agnt.cmbk” and the payload as “Win32:Trojan:Locky:L”.
Last year, Netskope Threat Research Labs blogged about various evolution stages of the popular Locky Ransomware namely usage of cloud apps, usage of DLL (Dynamic Link Library) instead of EXE (Executable File) and usage of “.AESIR” and “.ZZZZZ” extensions for encrypted files. Netskope Threat Research Labs has constantly been tracking campaigns related to Locky, which after remaining passive in last couple months has emerged with a massive ongoing email campaign. The emails are sent with zip file as an attachment. The zip file contains malicious VBScript or JavaScript which act as downloader for Locky variant Ransomware. The Ransomware on execution encrypts the files using a new extension “.LUKITUS”. Netskope Threat Protection detects the malicious VBS and JS files as Backdoor.js.ryw and Backdoor.JS.agnt.qvs respectively. The blog provides more details about the workings of the malware.
Analysis of VBScript and JavaScript files
As mentioned earlier, this variant of Locky spreads either via VBScript or JavaScript file bundled inside ZIP archives as attachments. Both format of the scripts are obfuscated. For example of one of the malicious VBScript code we analyzed is shown in Figure 1.
Figure 1: Malicious VBScript code
On the same lines, an example of one of the JavaScript code we analyzed is shown in Figure 2.
Figure 2: Malicious JavaScript code
These scripts act as downloaders, which on execution download and execute the LUKITUS variant of the ransomware. The script contains array of URLs to download malicious payload as shown in Figure 3.
Figure 3: List of URLs to download malicious payloads.
The malicious payload is downloaded from compromised domains as shown in Figure 4.
Figure 4: Malicious payload is downloaded from compromised domains.
The downloaded payload is saved under %TEMP% directory with random names. Both scripts download different payloads from compromised domains but the mechanism of downloading the LUKITUS variant payload is same. The details of the payloads downloaded by the scripts at the time of analysis are as listed below
VBS payload MD5: 3D4E88B3BA4D128BB171B74B1F6F641A
Netskope detection:Backdoor.ransm.cerbrkd.12157876
JS payload MD5: AE2E796443D66A9838E2EF9418C66F20
Netskope detection: Backdoor.generckd.5841337
The payload then uploads system information to its C&C server using HTTP POST request as shown in Figure 5.