Part 2 - ProxyOracle!
A reflected cross-site scripting flaw in Exchange's CAS frontend lets an attacker run JavaScript in a victim's browser, and a padding oracle in the cookie decryption of the form-based authentication allows recovery of the victim's plaintext password. By chaining these, an attacker can steal the victim's cookies and decrypt the credentials.
devco.re
Published on devco.re
Tech Editorials #Advisory #CVE #RCE #Exchange
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 XSS stems from missing sanitisation of user input before it is printed into a JSON response, and the padding oracle stems from the server returning different error codes for padding failures versus successful decryption.
Impact
An attacker could recover a victim's plaintext password by getting them to click a malicious link, and the decryption does not require authentication or user interaction after the initial click.
What the attacker needed
Victim clicks a malicious link; attacker-controlled server; Exchange OWA accessible
The fix
The vulnerabilities were fixed by Microsoft, as indicated by the CVE assignments and update guide references.
How it was found
- Craft a URL to the Exchange OWA frowny.aspx endpoint with parameters that break out of the JSON context and inject JavaScript.
- Send the malicious link to a victim; when the victim visits it, the injected JavaScript executes in their browser.
- Use the JavaScript to set a special SSRF cookie that turns Exchange into a proxy to an attacker-controlled server.
- Use the proxy to capture the victim's HttpOnly cookies, including the encrypted credential cookies.
- Use the padding oracle in the cookie decryption to recover the plaintext username and password from the stolen cookies.
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 two bugs in Microsoft Exchange, the email server. One is a cross-site scripting (XSS) bug: a crafted link makes the victim's browser run attacker-supplied JavaScript. The other is a padding oracle: the server gives different error responses depending on whether encrypted cookie data decrypts correctly, which lets an attacker gradually decrypt the cookie and recover the victim's password. Together, an attacker who gets a victim to click a link can steal the victim's login credentials.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.