Ransomware is a hot topic and it’s about to become hotter. Why? Because now it’s targeting our cloud services. Nearly one out of five malware detections in the past month in the Netskope Active Platform are document files such as Microsoft Word that contain macros. Earlier this week, cloud platform vendor Avanan blogged about a widespread ransomware attack, called Cerber, that is being spread via cloud productivity platform, Microsoft Office 365. Incidentally, we have seen these types of macro-type malware-delivered ransomware across a variety of cloud-based file-sharing apps, and we don’t believe there’s anything necessarily unique about detecting it in Office 365. The name Cerber is derived from Cerberus, a 3-headed dog that guards the entrance to Hades in Greek mythology.
Figure 1: Image from Cerber ransomware note
The attacks use a decoy document loaded with malicious macro code that downloads Cerber malware files to users’ machines. When the decoy document is opened, it drops a VBScript file (.vbs) with a random name in the format “%APPDATA%\%RANDOM%.vbs.” The VBScript file is then launched using wscript.exe, which downloads an image file named “mhtr.jpg.” This jpeg image is downloaded from the URLs solidaritedeproximite[.]org/mhtr.jpg, 92.222.104[.]182/mhtr.jpg. If the file is not found when visiting solidaritedeproximite[.]org, it will be fetched from 92[.]222[.]104[.]182 as shown in Figure 2 below. At the time of writing this blog, solidaritedeproximite[.]org was not serving the file and was instead delivered from 92[.]222[.]104[.]182.
Figure 2: Network packet capture displaying attempts to the URLs used to download mhtr.jpg
The image file mhtr.jpg looks benign and displays content related to “zen-coding,” as shown in Figure 3, but has steganographically (hidden in plain sight) embedded malware inside it which is decoded to an exploit as shown in Figure 4. This technique has been used by such historic malware families as Bredolab, but is seeing a resurgence as it permits executables to be transmitted without causing network monitoring devices to suspect malicious activity.
Figure 3: Image that would be displayed if someone opened mhtr.jpg
Figure 4: JFIF image and the encoded blob of mhtr.jpg
At the time of writing this blog, very few security vendors were detecting this image file as shown from the VirusTotal page in Figure 5.
Figure 5: mhtr.jpg sample detection in VirusTotal
In the next stage of the attack, a random name .exe binary is dropped in %APPDATA% in a hidden folder. In our observation, it was EFSUI.EXE as shown in Figure 6. This is detected by majority of the security vendors as referenced from the VirusTotal page.