Security Experts:

JavaScript-Based RAA Ransomware Drops Pony Info-Stealer

Malware authors have been long using JavaScript to distribute their malicious applications, but none of them has created a piece of ransomware using exclusively JavaScript until now.

After Ransom32 authors used NodeJS to create their threat and packaged it inside an executable, the brand new RAA ransomware is here to make a switch away from executables. RAA has been created as a standard JavaScript file and leverages the CryptoJS library to encrypt files on the infected machine, using AES encryption.

The distribution mechanism for this new threat is similar to that of many other malware families: malicious attachments in spam emails. The victim receives an attachment that pretends to be a document, but which is, in fact, a JS file, Bleeping Computer’s Lawrence Abrams explains.

When opened, the file generates a fake Word document in the %MyDocuments% folder and automatically opens it, but only to appear as if the attachment is corrupted. In the background, however, RAA is already running, initially focused on scanning all available drives to determine whether the current user has read and write access to them.

Should it be able to write to drives, the ransomware starts scanning for specific file types, then encrypts them using AES encryption. The malware appends the .locked extension to the filename of each encrypted file, while also deleting the Windows Volume Shadow Copy Service (VSS), in an attempt to make sure that users cannot restore their files from the shadow volume copies. The malware has two obfuscated functions that deal with the VSS service, to remove both the shadow copies and the service.

RAA targets just over a dozen file types, namely .doc, .xls, .rtf, .pdf, .dbf, .jpg, .dwg, .cdr, .psd, .cd, .mdb, .png, .lcd, .zip, .rar, .csv. While performing the encryption operation, it skips files that have .locked, ~, or $ in their filename, as well as those located in the following folders: Program Files, Program Files (x86), Windows, Recycle.Bin, Recycler, AppData, Temp, ProgramData, and Microsoft.

When the encryption process has been completed, the ransomware drops a ransom note on the desktop. The note includes the unique ID assigned to the victim in its filename, instructs users on how to get Bitcoin to pay the ransom, and informs the victims that they should pay within a week, or the decryption key will be deleted.

What’s even worse, however, is that the ransomware also drops the Pony info-stealer onto the compromised computers. The password-stealing Trojan isn’t fetched from the Internet, but comes embedded in the JS file. Apparently, RAA’s authors managed to find a way to convert Pony into a base64 encoded string, thus being able to distribute this piece of malware within the ransomware. The encoded string is decoded and saved to the %MyDocuments%\ folder as an executable file, then executed.

The JavaScript file is executed each time the user logs into the computer, meaning that RAA encrypts any files that have been created since the previous login. Furthermore, since the JS file is set as an autorun, the malware will extract and execute the Pony Trojan each time the user logins into the computer.

For the time being, the ransomware appears to be targeting only Russian-speaking users, given that the ransom note is in Russian. However, it might not be long before its authors decide to go international and RAA starts popping up in more locations, bringing Pony along with it.

Related: ZCryptor Ransomware Spreads via Removable Drives

Related: Ransomware-as-a-Service Lets Anyone be a Cybercriminal

Related: Attackers Leave Server Credentials in Ransomware's Code


view counter