What is Troldesh?
Troldesh, also know as Encoder.858 is ransomware belonging to the Shade ransomware family. It was created in 2014. The malware encrypts files on the victim’s machine and demands a ransom for the data to be restored.
Attempting to get as much information as possible the malware also scans the target PC for banking files or banking programs, in an effort to squeeze every last penny.
General description of Troldesh
Attacking Windows users mainly in Russia, Ukraine, and Germany, Troldesh is one of the three most commonly used encryption software in Russia.
In addition to this behavior, Troldesh ransomware often comes in conjunction with two particular malware samples, namely Mexar, and Teamspy, which allows attackers to control the victim's PC remotely and gives the virus the ability to install other malware on the infecting PC.
In fact, unlike most other ransomware, this virus does not stop executing after encrypting the victim’s files but instead starts an infinite loop where it requests URLs of other malicious programs from the command server, downloading and installing them on a contaminated machine. This means that most victims contaminated with Troldesh, in fact, may end up with a whole host of infections on their PC.
Even though the malware itself has not evolved a lot throughout its lifespan, the method which attackers use to demand the ransom has changed. The first malware samples used to provide an email address at which the victim could contact the hackers and negotiate the payment, whereas in newer campaigns ransom node demands victims to use the Tor browser in order to navigate to a payment page that is located on the Dark Web.
Being a part of the Shade family, Trodlesh shares several familiarities with related malware. As such, all members of the family are written in C++ and utilize CTL. Another shared feature is a static link with a Tor client. Every particular malware sample also has a hardcoded URL of the command server. Malicious programs of this family are also known to exhibit similar or identical behavior. As such, they create 10 identical ransom notes in two languages – Russian and English and name them README1.txt or README10.txt.
Troldesh malware analysis
A video simulation recorded on ANY.RUN allows us to examine the lifecycle of the Troldesh malware in a lot of detail.
Figure 1: Process graph generated by ANY.RUN helps us visualize the life cycle of the virus
Troldesh execution process
As shown in the ANY.RUN simulation, after running, the file immediately began performing malicious activity, namely: encrypting files, stealing personal data, deleting shadow copies and changing autorun values in the registry. Files encrypted by the latest versions of Troldesh are known to have .crypted000007 extension which was also the case in our simulation. Lastly, after encryption was completed the malicious executable file dropped ransomware instructions on the desktop.
Figure 2: Process tree of a Troldesh ransomware execution
How to avoid infection by Troldesh?
Since Troldesh is commonly distributed using malspam campaigns that mimic real company newsletters, a good way of staying safe is thoroughly checking for the authenticity of emails before downloading any attachments. If necessary, one can get in touch with a company who is the presumable author of the newsletter and verify that they have, in fact, sent the email.
Once infected, Troldesh installs several secondary malware samples on the victim’s PC, thus after Troldesh itself is cleansed from the PC, it is important to conduct a global system scan and make sure that one’s machine is not swarming with other viruses as well.
Distribution of Troldesh
Troldesh ransomware is known to utilize two main attack vectors – email spam and exploit kits. Malspam campaigns usually mimic legitimate information newsletters from real Russian companies, including banks and large supermarket chains. The emails themselves contain an archive file in which another script file is included.
Upon unpacking the archive and clicking on the file, a malicious loader is installed. It in turn downloads and installs the main payload – Troldesh itself. The loader is known to be stored on legitimate but compromised Wordpress websites where it is hidden as an image file.
Troldesh is also known to utilize Axpergle and Nuclear exploit kits, and these attacks are, arguably, even more dangerous than email spam as they don’t require active actions from the user for contamination process to begin. Instead, upon visiting a compromised URL, which can be a website hosted by the attackers or a legitimate website that has been hacked, the malware utilizes a vulnerability either in the browser itself or in one of the browser plugins, successfully penetrating into the users PC and starting the execution automatically. Thus, victims can get infected without ever realizing the danger.
Communication with C&C
Address information of C&C servers is embedded in the body of each malware sample. Servers themselves are hosted on the dark web and communication is established with the use of a Tor client.
Once installed on a victim's PC, the malware requests a public key value from the server to encrypt the victim’s files. Should the connection attempt fail, the virus uses one of one hundred private key values stored in its memory.
How to detect Troldesh using ANY.RUN?
Since Troldesh ransomware writes into registry analysts can detect it by looking at registry keys. Choose the process by clicking on it in the process tree of the task then click on the "More info" button. In "Advanced details of process" window switch to the "Registry changes" tab and take a closer look. If the analyzed sample writes a value "906D0F2E2F604F839E04" with the name "xi" into the key HKLM\SOFTWARE\System32\Configuration it's Troldesh.
Figure 3: Registry changes created by Troldesh
Troldesh is an extremely dangerous ransomware that is able to contaminate victims who simply end up browsing to the wrong place at the wrong time, ending up on a website hacked by the attackers. Unlike much other ransomware that simply demands money in exchange for user’s encrypted data, Troldesh doesn’t stop there and goes the extra mile to spread other dangerous malware samples on a victim’s PC.
Utilizing analysis services like ANY.RUN is a great way to examine the virus from a safe environment and develop a sufficient defense strategy.
On the 27th April, 2020 authors behind Troldesh ransomware announced that they stopped distribution of the ransomware and publish the decryption keys with decryption soft and instructions. They said that apologize to all the victims of the trojan and hope that the keys they published will help them to recover their data. You can take a look at the task in which their keys and tool were used to decrypt data.