GhostWebShell
- Type
- Webshell
- Capabilities
- PersistencePost exploitationDefense evasion
- Platforms
- Windows
GhostWebShell is an ASP.NET web shell that provides remote command execution and persistent access to compromised Windows web servers. It embeds a Base64-encoded ASP.NET page that accepts attacker-supplied commands through an HTTP query parameter, executes them using the Windows command interpreter, and returns standard output and standard error as HTML-formatted responses. It uses reflection to temporarily modify internal ASP.NET BuildManager flags, bypass application precompilation checks, and register a custom VirtualPathProvider. This allows a malicious page to be supplied from memory or a nonstandard location and exposed through an apparently legitimate application path. GhostWebShell executes the injected page through ASP.NET server functionality, restores the original flags to reduce its footprint, and communicates exceptions through a custom HTTP response header.
GhostWebShell has been deployed following exploitation of on-premises Microsoft SharePoint servers through the ToolShell vulnerability chain, involving CVE-2025-49704, CVE-2025-49706, CVE-2025-53770, and CVE-2025-53771. It has also been found on an internet-facing web server during a Medusa ransomware intrusion, where web shells maintained access after exploitation of a vulnerable public-facing application. GhostWebShell code from the ysoserial utility is incorporated into GhostContainer, a separate modular backdoor deployed by NightEagle, also known as APT-Q-95, on Microsoft Exchange servers in attacks against Russian businesses.
Associated vulnerabilities
4 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
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
GhostContainer ... includes elements connected to the Neo-reGeorg tunnel, code for CVE-2020-0688, and the GhostWebShell class.
Techniques & procedures
1 distinct technique documented for this family, organized by ATT&CK tactic.
Persistence
1 technique
Persistence
On Microsoft Exchange servers, the attackers deployed GhostContainer, a .NET backdoor assembled from public components. It includes elements connected to the Neo-reGeorg tunnel, code for CVE-2020-0688, and the GhostWebShell class.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.