Description

Threat actors suspected to be linked to China have repurposed the open-source monitoring tool Nezha to deliver Gh0st RAT malware in a sophisticated cyberattack. According to Huntress researchers, the campaign observed in August 2025 involved a rare technique called log poisoning, where attackers injected malicious PHP code into server logs to plant a web shell. This allowed them to gain control of compromised servers using ANTSWORD, a web shell management tool, and subsequently deploy Nezha to execute remote commands. The initial breach exploited a vulnerable phpMyAdmin panel exposed to the internet. After gaining access, the attackers switched the interface language to simplified Chinese and used the SQL query interface to execute commands that enabled general query logging. They then inserted a one-liner PHP web shell into a query, which was logged to disk with a .php extension—making it executable via POST requests. This clever manipulation gave them persistent access to the server and the ability to escalate their attack. Once inside, the attackers used the ANTSWORD shell to run privilege-checking commands and install the Nezha agent, which connected infected hosts to an external server. Interestingly, the Nezha dashboard used by the attackers was configured in Russian, and over 100 victims were identified globally. Most infections occurred in Taiwan, Japan, South Korea, and Hong Kong, with additional cases reported across regions including India, the U.S., U.K., and Southeast Asia. The final stage involved executing a PowerShell script to bypass Microsoft Defender and launch Gh0st RAT via a loader and dropper mechanism. Huntress emphasized that this attack underscores the growing abuse of open-source tools by threat actors, who favor them for their low cost, plausible deniability, and ability to evade detection.