Skip to main content

Wolfcore Cyber Security

Exchange Web Shell Check: Find a Backdoor on Your Server

Written by Ruben Selby, Founder and Lead Security Consultant at Wolfcore, a UK-based offensive security firm working with businesses worldwide. Last reviewed 29 November 2026.

Part of the Wolfcore Resources library: Detection and response.

In one sentence: A web shell is a small file an attacker leaves on your mail server to get back in later, and this page shows what a defender should look for.

What it is

A web shell is a script uploaded to a web server that lets someone run commands on it through a web request. CISA lists the uses: stealing data and credentials, uploading more malware, relaying commands to hosts without internet access, and acting as command and control for long-term persistence (source 1).

On Exchange, the risk is high because the server is internet facing and holds email and directory access.

How to run an Exchange web shell check

  1. The attacker exploits an unpatched flaw. In the 2021 ProxyLogon campaign, CISA describes CVE-2021-26855 as a server-side request forgery that let an unauthenticated attacker act as the server, and CVE-2021-26858 and CVE-2021-27065 as file-write flaws once authenticated (source 1).
  2. They write an .aspx file into a web folder.
  3. They call that file over HTTPS to run commands.
  4. Microsoft reported that HAFNIUM operators deployed web shells and then performed further post-exploitation (source 2).

Patching later does not remove a file that is already there. That is why a check is needed.

How a web shell ends up on ExchangeUnpatched ExchangeAttacker writes a file.aspx file used as backdoorDefender view: find files and log entries that should not exist, then patch,rebuild and reset credentials.

Diagram: how the shell arrives, and what the defender does.

Who it affects and how badly

Organisations still running Exchange Server on their own hardware or in their own cloud tenancy: law firms, accountancy practices, schools, councils, manufacturers and MSPs hosting for others, in the UK, EU, US and Armenia. A small firm risks mailbox theft and ransomware. A mid-sized one risks a full domain compromise. CISA advises that if exploitation is found, you should assume network identity compromise (source 1). Regulated firms must also consider breach notification.

Real examples

The March 2021 HAFNIUM activity, reported by Microsoft, and the CISA alert AA21-062A, which names ten web shells linked to the activity (sources 1 and 2).

What we check on a test

  • Whether Exchange is reachable from the internet, and its patch level.
  • Whether unexpected files exist in the web folders listed below.
  • Whether Exchange logs are kept long enough to look back.
  • Whether the Exchange server holds privileged credentials that could spread an attack.
  • Whether the server is still supported and receives security updates.

How to detect it

CISA says to look for .aspx files in these places (source 1):

  • \inetpub\wwwroot\aspnet_client\ and sub folders.
  • Under the Exchange install path, FrontEnd\HttpProxy\ecp\auth\, where any file besides TimeoutLogoff.aspx is suspect.
  • FrontEnd\HttpProxy\owa\auth\ and its Current and version-number sub folders, for any file not in a standard install.

Also search ECP server logs (Logging\ECP\Server) for Set-OabVirtualDirectory entries that changed an ExternalUrl, as CISA and Microsoft describe (sources 1 and 2). Check OAB generator logs. Microsoft’s blog gives its detection commands, and CISA says to run Microsoft’s Test-ProxyLogon script, which scans Exchange logs for indicators (source 1). Treat file names and indicators as clues, not proof. CISA says its lists are not complete.

How to fix or prevent it

  1. If you find a web shell, isolate the server and treat the domain as compromised, per CISA (source 1).
  2. Rebuild the server from clean media rather than deleting the file only.
  3. Reset passwords and keys for accounts that touched Exchange, including service accounts.
  4. Apply current Exchange security updates and keep them current.
  5. Do not expose management endpoints such as ECP to the internet.
  6. Run endpoint protection and forward Exchange and IIS logs to central storage.
  7. Consider moving to a hosted mail service if you cannot patch quickly.

Sources

Related terms

ProxyLogon (CVE-2021-26855), ProxyShell Exchange vulnerabilities, patch management, LSASS credential dumping defence, Edge Device Hardening Checklist: Firewalls and VPNs

Back to the Detection and response hub. Wolfcore service page: SOC and SIEM monitoring.

FAQ

Does patching remove a web shell? No. Microsoft and CISA treat the check as separate from patching.

What should I assume if I find one? CISA says assume network identity compromise.

Which folders matter? aspnet_client and the Exchange FrontEnd HttpProxy ecp and owa auth folders.

How Wolfcore helps

Wolfcore’s vulnerability management and SOC monitoring keep watch for this after the test is over.

To see whether staff would spot a phishing email, try Phishy phishing simulation software.

Wolfcore

Would your staff click a phishing email?

Run a real, safe phishing test on your team with Phishy. Free for 14 days, up to 10 staff, no card. We help you set it up.

Start a free phishing testFree website security scanor book a 30 minute call