ProxyLogon Exchange Server Chain (CVE-2021-26855)
Affected Systems:
Exchange Server 2013
Exchange Server 2016
Exchange Server 2019
Exchange Server 2010
Executive Summary
ProxyLogon is a chain of vulnerabilities in Microsoft Exchange Server that allows unauthenticated attackers to execute arbitrary code as SYSTEM. The attack chain combines an SSRF vulnerability (CVE-2021-26855) with additional bugs to achieve remote code execution.
Technical Analysis
The vulnerability chain consists of:
1. CVE-2021-26855: SSRF via Exchange Server
2. CVE-2021-26857: Insecure deserialization
3. CVE-2021-26858: Post-auth file write
4. CVE-2021-27065: Post-auth file write
SSRF Exploitation
POST /owa/auth/test.aspx HTTP/1.1
Host: exchange.victim.com
Cookie: X-AnonResource=true; X-AnonResource-Backend=localhost/ecp/default.flt?~3
Content-Type: application/x-www-form-urlencoded
Content-Length: 120
<ValidCookie>
Webshell Deployment
Attack Chain Details
Impact Assessment
- Mass Compromise: Over 250,000 Exchange servers compromised
- APT Activity: Multiple nation-state actors exploiting
- Ransomware: DearCry ransomware deployed via ProxyLogon
- Data Theft: Complete email database access
Detection Methods
# Check for webshells
Get-ChildItem -Path "C:\inetpub\wwwroot\aspnet_client" -Recurse -Filter "*.aspx" |
Select-String -Pattern "eval|base64|cmd.exe"
# Review Exchange logs
Import-Csv -Path "C:\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Owa\*.log" |
Where-Object {$_.ClientIpAddress -notlike "10.*"}
Mitigation Strategies
Emergency Response
- Apply Patches Immediately:
- Exchange 2019: KB5000871
- Exchange 2016: KB5000871
-
Exchange 2013: KB5000871
-
Check for Compromise:
# Microsoft's official detection script
Test-ProxyLogon.ps1 -OutPath C:\temp\ProxyLogonResults
- URL Rewrite Rules (temporary):
<rule name="ProxyLogon" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_COOKIE}" pattern=".*X-AnonResource=true.*" />
</conditions>
<action type="CustomResponse" statusCode="403" />
</rule>