Microsoft SQL Servers Under Siege: A Dual-Threat of Cryptomining and Remote Access Trojans
A recent cybersecurity report from FortiGuard Labs has uncovered an ongoing attack campaign targeting Microsoft SQL Server instances exposed to the internet. Attackers have adopted a sophisticated multi-stage approach, compromising database servers to deploy both cryptocurrency miners and a potent remote access trojan (RAT), posing a dual threat to organizational resources and data.
The Attack Chain: From Credential Guessing to Full Control
The intrusion begins with attackers scanning for publicly accessible SQL Server installations. They employ a classic but effective method: password brute-forcing. Utilizing a dictionary containing over 2,700 common passwords alongside default usernames like 'sa' and 'admin', they attempt to gain unauthorized access.
Once authentication is breached, the attack escalates rapidly:
- Enabling xp_cmdshell: Attackers leverage the xp_cmdshell stored procedure to execute operating system commands, establishing a foothold on the server.
- Deploying a Downloader: A lightweight downloader is installed, tasked with fetching the final malicious payloads from an attacker-controlled command-and-control (C&C) server.
Dual Payloads: Immediate Profit and Long-Term Access
The delivered payloads reveal the attackers' twofold objective: instant monetization and persistent access.
The first payload is a Monero cryptocurrency miner. To evade detection, it masquerades as a legitimate process named "MicrosoftEdgeUpdate.exe." At its core is the XMRig software, which hijacks server CPU cycles to generate cryptocurrency revenue for the attackers.
Simultaneously, a malicious file named "winlogon.exe" is deployed. Analysis identifies it as a variant of the notorious Gh0st RAT, which provides attackers with extensive capabilities including:
- Keystroke logging
- File system management
- Remote command execution
Robust Persistence Mechanisms
To ensure survival after system reboots, the attackers implemented multiple persistence techniques:
- Modifying Windows Registry keys
- Creating malicious Windows services
- Setting up Windows Scheduled Tasks. Notably, the RAT's task was configured to run every 30 minutes, maintaining a persistent communication channel with the C&C server.
The report notes that the C&C server used in this campaign was offline during the analysis period, complicating attribution. While the exact number of victims and the identity of the attackers remain unknown, the campaign highlights the critical risk faced by internet-exposed SQL Servers with weak authentication.
This incident serves as a stark reminder for organizations to enforce strong password policies, adhere to the principle of least privilege, and implement robust monitoring for any publicly accessible critical services.