F
ForgottenSeer 56325
Thread author
News broke last week of a ransomware attack targeting the San Francisco Municipal Transport Authority (SFMTA, or 'Muni'), and security researchers have now taken a closer look at the malware used.
The malware, known as HDDCryptor or Mamba, was spotted for the first time at the beginning of 2016, though it was first detailed only in September. The main characteristic of the threat was the use of open source tools to encrypt the entire hard drive by rewriting the MBR (Master Boot Record).
The malware, known as HDDCryptor or Mamba, was spotted for the first time at the beginning of 2016, though it was first detailed only in September. The main characteristic of the threat was the use of open source tools to encrypt the entire hard drive by rewriting the MBR (Master Boot Record).
The malware supposedly spreads through a targeted attack or exploit and doesn’t use automated tools such as exploit kits or other installers to instantly compromise and infect victims, researchers say. The installation and execution of the malware are supposedly performed manually, and the attackers supposedly used scheduled jobs to ensure that the ransomware will run on SFMTA’s 2,000 machines.
The malware variant used in the attack against Muni was seen dropping the tools it needed in a “C:\Users\WWW” folder, which was the main differentiator from the previously spotted variants, which created a new user for that. Once the needed components are downloaded, the ransomware tries to encrypt remote network shares, after which it reboots the system to prepare for local encryption.
According to Trend Micro researchers, the ransomware then reboots the system one more time to show the modified MBR as the ransom note. While this process remained unchanged from one variant to the other, the email address and phrasing did change between versions.
To encrypt files on remote systems, the malware uses mount.exe, with each drive to be encrypted sent in as an argument to this executable. The password that was passed in as an original argument to HDDCryptor is also included. Interestingly though, the mount.exe file doesn’t use the DiskCryptor methods for encryption, although it does employ the open source tool for encrypting the main hard drive.
Another interesting fact is that mount.exe was found to be dropped onto the infected machine encrypted, with the malware never actually attempting to decrypt it. Instead, Fortinet researchers say, the malware continued to try and execute the file as it is, which didn’t return the expected result.
Because the log message about network share encryption was removed too, the security researchers believe that the ransomware’s operators might have considered removing this feature altogether. Another issue spotted in this malware variant was its attempt to find the %/Users/ABCD directory that was used in a previous variant.
The malware’s strings are encoded by Base64 algorithm, which is a simple obfuscation method, most probably meant to be effective only against signatures based on the strings included in the previous versions.
According to Trend Micro, there are changes in the PDB strings of mount.exe, which show a different number compared to that used in previous variants. Moreover, the researchers say that HDDCryptor’s authors decided not to recompile DiskCryptor for their nefarious purposes, but merely patched the dcapi.dll file to add the ransom note.
“Previous versions had all dropped files as clear PE resources of the main dropper. Since v2, HDDCryptor actors use a simple decryption scheme to decrypt the binaries in its .rsrc (resource) section,” Trend Micro researchers say.
Other improvements spotted in the latest HDDCryptor variants include basic anti-sandbox and anti-debugging features, along with simple resources encryption. This shows that the malware’s authors are focusing on antivirus evasion and other detection techniques. Just as before, however, the actors are believed to have prior access to the compromised systems and to manually execute HDDCryptor.
“It is believed that this is done over RDP that is exposed to the internet directly, apart from exploiting tools. Given the fact is easy to buy access to compromised servers within the underground. HDDCryptor actors may be using this technique, too,” Trend Micro says.
According to Fortinet, HDDCryptor operators might have been exploiting a vulnerability related to an unpatched Oracle server program to gain access to the Muni system. “It’s an old vulnerability, and a simple update to patch the system could have saved them a lot of money, along with a great deal of inconvenience and public embarrassment,” Fortinet notes.