Sophisticated Malware Campaign Exploits Microsoft SQL Server Vulnerabilities to Deploy Cryptominers and Remote Access Trojans

A persistent and highly coordinated cyberattack campaign has been identified targeting internet-facing Microsoft SQL Server instances, leveraging weak administrative credentials to compromise enterprise environments. The attackers, whose origins remain unidentified, have successfully deployed a dual-pronged malicious payload consisting of a Monero cryptominer and the notorious Gh0st remote access trojan (RAT). This campaign, which was first detected by researchers at FortiGuard Labs in early October 2026, has been classified as a high-severity threat due to its ability to maintain long-term persistence and facilitate deep-level system infiltration.

The details of the operation were made public on November 12, following an extensive investigation by Fortinet’s threat research team. While the researchers confirmed the methodology and the specific tools employed by the threat actors, the exact scale of the compromise—specifically the number of organizations impacted—remains unclear. Furthermore, the identity and motivation of the attackers behind this infrastructure have not yet been attributed to any known advanced persistent threat (APT) group, leaving the cybersecurity community to grapple with yet another example of automated, opportunistic exploitation.

The Anatomy of the Attack: From Scanning to Exploitation

The campaign begins with a highly automated reconnaissance phase driven by a Go-based payload that incorporates the open-source Naabu port scanner. This tool is designed to systematically map the internet for vulnerable targets. The attackers’ command-and-control (C2) server provides the scanner with specific IP ranges, which the malware then probes for TCP port 1433—the default port for Microsoft SQL Server. When a server responds, the host is recorded as a potential target. Once the scanner exhausts a given range, it requests a new set of IP addresses from the backend, creating an endless, automated loop of discovery that allows the attackers to continuously expand their footprint.

Once a target has been identified, the threat actors initiate a brute-force assault. Utilizing a specialized tool, the malware attempts to gain unauthorized access by cycling through a massive dictionary of over 2,700 passwords against common administrative usernames such as "sa" (System Administrator) and "admin." The prevalence of these default or weak credentials continues to be a significant security blind spot for many organizations. By relying on common passwords, administrators inadvertently provide the attackers with the keys to the kingdom, bypassing more complex defensive measures.

Upon a successful authentication, the attackers transition to the exploitation phase. They leverage Transact-SQL (T-SQL), the primary programming language used by SQL Server to manage and manipulate data. Because T-SQL is designed for powerful database administration, it provides attackers with extensive control over the underlying operating system once they have achieved high-level privileges.

The primary goal of these T-SQL commands is to enable the xp_cmdshell feature—a well-known configuration option that allows the execution of Windows shell commands directly from the SQL Server environment. By enabling this, the attackers gain the ability to execute arbitrary code on the server’s operating system. They immediately utilize this functionality to download and unpack a malicious loader. To ensure the malware survives a server reboot, the attackers program the loader to execute daily and place a persistent copy within the Windows Startup folder. This loader subsequently fetches additional malicious modules from an external FTP server and registers the compromised host with the attackers’ backend infrastructure. The registration process is exhaustive, harvesting sensitive system metadata including the public IP address, geographical location, Windows version, hardware specifications, and even the specific timestamp of the Windows installation.

Cryptojacking and Stealthy RAT Deployment

Once the compromised server is fully integrated into the attackers’ infrastructure, the malicious payload is delivered. The first component of this payload is a Monero (XMR) cryptominer, heavily based on the well-known XMRig framework. The miner is configured to utilize the server’s CPU power to generate cryptocurrency for the attackers. In an attempt to evade detection by system administrators and automated security monitoring tools, the malware disguises itself as a legitimate "Microsoft Edge Update" process. This naming convention is also applied to two of the scheduled tasks created by the malware, a clever technique designed to blend in with the normal background noise of a Windows server environment.

The second component of the attack is a variant of the Gh0st RAT, a persistent and highly invasive remote access trojan that has been a staple in cybercriminal arsenals for years. This variant is specifically designed to hide within the Windows system processes, further masking its presence. Although the specific C2 server used for this RAT had been taken offline by the time the FortiGuard researchers conducted their analysis, the static examination of the code revealed a dangerous breadth of capabilities.

The Gh0st RAT variant is capable of executing more than 30 distinct control commands, allowing the attackers to effectively take full control of the compromised server. Its feature set includes keylogging, comprehensive data exfiltration, screen capture, and full remote desktop access. The malware also possesses advanced anti-analysis and anti-forensics capabilities. It is designed to scan the host for 78 different security products by checking running process names, allowing it to modify its behavior or attempt to disable security software upon detection. Furthermore, it can clear Windows event logs to erase evidence of its activities and is specifically configured to steal data from the QQ messaging application, suggesting that the attackers may be targeting specific regional data or communication channels.

To ensure that the Gh0st RAT remains active, the malware employs multiple layers of persistence. It installs a registry "Run" key, registers itself as a Windows service, and creates a scheduled task that triggers every 30 minutes. This multi-layered approach ensures that even if one method of persistence is discovered and removed by an administrator, the malware will likely remain active through one of the other established mechanisms.

Implications for Enterprise Security

The discovery of this campaign underscores the critical need for robust database security practices. The reliance on default ports and weak administrative credentials provides a low-friction entry point for automated scanners, turning otherwise secure servers into nodes for cryptomining and espionage. The fact that the attackers were able to leverage legitimate administrative tools like xp_cmdshell highlights the danger of maintaining excessive permissions in production environments.

Security professionals are advised to audit their SQL Server instances immediately, specifically checking for the enablement of xp_cmdshell and reviewing account access logs for unauthorized attempts. Disabling xp_cmdshell is a standard security best practice, yet it remains a frequent point of failure in many enterprise deployments. Furthermore, the use of strong, unique, and complex passwords for administrative accounts, coupled with multi-factor authentication (MFA) where possible, remains the most effective defense against automated brute-force attacks of this nature.

The attackers’ focus on disguising their presence as legitimate software updates and their use of diverse persistence techniques demonstrate a high level of sophistication. This is not merely a "smash and grab" operation; it is a systematic attempt to turn corporate infrastructure into a long-term asset for illicit gain and data theft. As this campaign continues to scan the internet, searching for the next vulnerable server, the burden remains on administrators to ensure that their systems are not only patched but also properly hardened against the very features designed to make their jobs easier. The ongoing nature of the scanning, which persists as long as the attackers’ server continues to provide new address ranges, indicates that this threat will continue to impact organizations that fail to address these fundamental security gaps.