"Locky" Ransomware Encrypts Unmapped Network Shares

Security researchers have discovered a new piece of ransomware called Locky, which uses AES encryption algorithm to encrypt both local files and files on network shares, even if they are unmapped.

Locky is the second ransomware observed in the past few weeks to encrypting data on unmapped network shares, which suggests that other malicious programs might follow suit, especially since cybercriminals tend to inspire themselves from existing code when building new malware, as was the case with Hidden Tear, the so-called educational ransomware.

In fact, Locky employs techniques already observed in other ransomware, namely the fact that it completely changes the filenames for encrypted files to make it more difficult to restore data, a feature previously observed in CryptoWall.

The new piece of malware is being distributed via fake invoice emails that contain Word document attachments with malicious macros. When the user enables macros to view the content of the document, the Locky ransomware is downloaded from a remote server and executed, and it immediately begins encrypting files on the compromised system.

When started, Locky creates and assigns a unique 16 hexadecimal number to the victim’s computers, when will scan all drives and unmapped network shares for files to encrypt. The malware uses the AES encryption algorithm and targets only file extensions matching a certain criteria, BleepingComputer notes in a blog post.

The malware will skip files that contain the following strings in their full pathname and filename: tmp, winnt, Application Data, AppData, Program Files (x86), Program Files, temp, thumbs.db, $Recycle.Bin, System Volume Information, Boot, and Windows.

All encrypted files are automatically renamed to [unique_id][identifier].locky, with the unique ID and other information also embedded at the end of the encrypted file. Additionally, the malware will delete all of the Shadow Volume Copies on the machine, to prevent victims from using these to restore their files.

The malicious program places a ransom note called _Locky_recover_instructions.txt in each folder where it encrypts files, providing victims with info on what happened to their files and with links to the decrypter page. Additionally, the ransomware changes the desktop wallpaper to a .bmp image that contains the same instructions as the text ransom notes, and asks users to pay 0.5 bitcoins to recover their files.

Locky also stores various information in the registry, including the unique ID assigned to the victim, the RSA public key, the text in the ransom notes, and details on whether it finished encrypting the computer. The Locky Decrypter Page shows information on how to purchase bitcoins to pay the ransom, and provides victims with a decrypter when payment is sent to the assigned bitcoin address.