gh0st RAT
- Type
- RAT
- Capabilities
- KeyloggingExfiltrationPersistencePost exploitationDefense evasionReconnaissanceDLL sideloading
- Delivery
- PhishingSeo poisoningLure
- Platforms
- Windows
Gh0st RAT, also known as Ghost RAT, is a Windows remote-access trojan used by Chinese-speaking cybercriminal and cyberespionage operators. It provides interactive control of compromised systems through remote desktop and command-shell access, keystroke logging, screen capture, webcam and microphone surveillance, and file, process, and service management. Variants can download and execute additional payloads and use plugins to extend their functionality. Its derivatives include Sainbox RAT and HoldingHands, both associated with Silver Fox activity.
Distribution includes malicious software downloads and spoofed software websites, with phishing and SEO poisoning used in campaigns delivering Gh0st RAT variants. Fake installers can install a genuine application alongside malicious components. Associated execution chains use legitimate applications for DLL sideloading, antivirus-aware payload selection, packed or encoded payloads, and plugins disguised as image files. Other campaigns deploy Gh0st RAT on internet-exposed Microsoft SQL Server hosts after separate scanning and brute-force tools compromise weak database credentials; attackers then abuse native SQL Server functionality to execute operating-system commands and retrieve payloads.
Persistence mechanisms observed in variants include registry-based autorun entries, Windows services, and scheduled tasks. A variant deployed against SQL Server hosts supports more than 30 commands, enumerates 78 security products, steals Tencent QQ data, and clears Windows event logs. Loader chains used to deliver other variants attempt to weaken Microsoft Defender and conceal executable signatures. Gh0st RAT has been associated with Silver Fox and Webworm, but its use alone does not establish attribution. Its deployment spans consumer PCs, enterprise endpoints, and Windows database servers, including opportunistic intrusions that install it alongside cryptocurrency miners.
Associated vulnerabilities
10 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
44 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
this group of Chinese origin specializes in targeting iGaming platforms, online casinos, and betting sites, relying on multiplatform malware families historically attributed to Chinese-speaking actors (PlugX, Gh0st RAT, PuppetLoader).
Silver Fox fake oCam installers deliver a Gh0stRAT variant with antivirus-aware sideloading and Defender tampering
rather than relying solely on heavily scrutinized custom RATs ( Trochilus , Gh0st RAT )
+38 more in the app. View in Mallory
Techniques & procedures
116 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
1 technique
Reconnaissance
MITRE ATT&CK Tactic Technique Technique ID Description / Relevance Reconnaissance Search Engine Discovery: Search Engines T1593.002 SEO poisoning used to manipulate search engine rankings for malicious sites.
Resource Development
4 techniques
Resource Development
Similar lures have appeared in malvertising against DeepSeek users, where lookalike sites sent visitors to harmful downloads.
T1583.003 — Acquire Infrastructure: Virtual Private Server (Resource Development)
T1587.001 — Develop Capabilities: Malware (Resource Development)
T1588.001 — Obtain Capabilities: Malware (Resource Development)
Initial Access
5 techniques
Initial Access
The campaign is using bogus software-download websites to impersonate trusted vendors and distribute malicious installers.
Such attacks involve the original software’s being compromised via malicious tampering of its source code, its update server, or in some cases, both... which is known as a supply chain attack.
Proofpoint researchers have uncovered a number of multistage attacks that use cryptocurrency-related lures to infect victims with sophisticated backdoors and reconnaissance malware that we attribute to the Lazarus Group.
The zip attachment is password-protected with 123 as stated in the malspam. | Attachment name: Very beautiful.zip ... The zip attachment is password-protected with 123 as stated in the malspam.
For this campaign, Void Arachne set up a web infrastructure that is used for SEO poisoning that deployed spear-phishing links (T1566.002) disguised as legitimate software installers to lure potential victims.
Execution
14 techniques
Execution
Gh0stRAT/SimpleRemoter code creating a scheduled task through Task Scheduler COM interfaces... WarmCookie initializes COM, creates the older Task Scheduler 1.0 object using CLSID_CTaskScheduler, and requests IID_ITaskScheduler. It then creates a work item, configures flags and creates a trigger.
La persistance est assurée via cron, systemd timers, rc.local et OpenRC.
Tasks named Microsoft_UPDATES or mimicking MicrosoftEdgeUpdateTaskMachine GUIDs running every 30 minutes or daily at 01:00
[gh0st RAT](https://attack.mitre.org/software/S0032) is able to open a remote shell to execute commands.(Citation: FireEye Hacking Team)(Citation: Nccgroup Gh0st April 2018)
Installer process Setup.tmp starting powershell with -ExecutionPolicy Bypass and Defender preference changes
go.vbs serves as the entry point for the eight downloaded files and launches go.bat and out.bat.
[gh0st RAT](https://attack.mitre.org/software/S0032) has used the `InterlockedExchange`, `SeShutdownPrivilege`, and `ExitWindowsEx` Windows API functions.(Citation: Gh0stRAT ATT March 2019)
[gh0st RAT](https://attack.mitre.org/software/S0032) can load DLLs into memory.(Citation: Gh0stRAT ATT March 2019)
ASEC (AhnLab Security Emergency response Center) has recently discovered the installation of the PlugX malware through the Chinese remote control programs Sunlogin and Awesun’s remote code execution vulnerability.
The first stage is a Windows Installer package, or MSI, made with the WiX toolkit. Its custom action starts malicious code rather than simply installing an application.
Fake oCam installer served from a Cloudflare Workers host T1204.002
[gh0st RAT](https://attack.mitre.org/software/S0032) can execute its service if the Service key exists. If the key does not exist, [gh0st RAT](https://attack.mitre.org/software/S0032) will create and run the service.(Citation: Gh0stRAT ATT March 2019)
...uses the LoadLibraryExW() function to load additional modules... execute additional plugins by loading the respective DLLs... loaded and executed DLLs in memory during runtime... loads a dynamic library (.dylib file) using dlopen() and obtains a function pointer... using dlopen() and dlsym()... calls LoadLibrary then executes exports from a DLL.
A [gh0st RAT](https://attack.mitre.org/software/S0032) variant has used DLL side-loading.(Citation: Arbor Musical Chairs Feb 2018)
Persistence
9 techniques
Persistence
Gh0stRAT/SimpleRemoter code creating a scheduled task through Task Scheduler COM interfaces... WarmCookie initializes COM, creates the older Task Scheduler 1.0 object using CLSID_CTaskScheduler, and requests IID_ITaskScheduler. It then creates a work item, configures flags and creates a trigger.
La persistance est assurée via cron, systemd timers, rc.local et OpenRC.
Tasks named Microsoft_UPDATES or mimicking MicrosoftEdgeUpdateTaskMachine GUIDs running every 30 minutes or daily at 01:00
Cmd# 2,3 (config), 117, 118 (persistence)
As in the CVE-2022-1040 attack, the attackers built a malware that inspects all ping packets, waiting for a specially crafted ping packet... The ping packet, if validated correctly, can be used to trigger the device into either opening a reverse shell... or it will bind and listen on port 31234... This technique is known as Traffic Signalling, and is detailed as technique T1205 in the MITRE ATT&CK framework.
"weaponize... Nezha... using... log poisoning (aka log injection) to plant a web shell"
La persistance est assurée via cron, systemd timers, rc.local et OpenRC.
Service Windows pour winlogon.exe
The RAT enumerates 78 security products, steals Tencent QQ data, and persists via a Run key, a service and a 30-minute scheduled task.
Privilege Escalation
12 techniques
Privilege Escalation
Gh0stRAT/SimpleRemoter code creating a scheduled task through Task Scheduler COM interfaces... WarmCookie initializes COM, creates the older Task Scheduler 1.0 object using CLSID_CTaskScheduler, and requests IID_ITaskScheduler. It then creates a work item, configures flags and creates a trigger.
La persistance est assurée via cron, systemd timers, rc.local et OpenRC.
Tasks named Microsoft_UPDATES or mimicking MicrosoftEdgeUpdateTaskMachine GUIDs running every 30 minutes or daily at 01:00
[gh0st RAT](https://attack.mitre.org/software/S0032) can inject malicious code into process created by the “Command_Create&Inject” function.(Citation: Gh0stRAT ATT March 2019)
It opens the target with full access, allocates an executable memory region inside it, writes the assembled payload, and starts a remote thread at the payload's entry point.
After this step, the attackers use a signed but vulnerable Adlice TrueSight version 2.0.2 driver to terminate more than 200 security products, according to the researchers.
Access Token Manipulation: T1134 This Gh0st RAT variant adjusts its process token to enable “SeDebugPrivilege”, allowing it to interact with and manipulate other processes.
The injector enumerates all active terminal sessions and, for each one, spawns a suspended svchost.exe process under a duplicated token whose session ID has been reassigned to match the target session.
La persistance est assurée via cron, systemd timers, rc.local et OpenRC.
Service Windows pour winlogon.exe
The RAT enumerates 78 security products, steals Tencent QQ data, and persists via a Run key, a service and a 30-minute scheduled task.
From that first sideload, the chain moves through privilege escalation using a UAC prompt, then installs a persistence service disguised as “Windows Mixed Reality Service”.
Stealth
32 techniques
Stealth
Clears the SSDT of existing hooks via an installed kernel module.
corrupts each payload's first two bytes to break file detection
decodes a file named _8 into a UPX-packed Gh0stRAT variant
The malware then fetches a file from its infrastructure that looks like an ordinary JPEG image but actually hides multiple encrypted payloads appended after the picture data.
The reflectively loaded DLL begins by resolving its API dependencies at runtime to avoid static imports.
The downloaded file is a polyglot... The malware, however, disregards the picture entirely and reads only the data appended after the image, where the real payload is stored.
The communication is encrypted by a homebrew xor-and-add function, and then encoded in base 64.
The archive downloaded from the site maintains the same file name while its hash changes on every download... a wrapper installer... launches the first stage payload.
Tâche planifiée imitant Microsoft Edge Update
URL path ending in ocam.zip that delivers a 114 MB Windows executable saved as Ocam_setupcnb781.exe
[gh0st RAT](https://attack.mitre.org/software/S0032) can inject malicious code into process created by the “Command_Create&Inject” function.(Citation: Gh0stRAT ATT March 2019)
It opens the target with full access, allocates an executable memory region inside it, writes the assembled payload, and starts a remote thread at the payload's entry point.
Deletes original executable and intermediate dropper after installation (T1070)
[gh0st RAT](https://attack.mitre.org/software/S0032) has the capability to to delete files.(Citation: FireEye Hacking Team)(Citation: Gh0stRAT ATT March 2019)
Access Token Manipulation: T1134 This Gh0st RAT variant adjusts its process token to enable “SeDebugPrivilege”, allowing it to interact with and manipulate other processes.
The injector enumerates all active terminal sessions and, for each one, spawns a suspended svchost.exe process under a duplicated token whose session ID has been reassigned to match the target session.
[gh0st RAT](https://attack.mitre.org/software/S0032) has decrypted and loaded the [gh0st RAT](https://attack.mitre.org/software/S0032) DLL into memory, once the initial dropper executable is launched.(Citation: Gh0stRAT ATT March 2019)
MITRE ATT&CK Mapping Technique ID T1202 Defense Evasion Indirect Command Execution — cmd.exe / rundll32
As in the CVE-2022-1040 attack, the attackers built a malware that inspects all ping packets, waiting for a specially crafted ping packet... The ping packet, if validated correctly, can be used to trigger the device into either opening a reverse shell... or it will bind and listen on port 31234... This technique is known as Traffic Signalling, and is detailed as technique T1205 in the MITRE ATT&CK framework.
Operators frequently achieve persistence via Run keys, services, or scheduled tasks, and may load capability through side-loaded DLLs or abused LOLBins.
A [gh0st RAT](https://attack.mitre.org/software/S0032) variant has used rundll32 for execution.(Citation: Arbor Musical Chairs Feb 2018)
Upon execution, x.exe creates a mutex named gd.bj2[.]xyz:53762:SQLlite, which corresponds to the domain, port, and service name used by the malware.
Timing and environment checks through QueryPerformanceCounter, Sleep, rdtsc, VirtualAllocExNuma, mutex probes, process checks, heap pressure, and COM/object probes
Behavioral Analysis Execution Behaviors (CAPE Sandbox) Anti-Analysis: Checks available physical memory (< threshold → abort, T1082) Queries keyboard layout and Windows locale via registry... to detect VMs
Implements long sleep delays to defeat sandbox timeouts... cmd.exe /c ping 127.0.0.1 -n 2 & gvzsio.exe (anti-analysis delay via ping)
It writes a small debug log to c:\debug.txt (hidden and marked as a system file) containing the client process ID, and monitors for a kill file (c:\kkqqexit) as a shutdown signal.
Creates hidden windows ( ShowWindow(SW_HIDE ) (T1564.003)
...uses the LoadLibraryExW() function to load additional modules... execute additional plugins by loading the respective DLLs... loaded and executed DLLs in memory during runtime... loads a dynamic library (.dylib file) using dlopen() and obtains a function pointer... using dlopen() and dlsym()... calls LoadLibrary then executes exports from a DLL.
A [gh0st RAT](https://attack.mitre.org/software/S0032) variant has used DLL side-loading.(Citation: Arbor Musical Chairs Feb 2018)
exe or inj... Download payload from provided URL, inject into process memory using Invoke-ReflectivePEInjection
HDPX 导出函数包含反调试... 黑 DLL 监测到调试器直接退出不触发恶意行为
Delay Execution: T1678 Figure 08 shows a code snippet from Gh0st RAT implementing a ping-based sleep technique. The malware leverages ping.exe with the -n parameter to introduce a delay in execution.
Defense Impairment
6 techniques
Defense Impairment
Cmd# 2,3 (config), 117, 118 (persistence)
the malware often registers autostart mechanisms under standard persistence locations, may masquerade as legitimate software or use stolen certificates
disabling Controlled Folder Access and adding exclusions
Event-log wiping OpenEventLogA(), ClearEventLogA() Cmd# 4
[gh0st RAT](https://attack.mitre.org/software/S0032) is able to wipe event logs.(Citation: FireEye Hacking Team)(Citation: Gh0stRAT ATT March 2019)
MITRE ATT&CK Mapping Tactic Technique ID Implementation Execution User Execution: Malicious File T1204.002 Victim runs fake AI installer Execution PowerShell T1059.001 Disable-NetAdapter command Defense Evasion Masquerading T1036.005 "openclawAI" branding Defense Evasion Impair Defenses: Disable Network T1562.004 Kills all network adapters
Credential Access
5 techniques
Credential Access
[gh0st RAT](https://attack.mitre.org/software/S0032) has a keylogger.(Citation: Alintanahin 2014)(Citation: Gh0stRAT ATT March 2019)
Accesses Internet Cookie store ( %APPDATA%\Microsoft\Windows\INetCookies\ ) (T1539)
GH0ST is told to ... collect credentials. The prompt lists 14 providers by name ... [and] ranks those keys above SSH credentials, above access tokens, above databases.
La priorité déclarée dans SOUL.md est le vol de clés API d’IA... Les clés sont stockées en clair dans /root/.hermes/loot/.
Its capabilities range from logging keystrokes to executing commands, stealing credentials, and capturing microphones and webcams.
Discovery
12 techniques
Discovery
Registry manager RegOpenKeyExA(), RegSetValueExA(), RegDeleteValueA(), RegQueryValueExA()
System Network Configuration Discovery: T1016 This RAT also collects basic network information from the compromised host, including the MAC address.
Remote System Discovery: T1018 This Gh0st RAT variant can block access to specific domains, such as security-related websites, by utilizing a configuration file retrieved from its Command and Control (C2) server.
Injecting across all user sessions means the malware survives user switches and reaches both the service context and interactive sessions at once.
T1057 — Process Discovery (Discovery)
The collected information ... includes ... Windows OS edition. Processor and RAM information. Windows OS installation time.
FileManager (command number 0x1): File operation ... FileManager has multiple functions to operate files on infected hosts.
Timing and environment checks through QueryPerformanceCounter, Sleep, rdtsc, VirtualAllocExNuma, mutex probes, process checks, heap pressure, and COM/object probes
Behavioral Analysis Execution Behaviors (CAPE Sandbox) Anti-Analysis: Checks available physical memory (< threshold → abort, T1082) Queries keyboard layout and Windows locale via registry... to detect VMs
Implements long sleep delays to defeat sandbox timeouts... cmd.exe /c ping 127.0.0.1 -n 2 & gvzsio.exe (anti-analysis delay via ping)
Installer checking for 360tray.exe, QQPCTray.exe or HipsTray.exe and dropping the matching tray
HDPX 导出函数包含反调试... 黑 DLL 监测到调试器直接退出不触发恶意行为
Lateral Movement
5 techniques
Lateral Movement
远程桌面 实时屏幕控制、多显示器支持、H.264 编码、自适应质量;Web 远程桌面:基于 WebSocket 实现,支持手机/平板通过浏览器访问远程桌面
Correlating registry edits that enable remote access or weaken authentication with subsequent interactive sessions helps distinguish Gh0st-style remote control from benign administrative activity.
Un script entry.sh ouvre un tunnel SSH inverse... installe un serveur SSH, ajoute une clé opérateur.
A few months back, Delphi based malware was being distributed on multiple systems via SMB exploit.
In “The Monju Incident”, analyzed by Context Information Security: Propagates throughout the infected network.
Collection
6 techniques
Collection
enabling the Lazarus Group to conduct lucrative operations stealing Bitcoin and other cryptocurrencies... targeting a point-of-sale related framework for the theft of credit card data
[gh0st RAT](https://attack.mitre.org/software/S0032) has a keylogger.(Citation: Alintanahin 2014)(Citation: Gh0stRAT ATT March 2019)
[gh0st RAT](https://attack.mitre.org/software/S0032) can capture the victim’s screen remotely.(Citation: Nccgroup Gh0st April 2018)
First, it monitors the clipboard using OpenClipboard and GetClipboardData ... The malware also implements a clipboard hijacker ... substituting attacker-defined strings with replacement values.
Its capabilities range from logging keystrokes to executing commands, stealing credentials, and capturing microphones and webcams.
Its capabilities range from logging keystrokes to executing commands, stealing credentials, and capturing microphones and webcams.
Command and Control
24 techniques
Command and Control
Notably, the custom TCP protocol employs a straightforward encryption algorithm, using XOR and addition with a one-byte key, to encrypt the TCP packet's payload.
Some Backdoor.Oldrea samples use standard Base64 + bzip2... gh0st RAT has used Zlib to compress C2 communications data before encrypting it... HOPLIGHT has utilized Zlib compression to obfuscate the communications payload.
Based on the leaked source code of the infamous Gh0st RAT but with notable differences in the command-and-control (C2) communication mechanism employed, Milestone is also designed to send information about the current sessions on the system to the remote server.
L’agent reçoit des tâches via Telegram, les transmet avec SOUL.md à une passerelle LLM opérée par les attaquants.
The malware calls FtpGetFileW() to download files from ftp.vietnam852[.]com, one at a time.
Application Layer Protocol: DNS: T1071.004 Figure 10 shows a code snippet from Gh0st RAT responsible for generating spoofed DNS responses.
After further investigation, it appears that this component allows the compromised host to connect a specified proxy server.
We already saw the usage of a HTTP tunnel tool to create a network tunnel between the infected system and a C2 server... several remote access tools such as Gh0stRAT and Venom multi-hop proxy were deployed
[gh0st RAT](https://attack.mitre.org/software/S0032) has used an encrypted protocol within TCP segments to communicate with the C2.(Citation: Gh0stRAT ATT March 2019)
Hermes ги обработува командите за задачи добиени преку Telegram ... и испраќање на резултатите назад
Web Service: Dead Drop Resolver: T1102.001 If the malware detects that it is running inside a VMware virtual machine, it spawns a separate thread responsible for performing a dead drop resolver (DDR) routine.
L’agent reçoit des tâches via Telegram...
MITRE ATT&CK Tactic Technique ID ... Command and Control Multi-Stage Channels T1104
Enable xp_cmdshell via T-SQL and stage loader over HTTP/FTP
C2 traffic from ADVSTORESHELL is encrypted, then encoded with Base64 encoding... APT19 HTTP malware variant used Base64 to encode communications to the C2 server... APT33 has used base64 to encode command and control traffic.
[gh0st RAT](https://attack.mitre.org/software/S0032) has used Zlib to compress C2 communications data before encrypting it.(Citation: Gh0stRAT ATT March 2019)
As in the CVE-2022-1040 attack, the attackers built a malware that inspects all ping packets, waiting for a specially crafted ping packet... The ping packet, if validated correctly, can be used to trigger the device into either opening a reverse shell... or it will bind and listen on port 31234... This technique is known as Traffic Signalling, and is detailed as technique T1205 in the MITRE ATT&CK framework.
Useful starting points are MITRE ATT&CK techniques for remote access software (T1219)
The implant beacons to attacker-controlled infrastructure using its proprietary framing; some builds add encryption, compression, or domain generation to resist network inspection.
[gh0st RAT](https://attack.mitre.org/software/S0032) operators have used dynamic DNS to mask the true location of their C2 behind rapidly changing IP addresses.(Citation: Gh0stRAT ATT March 2019)
Unlike the last cluster however, this variant appears to have been used in an extensive DDNS cluster of infrastructure dating back to at least 2013... that campaign appeared to have slightly different tactics, techniques, and procedures (TTPs), including potentially target-themed domain infrastructure as well as heavily relying on dynamic DNS for C2 domains.
Un script entry.sh ouvre un tunnel SSH inverse vers un relais au Costa Rica.
[gh0st RAT](https://attack.mitre.org/software/S0032) has encrypted TCP communications to evade detection.(Citation: Gh0stRAT ATT March 2019)
[gh0st RAT](https://attack.mitre.org/software/S0032) uses RC4 and XOR to encrypt C2 traffic.(Citation: Nccgroup Gh0st April 2018)
Exfiltration
2 techniques
Exfiltration
... lui ordonnant de maintenir la persistance, d’exécuter des tâches Telegram et de prioriser le vol de clés API d’IA.
Technical details | Exfiltration TA0010 | Exfiltration Over C2 Channel T1041
Impact
2 techniques
Impact
Disables Windows restore.
This function takes shutdown debug privileges and calls the ExitWindowsEx() function to shut down systems.
Observables
590 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
200 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.