Skip to content
Account takeover Write-up Advanced

A New Attack Surface on MS Exchange Part 4 - ProxyRelay!

Microsoft Exchange servers could be coerced into authenticating to an attacker, who could relay that NTLM authentication to another Exchange server to bypass authentication and impersonate any user or achieve remote code execution. The attack exploited the fact that Exchange machine accounts have the Token-Serialization right and are local administrators on other Exchange servers.

Orange Tsai Follow

Published on devco.re

Tech Editorials #Advisory #CVE #RCE #Exchange #Pwn2Own

Orange Tsai (@orange_8361), on devco.re

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the root cause is that Exchange servers automatically trust each other's machine accounts (which have the Token-Serialization right and local admin privileges) and accept NTLM authentication without additional protections like Extended Protection.

Impact

An attacker could bypass Exchange authentication and impersonate any user or achieve remote code execution without user interaction, though some mitigations like Extended Protection were later enabled by default.

What the attacker needed

Two Exchange servers in same domain; attacker can reach both servers; printerbug coercion possible

How it was found

  1. Run ntlmrelayx.py on the attacker server to wait for NTLM authentications.
  2. Use printerbug.py to coerce EX01 to initiate an SMB connection to the attacker.
  3. Receive the SMB connection and relay the NTLM blobs to EX02.
  4. Complete the NTLM handshakes to get full access to the EWS endpoint.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes a way to trick one Exchange email server into proving its identity to an attacker, who then passes that proof to a second Exchange server. Because the servers trust each other's machine accounts, the attacker can then act as any user or run commands. The core issue is that the servers automatically trust each other's machine identities too much.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by Orange Tsai

View all

5 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.