Hackers brute-force SQL Servers to plant miner, RAT

Attackers are breaking into Microsoft SQL Server databases left exposed to the internet by guessing weak passwords, then using the database itself to install a cryptocurrency miner and a remote access trojan on the underlying Windows server. Fortinet's FortiGuard Labs disclosed the campaign in research published on 12 November 2026, rating the threat as high severity. The operation has been running since at least early October and needs no software vulnerability at all — just an open port and a password on a common list.
The attack starts with a Go-based program called dllhost.exe, which embeds the open-source Naabu port scanner. It pulls target address ranges from an attacker-controlled server and sweeps them for systems with TCP port 1433 open — the default port used by Microsoft SQL Server. When it finds one, a separate .NET tool named dwm.exe tries to log in with usernames such as "sa" and "admin" against a password list containing more than 2,700 entries, running up to 500 attempts at a time.
How the attack works
Once a login succeeds, the attackers run a set of malicious commands from a file called 2018.sql, using Transact-SQL, Microsoft's version of the SQL language. Among other things, those commands switch on xp_cmdshell, a SQL Server feature that lets a database administrator run Windows command shell operations. That turns a database login into a way to run programs on the server itself.
The attackers then use that access to download or unpack executables into the server's public folder and run them. A downloader connects to the attackers' file-transfer infrastructure to fetch further malware, and reports details about the machine back to them, including its public address, country, Windows version, processor and memory.
A miner and a remote access trojan
Two payloads reveal what the attackers want from the machines. One, disguised as MicrosoftEdgeUpdate.exe, is an XMRig-based Monero miner that spends the server's processor power mining cryptocurrency for a wallet address embedded in its configuration, connecting to mining pools including Nanopool and Kryptex. The other, delivered as winlogon.exe, is a variant of the Gh0st remote access trojan, with more than 30 control commands covering keylogging, file management, data theft, remote shell access and screen capture, plus plugins for remote desktop access.
Security experts warn the miner may be a distraction from the more serious half of the intrusion. "This campaign illustrates the persistent challenge IT and security teams face: securing privileged access across complex, and often legacy, infrastructure," said Shane Barney, chief information security officer at Keeper Security. Jason Soroko, senior fellow at Sectigo, said removing the miner alone would leave the wider compromise unresolved, because the remote access tool can steal information and maintain access.
Staying hidden and surviving reboots
The malware is built to persist. The initial payload creates a scheduled task running every 30 minutes, while the downloader sets up another task to run daily at 1am. The Gh0st RAT adds itself to the Windows registry's Run key, installs itself as a Windows service and creates its own scheduled task launching it every 30 minutes. Fortinet could not fully examine the trojan's live communications because its command-and-control server was already offline when researchers analysed the sample. No victim count has been confirmed, and FortiGuard has not tied the campaign to any specific actor.
How to protect a server
The fix is straightforward, according to the researchers and the experts who reviewed the report: remove direct internet access to SQL Server, restrict connections to approved systems, and enforce strong, unique credentials for database accounts. Administrators should keep xp_cmdshell disabled unless it is genuinely required, monitor any attempt to enable it, and investigate SQL Server spawning command shells, new scheduled tasks, or failed logins followed by a success. A compromised server needs containment, a search for persistence mechanisms and a review of exposed credentials before it returns to service. Read the full research as reported by CSO Online and HackRead.