Threat feed

MS SQL T-SQL malware campaign

Unattributed operators brute-force exposed Microsoft SQL Server instances to deploy XMRig and Gh0st RAT via T-SQL

Posted · Spectrum Delta Research Team

Summary

Unattributed operators, assessed by FortiGuard Labs as likely Chinese-speaking, have targeted internet-exposed Microsoft SQL Server instances since early October 2026, brute-forcing weak logins and abusing T-SQL to deploy an XMRig Monero miner and a Gh0st RAT variant on compromised servers, according to FortiGuard Labs (A/2). A UPX-packed Go binary embedding the Naabu scanner probes TCP port 1433, and a .NET brute-forcer tries accounts such as sa and admin against more than 2,700 passwords with 500 threads. On a successful login, T-SQL batches enable xp_cmdshell, download a loader from attacker HTTP and FTP servers, and create fake Microsoft Edge update tasks for persistence. The loader pulls an XMRig miner reporting hash rates to the operator and a Gh0st RAT variant with more than 30 commands including keylogging, screen capture and event-log wiping. The RAT enumerates 78 security products, steals Tencent QQ data, and persists via a Run key, a service and a 30-minute scheduled task. At least one United States server was confirmed compromised; hunting pivots include failed-login auditing, fake Edge update tasks, egress to staging domains and mining pool traffic.

Breakdown

Targets

  • Industry: Opportunistic

Technical exposure

  • Internet-exposed Microsoft SQL Server instance reachable on TCP 1433
  • Weak or default SQL login credentials vulnerable to a 2700+ password dictionary
  • xp_cmdshell and Ole Automation Procedures enabled on the instance

Adversary

Unattributed, suspected Chinese-speaking financially motivated operator (FortiGuard Labs assessment)

Procedures (3)

  1. Scan /16 ranges for exposed SQL Server and brute-force logins

    Logs

    • SQL Server error log and Windows Security event log (failed sa/admin login bursts) · High-volume failed SQL authentication attempts from a single source, often hundreds within minutes
    • Perimeter firewall or NetFlow records · TCP SYN scan patterns against port 1433 across /16 address ranges

    Detectors

    • FortiGuard IPS signature MS.SQL.Server.Brute.Force.Login · Detects brute force attacks against Microsoft SQL Server
  2. Enable xp_cmdshell via T-SQL and stage loader over HTTP/FTP

    • T1505.001Server Software Component: SQL Stored Procedures
    • T1105Ingress Tool Transfer

    Logs

    • SQL Server audit and trace records for xp_cmdshell reconfiguration and execution · sp_configure enabling xp_cmdshell, Ole Automation activation, and EXEC xp_cmdshell downloads into C:\Users\Public
    • Proxy or egress web and FTP logs · Downloads from site.vietnam852.com:88 and ftp.vietnam852.com, including 2018.sql, dwm.exe and down.exe

    Detectors

    • FortiGuard Web Filtering rating for campaign domains and URLs · Domains and URLs associated with this campaign rated Malicious Websites
  3. Persist with fake Edge update tasks and deploy miner plus Gh0st RAT

    • T1053.005Scheduled Task/Job: Scheduled Task
    • T1547.001Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder
    • T1496Resource Hijacking

    Logs

    • Windows Task Scheduler operational log and registry Run key monitoring · Tasks named Microsoft_UPDATES or mimicking MicrosoftEdgeUpdateTaskMachine GUIDs running every 30 minutes or daily at 01:00
    • Endpoint process and network telemetry · MicrosoftEdgeUpdate.exe with XMRig mining traffic to xmr-ru.kryptex.network port 7029 and the XMRig Reporter user agent on site.vietnam852.com

    Detectors

    • FortiGuard AntiVirus signatures W64/MSSQLBruteforcer.F62C!tr, W64/Agent.DRN!tr, W32/Agent.DAV!tr, MSIL/Agent.AFL!tr · Detects the brute-forcer, loader and payload files of this campaign

Indicators of compromise

Domains (6)

  • site.vietnam852.comStaging and C2 server on port 88; serves ip.php, 2018.sql and tool files, receives host registration POSTs and miner reports
  • ftp.vietnam852.comFTP payload staging server for loader and payload downloads
  • server.vietnam852.comGh0st RAT C2 endpoint on port 8000
  • www.swordaa.comSecond hardcoded Gh0st RAT C2 endpoint on port 8000
  • site.hfgjjkrewjk.comSecondary staging server also serving /tj/xmr.php miner reporting
  • site.jiancai008.comSecondary staging server hosting dllhost.exe, winlogon.exe and miner payload files on port 88

URLs (4)

  • http://site.vietnam852.com:88/ip.phpReturns target IP range for Naabu scanning
  • http://site.vietnam852.com:88/2026/2018.sqlMalicious T-SQL command file enabling xp_cmdshell
  • http://ftp.vietnam852.com:88/post.phpReceives compromised host registration data
  • http://site.vietnam852.com/tj/xmr.phpMiner status reporting endpoint with XMRig Reporter user agent

Hashes (6)

  • 8CE2CD98EF6CEEECE8239936E4AEA042C41807F632CD691D5091705BF6C0076Ddllhost.exe, UPX-packed Go scanner embedding Naabu (SHA-256)
  • F5444E8E9E9E019693AACB363B7441AC0B8ECFE96A77FD94B9C312A017588EB42018.sql, malicious T-SQL command file (SHA-256)
  • 124774698FD3EDE0800015D19C2BD6C1869D03BBC2E6E8DBE2F69D2978F7F4D0dwm.exe, .NET SQL brute-forcer (CSQL.exe assembly) (SHA-256)
  • 125D3A0EFE7699BB20397C13F0F4993AD893952727487B4D190E386A5B14C427down.exe / google.exe / payload.exe loader (SHA-256)
  • 2A23E10BFC097E98295CBFF8124BD403C4CB677E709B48CCC53D6ACA216C3061MicrosoftEdgeUpdate.exe, Themida-packed XMRig Monero miner (SHA-256)
  • 3F64B0146B323C5716043360E84384A5A197A897F46088DF93A910470A29E1A0winlogon.exe, Themida-packed Gh0st RAT variant (SHA-256)

Sources

Grades are source reliability (A–F) and information credibility (1–6).

Questions, detections or sightings of MS SQL T-SQL malware campaign? Bring them to the community.