Cybersecurity

Microsoft SQL Servers Hijacked to Install Gh0st RAT and Monero Miner

Published By Shivam Sharma9 min read
Microsoft SQL Server logo, after attackers hijacked exposed servers to install a miner and a RAT

Attackers are breaking into internet-facing Microsoft SQL Server instances with nothing more than a guessable password, then using the database’s own language to take over the Windows server underneath. FortiGuard Labs, Fortinet’s research team, uncovered the campaign in early October 2026 and published its full technical report on Thursday 12 November. The campaign delivers two payloads, a Monero miner and a Gh0st remote access trojan, and it needs no software vulnerability at all. No victim count has been disclosed, no organisation has been named, and Fortinet gives no attribution for who is behind it. What the report does give, in unusual detail, is the whole infection chain, step by step, from the first scan to the final remote-control implant.

How the Microsoft SQL Server Gh0st RAT campaign finds its targets

The campaign starts with a file called dllhost.exe, a Go binary packed with UPX, versions 3.9 to 5.21 detected, that embeds the open-source Naabu v2 port scanner. The binary asks an attacker-controlled server for a target IP range, at hxxp://site.vietnam852[.]com:88/ip.php, converts the returned address into a hardcoded /16 CIDR block, then uses Naabu to send TCP SYN probes to port 1433, the default SQL Server port, on random addresses inside that block. Responsive hosts are recorded in %temp%\Result.txt, and then the binary requests a new range and starts again.

A /16 block holds 65,536 addresses, so each range the malware is handed is a sweep of a whole neighbourhood of the internet, looking for one open door. The campaign’s first target is any SQL Server that answers on port 1433 from the public internet. Fortinet rates the campaign severity as High, lists the affected platform as Microsoft Windows and the impacted users as Microsoft SQL Server, and describes the impact as “XMR Miner and Remote Control of the compromised server”. The report was written by Fortinet researcher Xiaopeng Zhang.

The binary then downloads eight support files into %Temp%: 2018.sql, dwm.exe, go.bat, go.vbs, out.bat, user.txt, pass.txt and sqlcmd.exe. Persistence is set with a scheduled task running every 30 minutes, named to imitate a Microsoft Edge update task: MicrosoftEdgeUpdateTaskMachineUA{CEC15D9B-F4BB-446A-B6E1-C61E74B016A2}. Nothing about the chain so far touches a SQL Server bug. It is a scanner, a password list and a scheduled task.

2,700 passwords at 500 threads

The brute force is the blunt part. go.vbs launches go.bat, which runs dwm.exe, a .NET tool with the assembly name CSQL.exe, against each host the scanner found. It tries usernames such as sa and admin from user.txt and more than 2,700 passwords from pass.txt, at up to 500 threads. A server with port 1433 open and a password on a list of more than 2,700 can be compromised without any software flaw at all.

That is the sharpest point in the whole report. This week’s November 2026 SQL Server security updates fix product flaws, while this campaign abuses settings that stay risky on a fully patched server, according to vinish.dev. Patching does not close port 1433, and it does not change a weak sa password. Infosecurity Magazine, which covered the report on 12 November, notes that the report does not say how many servers were compromised or who is behind the campaign. Neither does any other coverage checked. There is no victim count, no affected region or sector, and no named organisation anywhere in the report.

xp_cmdshell: the one command that opens the operating system

After a successful login, a second dwm.exe instance executes the T-SQL commands in 2018.sql in GO-separated batches on the compromised server. The script enables xp_cmdshell, a SQL Server feature that runs operating-system commands from inside the database. Enabling xp_cmdshell gives the attacker the ability to execute operating-system commands through SQL Server.

The T-SQL downloads down.exe into C:\Users\Public, renames it Google.exe or payload.exe and runs it. It also creates a daily task named Microsoft_UPDATES, and extracts an embedded executable from the @DATA variable to Secs.exe, copied to the Startup folder. Secs.exe pulls further files one at a time from ftp.vietnam852[.]com using FtpGetFileW() and runs each with ShellExecuteW(). It also creates a second Edge-themed daily task, MicrosoftEdgeUpdateTaskMachineCore{4C33CE3F-7722-4257-AF83-351A4911C159}, running daily at 01:00, and sends an HTTP POST registering the host with the backend, including its public IP, country, Windows edition, CPU and RAM, installation time, user name and host name.

Every step in the chain wears a disguise. The miner is named MicrosoftEdgeUpdate.exe. The RAT is named winlogon.exe, after a Windows system process. The scheduled tasks imitate Edge updates. The downloader hides in C:\Users\Public, a folder that looks unremarkable on any Windows server. Fortinet says its customers are already protected via FortiGuard IPS, Web Filtering and AntiVirus, with detections including W64/MSSQLBruteforcer.F62C!tr and IPS signature MS.SQL.Server.Brute.Force.Login.

The two payloads: a miner and a RAT

The first payload, MicrosoftEdgeUpdate.exe, is protected by Themida and a custom LZSS packer. It is a Monero miner using the victim’s CPU, with traffic to the mining pool xmr-ru.kryptex.network and mining status reported via an HTTP GET with the user agent “XMRig Reporter”. Secondary coverage describes it as an XMRig-based miner, and the miner is the revenue: it uses a compromised server’s CPU to mine Monero.

The second payload, winlogon.exe, is a Themida-protected Gh0st RAT variant. Its command-and-control servers were already offline during analysis, so researchers could examine only the unpacked sample statically. That matters for how much is known: the RAT’s live remote-control behaviour, its keylogging, screen capture and data theft in the wild, is inferred from static analysis only, not observed in operation. The same family has been seen before, when HiddenGh0st malware targeting MS-SQL servers was reported, according to Cybersecurity News.

