Skype for Business Audit Part 2 - SKYPErimeterleak
A pre-authentication blind SSRF vulnerability existed in Skype for Business Server 2019's Lync Web App endpoint, where a user-supplied base64-encoded URL was fetched by the server after only a weak regex validation. An attacker could make the server send requests to arbitrary internal hosts, potentially reaching internal services and leaking perimeter information.
Published on frycos.github.io
In my last blog post we talked about a new persistence technique in Skype for Business 2019 (SfB) found during my code audit. Now, I give a short code walk-through about an Pre-Auth Server-side Request Forgery (SSRF) vulnerability which could easily lead to an internet perimeter breach.
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 URL validation used regular expressions that could be bypassed, allowing arbitrary URLs to be passed to HttpWebRequest.
Impact
An unauthenticated attacker could make the server send requests to internal hosts, potentially reaching vulnerable internal services and leaking perimeter information; the SSRF is blind, so responses are not returned directly.
What the attacker needed
Network access to the SfB external LWA endpoint; no authentication required
The fix
The vulnerability was fixed by Microsoft after a year, as noted in the update.
How it was found
- Identify the pre-auth LwaClient.aspx endpoint under the external LWA path.
- Supply a base64-encoded meeturl query parameter pointing to an attacker-controlled or internal URL.
- The server validates the URL with a regex and then issues an HTTP request to it.
- Observe the incoming request on the attacker's HTTP service to confirm the SSRF.
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.
The server had a web page that would fetch a web address supplied by the visitor. The check on that address was too loose, so an attacker could point it at internal machines the attacker cannot reach directly. The server then makes the request on the attacker's behalf, which is called server-side request forgery.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.