AhnLab Security Emergency response Center (ASEC) has recently discovered the case of Remcos RAT being installed on poorly managed MS-SQL servers.
Unlike the past attack, the recent case showed the threat actor using sqlps to distribute the malware. Sqlps is SQL Server PowerShell and is included in the SQL Server installation procedure. SQL Server Powershell allows users to use the Powershell cmdlet which is needed to manage SQL Server instances. The attacker exploited this trait in distributing the malware.
Figures 1 and 2 show AhnLab’s AhnLab Smart Defense (ASD) logs. One can see how the threat actor breaches poorly managed MS-SQL servers and uses the sqlps command to download the malware in the %temp% directory before executing it. The malware installed is a file written with QSetup Installation Suite. QSetup Installation Suite is an installer maker that can be used in Windows operating systems. When the malware is run, the following files are generated in the temp directory and the Dust file is executed.
The Dust file created in the temp directory in Figure 3 is an obfuscated VBS script file and executes the command shown in Figure 4. It creates a folder with a random name and combines the files in the temp path to make an installer. The generated installer is a normal AutoIt executable.
The Lone file generated in the temp path in Figure 3 is an obfuscated AutoIt script file. Lone is executed through the generated normal AutoIt executable, which then decrypts Remcos RAT to inject and run it. The executed Remcos RAT attempts to connect to 188.8.131.52[:]2290 to gain remote control features on files and process tasks in the infected system.
Typical attacks that target MS-SQL servers include brute force attacks and dictionary attacks on systems where account credentials are poorly managed. Admins must also use passwords that cannot be easily guessed and change them periodically to protect the database servers from brute force and dictionary attacks.
Users must practice caution by updating V3 to the latest version to block malware infection in advance. In addition, admins should use security programs such as firewalls for database servers accessible from outside to restrict access by external threat actors. If the above measures are not taken in advance, continuous infections by threat actors and malware can occur.
- Trojan/Win.RemcosRAT (2023.02.18.00)
Subscribe to AhnLab’s next-generation threat intelligence platform ‘AhnLab TIP’ to check related IOC and detailed analysis information.