What the static analysis shows is a thorough remote-control tool. The RAT persists through the HKLM Run key, a Windows service, and a 30-minute scheduled task. It has two hardcoded command-and-control endpoints: server.vietnam852[.]com:8000 and www.swordaa[.]com:8000. It supports more than 30 control commands covering keylogging, file transfer, download-and-execute, process and service management, registry edits and event-log clearing, and screen capture and remote desktop come from plugins. It fingerprints the host and checks for 78 security-product process names, including MsMpEng.exe, avp.exe and 360tray.exe. Static analysis indicates the RAT can steal QQ data from the \Tencent\Users directory.

The Microsoft SQL Server Gh0st RAT campaign, by the numbers

Every figure below comes from Fortinet’s report, compiled here as one table, except the “0 CVEs” row, which comes from vinish.dev’s summary of it. That row is the point of the story: this is not a patching story, it is an exposure story.

Figure Value What it means
Addresses scanned per range 65,536 (one /16 block) Each C2-issued range is a full /16; the malware sweeps random addresses inside it for open port 1433, then asks for the next range
Passwords per login attempt 2,700+ pass.txt holds more than 2,700 passwords, tried against usernames including sa and admin
Brute-force threads Up to 500 dwm.exe runs up to 500 parallel login threads
Support files downloaded 8 2018.sql, dwm.exe, go.bat, go.vbs, out.bat, user.txt, pass.txt, sqlcmd.exe
RAT control commands 30+ Keylogging, file transfer, download-and-execute, registry edits, event-log wiping
Security products fingerprinted 78 Process names checked, including MsMpEng.exe, avp.exe, 360tray.exe
RAT persistence mechanisms 3 Run key, Windows service, 30-minute scheduled task
Hardcoded RAT C2 endpoints 2 server.vietnam852[.]com:8000, www.swordaa[.]com:8000
Campaign domains in IOC list 6 vietnam852[.]com (site/ftp/server), swordaa[.]com, hfgjjkrewjk[.]com, jiancai008[.]com
MITRE ATT&CK techniques mapped 20 From T1046 discovery to T1496 resource hijacking
CVEs involved 0 No SQL Server bug; exposed port 1433 plus a weak password is the whole entry

Fortinet’s report lists 20 MITRE ATT&CK techniques for the campaign, including T1046 Network Service Discovery, T1110.001 Brute Force: Password Guessing, T1505.001 SQL Stored Procedures, T1496 Resource Hijacking and T1562.002 Impair Defenses: Disable Windows Event Logging. The disclosure timeline is its own data point for the Microsoft SQL Server Gh0st RAT campaign: Fortinet first uncovered the campaign in early October, and the public warning arrived on 12 November, roughly five to six weeks later. The campaign was uncovered in early October and publicly reported on 12 November, more than a month later. The public warning is not the start of the attack.

The indicators of compromise, defanged, are: domains site.vietnam852[.]com:88, ftp.vietnam852[.]com:88, server.vietnam852[.]com:8000, www.swordaa[.]com:8000, site.hfgjjkrewjk[.]com and site.jiancai008[.]com; miner pool xmr-ru.kryptex.network; sample SHA-256 for dllhost.exe 8CE2CD98EF6CEEECE8239936E4AEA042C41807F632CD691D5091705BF6C0076D; and sample SHA-256 for winlogon.exe, the Gh0st RAT, 3F64B0146B323C5716043360E84384A5A197A897F46088DF93A910470A29E1A0. The full IOC list, with URLs and hashes, is in Fortinet’s report.

What should I do if I run SQL Server?

If you run Microsoft SQL Server, check today whether port 1433 is reachable from the internet. If it is, close it. Rename or disable the sa account, set a long unique password, and keep xp_cmdshell disabled. A fully patched server with a weak password on a public port is still an open door.

  1. Check whether port 1433 is reachable from the internet, and close it if it is.
  2. Rename or disable the sa account and set a long unique password with lockout.
  3. Keep xp_cmdshell disabled.
  4. Hunt for Edge-update tasks pointing to C:\Users\Public or E:, for Secs.exe, Google.exe and payload.exe, and for traffic to vietnam852[.]com.
  5. Treat any server where xp_cmdshell was enabled unexpectedly as compromised and investigate it fully.

These steps follow Fortinet’s defender guidance, not a Microsoft instruction. No Microsoft guidance on this campaign appeared in the coverage checked. Fortinet’s own guidance is short: never expose port 1433 to the internet, rename or disable the sa account, enforce long unique passwords with lockout policies, and keep xp_cmdshell disabled. It also says to hunt for Edge-update tasks pointing to C:\Users\Public or E:, for Secs.exe, Google.exe and payload.exe, and for traffic to vietnam852[.]com. Any server where xp_cmdshell was enabled unexpectedly should be treated as compromised.

What to watch next

Three things are worth watching. First, whether wider coverage follows: so far the story rests on Fortinet’s own report plus security press, TechFinitive (12 November, 14:43 UTC), CyberPress (13 November, 08:08 UTC) and GBHackers (13 November, 11:38 UTC), with no BleepingComputer, Reuters or Register coverage found. Second, whether any victim count or attribution ever surfaces: the report names no organisation, region or sector, and the RAT’s command servers were already offline when Fortinet analysed the sample, so the live scale of the campaign is unknown. Third, whether the same T-SQL technique shows up against other database platforms: the entry here is not a SQL Server bug, it is an exposed port and a guessable password. Until then, the facts are a scanner, a list of more than 2,700 passwords, one database command, and two payloads, all of which a closed port would have stopped.