Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is a Web Shell?

A web shell is a malicious script uploaded to a web server that gives an attacker remote, persistent control of the server through ordinary web requests.

Illustration for the cybersecurity term Web Shell
Home / Blog / Cybersecurity Terms / What Is a Web Shell?
17 November 2026

What Is a Web Shell?

What Is a Web Shell?

A web shell is a malicious script that an attacker places on a web server to control it remotely. Once installed, it lets the attacker run commands, browse and upload files, access databases, and move deeper into the network, simply by sending web requests to a particular page. Because the traffic looks like ordinary HTTP or HTTPS, web shells can operate for long periods without attracting attention.

Web shells are written in whatever language the server supports, such as PHP, ASP.NET, JSP, or Python. Some are full-featured control panels with file managers and database tools; others, such as the notorious China Chopper, are a single line of code that simply executes whatever the attacker sends.

How Web Shells Get Onto Servers

Attackers plant web shells by exploiting weaknesses in internet-facing applications:

Real-World Examples

The best-known web shell campaign followed the ProxyLogon vulnerabilities in Microsoft Exchange Server, disclosed in March 2021. A Chinese state-sponsored group, later followed by many others, exploited the flaws before and after patches were released, installing web shells on tens of thousands of Exchange servers worldwide, including in the UK. Even organisations that patched quickly had to hunt for web shells already in place, because patching closed the vulnerability but did not remove the backdoor. Similar patterns followed ProxyShell later in 2021, and attacks on file transfer products such as MOVEit Transfer in 2023, where attackers deployed a custom web shell called LEMURLOOT.

What Attackers Do With Web Shells

A web shell is rarely the end goal. It is a foothold for:

Detecting Web Shells

Web shells are designed to blend in, but several approaches reveal them:

Preventing Web Shells

Responding to a Web Shell

Finding a web shell means the server has been compromised. Removing the file is not enough: investigators must determine how it got there, what the attacker did, whether credentials were stolen, and whether other footholds exist elsewhere in the network. Preserve logs and disk images before cleaning up.

At Privia Security, our Incident Response Services investigate web shell compromises end to end, and our web application testing finds the upload and execution flaws that let them in.

FAQ – Frequently Asked Questions

How Can I Tell If My Server Has a Web Shell?

Look for unexpected script files in web directories, especially recently created or modified ones, web server processes launching command shells, unusual POST requests in access logs, and outbound connections from the server. File integrity monitoring and endpoint detection make this much easier. If you find one, treat it as a full compromise and investigate further.

Does Patching Remove a Web Shell?

No. Patching closes the vulnerability used to install the web shell, but any web shell already planted remains in place and keeps working. After serious vulnerabilities such as ProxyLogon, organisations had to patch and then hunt for existing web shells and other signs of compromise. Investigation is essential even after a prompt patch.

Can a Web Application Firewall Stop Web Shells?

A WAF can block many attempts to exploit the vulnerabilities used to upload web shells and may detect some known web shell traffic patterns. It cannot remove a web shell that is already present, and attackers can disguise their requests. Combine a WAF with patching, secure upload handling, file integrity monitoring, and endpoint detection.

Related Terms

You May Be Interested In These

What Are Block Cipher Modes?

Cybersecurity Terms

17 November 2026

What Are Block Cipher Modes?

Read More
How Do You Investigate a Suspicious Email?

Cybersecurity Terms

17 November 2026

How Do You Investigate a Suspicious Email?

Read More
What Is OPC UA Security?

Cybersecurity Terms

17 November 2026

What Is OPC UA Security?

Read More