We generally see that ransomware attacks are deployed through exploits, unsolicited malicious emails (malspam), or malicious Microsoft Office documents. Attackers trick the unsuspecting users into enabling macros, etc. Apart from these usual attack techniques, we came across a new way of using Anydesk software fake websites to spread Babuk ransomware. Anydesk is a remote-control tool that allows users to access remote computers and other devices running the host applications.
Babuk Ransomware is recently very active. Its tactics for encryption are not much different from other ransomware families. Over time, ransomware releases new variants and improves its attack mechanisms to target new victims.
When the user tries to download the Anydesk software from an unknown suspicious link, a fake website appears, which allows you to download Anydesk software. This fake website looks like the original Anydesk website. When the user clicks for downloading Anydesk software, ransomware is also downloaded as it is bundled with Anydesk software in the form of a self-extracting archive (in this case, it is in no setup files). It does so for evasion purposes.
For, e.g., If Anydesk is searched in Microsoft or Bing, we get the following result. The first website is not related to the official Anydesk application, and After clicking on the setelog website, ads.htm redirects to a malicious website that downloads ransomware.
Similarly, we have found one more suspicious link for the Anydesk application, which is mentioned below.
Downloaded File Name: Setup_Anydesk.exe
We analyzed the downloaded archive and discovered that it has a clean Anydesk setup along with a Babuk downloader, a RAT file, and a REG file.
Understanding the Infection Process
When a user clicks on the downloaded archive, which pretends to be an Anydesk software application, other files in the bundle get dropped silently. The above image shows an Allakore Rat client named bthudtaskt.exe, a Babuk downloader called mdnsFULLHD.exe, and one registry file named Anydesk. Reg is fallen in the Startup folder without user interaction. Clean Anydesk application is dropped at the desktop, and it gets installed. All the dropped files in the startup folder are executed through PowerShell and their activity in the background.
Anydesk. reg file disables user account control by setting the value of EnableLUA by 0. It also disables windows defender by setting the value of DisableAntiSpyware by 1. Malware also disables real-time protection by setting values by 1.
Allakore RAT Client:
AllaKore Rat is an open-source simple Remote Access Tool written in Delphi and has a very high resemblance with code found on GitHub.
Babuk Downloader launches the Allakore Rat, and it makes TCP requests, as shown below.
The ‘mdnsFULLHD.exe’ file is PE32 executable for MS Windows, and it is Delphi compiled. It is immense (~ 12MB) as it has most of the code to impair the defences. It launches the Allakore Rat ùsing PowerShell cmdlet Set-preference, making TCP requests as shown above image.
It adds the below paths in exclusion for the Windows Defender modules through the PowerShell cmdlet Set-MpPreference to hide all the malware components from Windows Defender.
cmd.exe /c PowerShell -Command Add-MpPreference -ExclusionPath “C:\Users\XXX\Contacts”
cmd.exe /c PowerShell -Command Add-MpPreference -ExclusionPath “C:\Users\XXX\Links” etc
Above are excluded by executing cmd.exe. The malware also excludes the below drives.
It has a list of AVs, as shown below, and it checks if any of the antivirus product is installed in the system.
If any antivirus processes are running on the system, the below prompt appears, asking the user to intervene and uninstall the product. If the user clicks on the Next button, the control panel opens for uninstalling the software, and in the background, the malware checks whether it is uninstalled.
The malware disables Task manager, and it undermines all the modules of Windows Defender.
Further digging into the file revealed that malware sent an HTTP request to download the bat file and .exe file. The domain used are:
These downloaded files are saved in:
“C:\Users\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup” folder. Malware creates these files and names according to the user name and then executes both the files silently using PowerShell.
Files created: .exe and .bat
E.g., if the username is ABC, the file name is ABC.exe and ABC.bat in the folder mentioned above.
Update.exe: BABUK PAYLOAD
Downloaded Update.exe file is a Babuk ransomware payload. It is UPX packed file, and the size is small, around 25 KB. Malware is compiled in C/C++.
After execution, it launches the vssadmin.exe process to delete all Shadow Copy using the command “vssadmin.exe delete shadows /all /quiet.” It also creates “mutex” with the name “DoYouWantToHaveSexWithChuongDong” in the system.
Malware closes all the processes that are listed, which prevents file encryption. It also empties the Recycle Bin by calling the function SHEmptyRecycleBinA(), and it enumerates system folders and drives and creates ransom notes in each folder.
It encrypts all files by the extension “.doydo”. An extension may vary according to the payload variant downloaded.
Malware appends the string “choung dong looks like a hot dog!!” at the end of the encrypted content of all the encrypted files.
After a successful attack, if the victim does not pay the ransom as demanded, the malware author either publishes the encrypted data or sells it on underground forums.
This use case is not limited to a specific threat actor. However, we believe that this type of infection is affecting a wide range of Anydesk users. Using tools like Anydesk or other administrative agencies, the malware authors can easily take administrative privileges of the victim’s computer and perform the malicious activity in the system.
In the end, we emphasize the customer to be very careful while clicking on links that are used for software download or any link received by email, messages, or WhatsApp. Always check whether the website is official and secure or not.
Here are a few additional guidelines that will help minimize the attack surface & possible damage to IT infrastructure.
Quick Heal products are equipped with multi-layered detection technologies like IDS/IPS, EDR, DNA Scan, Email Scan, NGAV, Web Protection, and Patented Anti Ransomware detection. This multi-layered security approach helps us protect our customers against Babuk Ransomware and other known, unknown threats.
Anydesk Innosetup files:
Allakore Rat Client: