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.
Figure 5: C&C communication over HTTP POST request.
The payload then encrypts files with LUKITUS extension as shown in Figure 6.
Figure 6: Files are encrypted with LUKITUS extensions
Once it finishes the encryption of files, it will display a ransom warning as shown in Figure 7.
Figure 7: LUKITUS ransom warning message.
Conclusion
Locky ransomware continues to be in the limelight using different variants since its inception. We have seen a huge spike in LUKITUS variants in last couple of days. Although, there is no major change apart from the new extension for encrypted files, the spike in campaign suggests that the threat actors behind the campaign are still using Locky Ransomware to spread and infect systems.Since the variants have a similar infection mechanism with only a change in extensions for encrypted files, we potentially suspect the use of a Locky payload builder toolkit. Netskope Threat Research Labs is continuously monitoring the evolution of ransomware strains, including Locky, and will report the use of any new techniques and evasions.
General Recommendations
Netskope recommends the following to combat cloud malware and threats:
- Detect and remediate cloud threats using a threat-aware CASB solution like Netskope and enforce policy on usage of unsanctioned services as well as unsanctioned instances of sanctioned cloud services
- Sample policies to enforce:
- Scan all uploads from unmanaged devices to sanctioned cloud services for malware
- Scan all uploads from remote devices to sanctioned cloud services for malware
- Scan all downloads from unsanctioned cloud services for malware
- Scan all downloads from unsanctioned instances of sanctioned cloud services for malware
- Enforce quarantine/block actions on malware detection to reduce user impact
- Block unsanctioned instances of sanctioned/well known cloud services, to prevent attackers from exploiting user trust in cloud. While this seems a little restrictive, it significantly reduces the risk of malware infiltration attempts via cloud
- Enforce DLP policies to control files and data en route to or from your corporate environment
- Regularly back up and turn on versioning for critical content in cloud services
- Enable the “View known file extensions” option on Windows machines
- Warn users to avoid executing unsigned macros and macros from an untrusted source, unless they are very sure that they are benign
- Warn users to avoid executing any file unless they are very sure that they are benign
- Warn users against opening untrusted attachments, regardless of their extensions or filenames
- Keep systems and antivirus updated with the latest releases and patches
Indicators of Compromise (IOCs)
Malicious VBScript MD5: 3D4E88B3BA4D128BB171B74B1F6F641A
Malicious Javascript MD5: 13bea407806390f8c3f823a5ebdcae59
JavaScript downloader scripts