Yara rule courtesy of Blackberry Threat Research Team, Blackberry 22 April 2021
import "pe"
rule Mal_W32_Ransom_Cuba
{
meta:
description = "Cuba Ransomware"
author = "Blackberry Threat Research"
date = "2021-04-12"
strings:
//Good day. All your files are encrypted. For decryption contact us.
$x0 = {476f6f64206461792e20416c6c20796f75722066696c65732061726520656e637279707465642e20466f722064656372797074696f6e20636f6e746163742075732e}
//We also inform that your databases, ftp server and file server were downloaded by us to our servers.
$x1 = {576520616c736f20696e666f726d207468617420796f7572206461746162617365732c206674702073657276657220616e642066696c6520736572766572207765726520646f
776e6c6f6164656420627920757320746f206f757220736572766572732e}
//FIDEL.CA
$x2 = {464944454c2e4341}
//!!FAQ for Decryption!!.txt
$x3 = {21002100460041005100200066006f0072002000440065006300720079007000740069006f006e00210021002e00740078007400}
//MySQL80
$x4 = {4d007900530051004c0038003000}
//MSSQLSERVER
$x5 = {4d005300530051004c00530045005200560045005200}
//SQLWriter
$x6 = {530051004c00570072006900740065007200}
//SQLBrowser
$x7 = {530051004c00420072006f007700730065007200}
//sqlservr.exe
$x8 = {730071006c00730065007200760072002e00650078006500}
condition:
uint16(0) == 0x5A4D and
filesize < 3MB and
pe.imports("mpr.dll", "WnetEnumResourceW") and
pe.imports("mpr.dll", "WNetCloseEnum") and
pe.imports("mpr.dll", "WNetOpenEnumW") and
pe.imports("netapi32.dll", "NetShareEnum") and
8 of ($x*)
}