Threat Summary
Recent intelligence from the OTX community indicates an active, sophisticated intrusion campaign dubbed "The Crown Prince, Nezha." Initiated in August 2025, this operation targets misconfigured web applications, specifically vulnerable phpMyAdmin panels.
The attack chain leverages log poisoning techniques to establish an initial foothold. Once inside the network, threat actors deploy the China Chopper web shell, managed via the open-source AntSword framework. The campaign distinguishes itself by abusing Nezha, an open-source server monitoring tool, to facilitate remote command execution (RCE) and establish a covert C2 channel before ultimately dropping Ghost RAT (gh0st) and related payloads for long-term espionage.
The targeting scope is extensive, affecting victims globally across the United States, Europe, South America, and Asia-Pacific regions.
Threat Actor / Malware Profile
Adversary Behavior
- Initial Access: The actor exploits vulnerable or exposed phpMyAdmin installations. They utilize log poisoning—injecting malicious code into web server access logs—and then force the server to execute those logs via local file inclusion (LFI) vulnerabilities.
- Persistence: A China Chopper (S0020) web shell is planted. This small, obfuscated ASP/PHP payload allows for persistent remote access.
- Command & Control (C2): Operators use AntSword, a popular cross-platform web shell management tool, to interact with China Chopper. This provides a graphical interface for file management and terminal access.
- Lateral Movement / Privilege Escalation: The campaign uniquely deploys Nezha. While normally a benign monitoring tool, in this context, it is configured to act as a reverse proxy or trojanized agent, bypassing standard network egress filtering due to its legitimate appearance.
- Payload Delivery: The final stage involves deploying Ghost RAT (S0032) and variants like Mydoor and Moudoor. These are full-featured RATs allowing for surveillance, data exfiltration, and further lateral movement.
Malware Families
- China Chopper: A notoriously small and difficult-to-detect web shell. It executes base64-encoded commands sent via POST requests.
- Nezha: Abused open-source monitoring agent. The actor likely modifies the configuration to report to a malicious controller server, turning a security tool into a backdoor.
- Ghost RAT: A well-known China-nexus Remote Access Trojan known for utilizing process hollowing and injection techniques to hide within legitimate system processes (often explorer.exe).
IOC Analysis
The provided Pulse contains high-fidelity IOCs that security teams must immediately ingest:
- Network Infrastructure (Hostnames):
gd.bj2.xyzc.mid.al- Action: These hostnames likely serve as the C2 for the Nezha agents or Ghost RAT. These must be blocked on DNS proxies and firewalls immediately.
- File Hashes (SHA256/MD5):
d757ec4d5350843c44dd34a95dcb3a50(MD5)7b2599ed54b72daec0acfd32744c7a9a77b19e6cf4e1651837175e4606dbc958(SHA256)- Action: Correlate these hashes against EDR telemetry and historical file execution logs. These hashes correspond to the web shell scripts, Nezha binaries, or RAT payloads.
Detection Engineering
Sigma Rules
title: Potential AntSword Web Shell Management
id: 84c5f8a9-2c5f-4820-9b5d-7f5a6d3c3b2d
description: Detects HTTP requests containing the AntSword web shell manager user-agent or specific header patterns used in the "Crown Prince" campaign.
status: experimental
date: 2026/08/02
author: Security Arsenal
references:
- https://otx.alienvault.com/pulse/622c45f1e3a6a8e8a8e8a8e8
tags:
- attack.persistence
- attack.t1505.003
logsource:
category: webserver
detection:
selection:
cs-user-agent|contains: 'antSword'
condition: selection
falsepositives:
- Legitimate administration tools (unlikely given specific UA)
level: critical
---
title: Nezha Agent Process Execution
id: 92e4f7b0-3d6e-4a12-9c8e-1f0a9b8c7d6e
description: Detects the execution of Nezha agent binaries or processes connecting to non-standard ports, indicative of the abused monitoring tool in the Nezha campaign.
status: experimental
date: 2026/08/02
author: Security Arsenal
references:
- https://otx.alienvault.com/pulse/622c45f1e3a6a8e8a8e8a8e8
tags:
- attack.command_and_control
- attack.t1071.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\nezha-agent.exe'
- OriginalFileName: 'nezha-agent'
selection_cli:
CommandLine|contains: '-s' # Nezha often uses -s for server address
condition: 1 of selection*
falsepositives:
- Legitimate Nezha monitoring deployments (verify server destination)
level: high
---
title: China Chopper Web Shell Activity
id: 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
description: Detects common patterns associated with China Chopper web shell execution, specifically base64 encoded POST requests and specific parameter names.
status: experimental
date: 2026/08/02
author: Security Arsenal
references:
- https://otx.alienvault.com/pulse/622c45f1e3a6a8e8a8e8a8e8
tags:
- attack.web_shell
- attack.t1505.003
logsource:
category: webserver
detection:
selection_post:
cs-method: 'POST'
selection_keywords:
cs-uri-query|contains:
- 'eval('
- 'base64_decode'
selection_chopper_param:
cs-uri-query|contains: 'z'
condition: selection_post and (selection_keywords or selection_chopper_param)
falsepositives:
- Rare, legitimate web applications using eval
level: high
KQL (Microsoft Sentinel)
// Hunt for connections to identified Nezha/Ghost RAT C2 domains
DeviceNetworkEvents
| where RemoteUrl in ("gd.bj2.xyz", "c.mid.al")
| project Timestamp, DeviceName, InitiatingProcessFileName, RemoteUrl, RemoteIP
| order by Timestamp desc
// Hunt for execution of suspicious file hashes from the pulse
DeviceProcessEvents
| where SHA256 in ("7b2599ed54b72daec0acfd32744c7a9a77b19e6cf4e1651837175e4606dbc958",
"35e0b22139fb27d2c9721aedf5770d893423bf029e1f56be92485ff8fce210f3",
"9f33095a24471bed55ce11803e4ebbed5118bfb5d3861baf1c8214efcd9e7de6",
"f3570bb6e0f9c695d48f89f043380b43831dd0f6fe79b16eda2a3ffd9fd7ad16")
| project Timestamp, DeviceName, AccountName, FolderPath, SHA256, InitiatingProcessAccountName
// Hunt for Log Poisoning / Web Shell precursors (PHP processes spawning cmd)
DeviceProcessEvents
| where InitiatingProcessFileName has "php" and ProcessFileName in ("cmd.exe", "powershell.exe", "bash")
| project Timestamp, DeviceName, InitiatingProcessCommandLine, ProcessCommandLine, AccountName
PowerShell Hunt Script
# Check for the presence of Nezha or Ghost RAT artifacts on Windows Endpoints
$TargetHashes = @(
"d757ec4d5350843c44dd34a95dcb3a50",
"ad5e5b00f58396f5a518680e7084dc7dd5f2cc2b",
"7b2599ed54b72daec0acfd32744c7a9a77b19e6cf4e1651837175e4606dbc958",
"35e0b22139fb27d2c9721aedf5770d893423bf029e1f56be92485ff8fce210f3",
"9f33095a24471bed55ce11803e4ebbed5118bfb5d3861baf1c8214efcd9e7de6",
"f3570bb6e0f9c695d48f89f043380b43831dd0f6fe79b16eda2a3ffd9fd7ad16"
)
Write-Host "[*] Hunting for Crown Prince / Nezha IOCs..." -ForegroundColor Cyan
# 1. Scan C: drive for file hashes
Write-Host "[*] Scanning common writeable directories for matching file hashes..." -ForegroundColor Yellow
$PathsToScan = @("C:\\Windows\\Temp", "C:\\Users\\Public", "C:\\inetpub", "C:\\\xampp\\")
foreach ($Path in $PathsToScan) {
if (Test-Path $Path) {
Get-ChildItem -Path $Path -Recurse -ErrorAction SilentlyContinue | Get-FileHash -ErrorAction SilentlyContinue | Where-Object { $TargetHashes -contains $_.Hash } | ForEach-Object {
Write-Host "[!] MALICIOUS FILE FOUND: $($_.Path) | Hash: $($_.Hash)" -ForegroundColor Red
}
}
}
# 2. Check for Nezha related processes or services
Write-Host "[*] Checking for Nezha agent processes..." -ForegroundColor Yellow
$Processes = Get-Process -ErrorAction SilentlyContinue | Where-Object { $_.ProcessName -like "*nezha*" -or $_.MainWindowTitle -like "*nezha*" }
if ($Processes) {
Write-Host "[!] SUSPICIOUS PROCESS FOUND: $($Processes.ProcessName) (PID: $($Processes.Id))" -ForegroundColor Red
}
# 3. Check Network Connections to known C2
$C2Domains = @("gd.bj2.xyz", "c.mid.al")
$Connections = Get-NetTCPConnection -ErrorAction SilentlyContinue | Where-Object { $_.State -eq "Established" }
$ProcessMap = @{}
Get-Process | ForEach-Object { $ProcessMap[$_.Id] = $_ }
foreach ($Conn in $Connections) {
try {
$RemoteIP = (Get-NetIPAddress -ErrorAction SilentlyContinue | Where-Object { $_.IPAddress -eq $Conn.RemoteAddress }).IPAddress
# Attempt to resolve hostname
$HostName = [System.Net.Dns]::GetHostEntry($Conn.RemoteAddress).HostName
if ($C2Domains -contains $HostName) {
$Proc = $ProcessMap[$Conn.OwningProcess]
Write-Host "[!] C2 CONNECTION DETECTED: $HostName ($($Conn.RemoteAddress)) by Process: $($Proc.ProcessName) ($($Proc.Path))" -ForegroundColor Red
}
} catch {
# Ignore resolution failures
}
}
Write-Host "[*] Hunt complete." -ForegroundColor Green
Response Priorities
Immediate (0-4 hours)
- Block IOCs: Immediately block the hostnames
gd.bj2.xyzandc.mid.alon enterprise firewalls, proxies, and DNS sinkholes. - Isolate Victims: Identify systems communicating with these domains or matching the file hashes and isolate them from the network.
- Hunt Web Shells: Scan web servers (especially phpMyAdmin instances) for the "China Chopper" signature (small php files with eval(base64_decode)) and check access logs for log poisoning indicators (inclusion of /proc/self/environ or similar).
24 Hours
- Credential Reset: Assume database credentials were compromised via the phpMyAdmin attack. Rotate credentials for all database accounts accessible from the affected web servers.
- Persistence Removal: Remove identified web shells and Nezha agent binaries. Audit scheduled tasks and startup folders for Ghost RAT persistence mechanisms.
1 Week
- Architecture Hardening: Restrict access to phpMyAdmin and administration panels via IP whitelisting. Ensure web servers do not run with high privileges.
- Log Review: Conduct a thorough review of web server logs for the 3 months prior to detection to identify the initial breach date and scope of data exfiltration.
Related Resources
Security Arsenal Incident Response Managed SOC & MDR Services AlertMonitor Threat Detection From The Dark Side Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.