Ideal for home and small business, NAS devices are dedicated file storage units connected to a network or through the Internet, which allow users to store and share their data and backups with multiple computers.
Independently discovered by researchers at two separate security firms, Intezer and Anomali, the new ransomware family targets poorly protected or vulnerable QNAP NAS servers either by brute forcing weak SSH credentials or exploiting known vulnerabilities.
Dubbed "QNAPCrypt" by Intezer and "eCh0raix" by Anomali, the new ransomware is written in the Go programming language and encrypts files with targeted extensions using AES encryption and appends .encrypt extension to each.
However, if a compromised NAS device is located in Belarus, Ukraine, or Russia, the ransomware terminates the file encryption process and exits without doing any harm to the files.
Moreover, later in this article, we have also explained how researchers took advantage of a logical weakness in the ransomware infrastructure that allowed them to stop this malware from infecting new victims temporarily.
"Based on the analysis it is clear that the proxy has been set up by the malware author to provide Tor network access to the malware without including Tor functionality in the malware," the Anomali researchers say.
Before encrypting files, the ransomware requests a unique bitcoin wallet address, where victims are supposed to transfer the ransom amount, from the attacker's C&C server that contains a predefined list of already created bitcoin addresses.
Interestingly, researchers at Intezer took advantage of this mechanism and created a script that allowed them to trick the attacker's C&C server into assigning all available bitcoin addresses to hundreds of virtual victims, thereby blocking the ransomware from encrypting files for new legitimate victims.
Zero Trust + Deception: Learn How to Outsmart Attackers!
Discover how Deception can detect advanced threats, stop lateral movement, and enhance your Zero Trust strategy. Join our insightful webinar!Save My Seat!
"Since the authors behind this ransomware were delivering one Bitcoin wallet per victim from a static pool of already generated wallets, we could replicate the infection packets to retrieve all of the wallets until they had no further wallets under their control," Intezer said.
"We were able to collect a total of 1,091 unique wallets meant to be delivered to new victims distributed among 15 different campaigns."
If the ransomware gets its unique bitcoin wallet, it generates a 32-character random string to create an AES-256 secret key and then uses it to encrypt all the files stored on targeted NAS device with AES algorithm in Cipher Feedback Mode (CFB), removing the original files.
"Malware initializes the math random page with the seed of the current time. Since it is using the math's package to generate the secret key, it is not cryptographically random, and it is likely possible to write a decryptor," the Anomali researchers said.
"The threat actor targets QNAP NAS devices that are used for file storage and backups. It is not common for these devices to run antivirus products, and currently, the samples are only detected by 2-3 products on VirusTotal, which allows the ransomware to run uninhibited."
Researchers also noted that before encrypting files stored on targeted NAS devices, the ransomware also attempts to kill a specific list of processes, including apache2, httpd, nginx, MySQL, mysql, and PostgreSQL.
As a reminder, we urge users not to, unknowingly or unnecessarily, connect their NAS devices directly to the Internet, and also enable automatic updates to keep firmware up-to-date.
Moreover, users are always recommended to use strong passwords to secure their NAS devices in the first place and regularly backup stored information on these devices, so that in case of any disaster, the important data can be recovered without paying ransom to attackers.