Proof-of-Concept Code Gives Standard Microsoft Exchange Users Domain Administrator Privileges (CVE-2019-0724, CVE-2019-0686)
Publicly released and newly named “PrivExchange” proof-of-concept (POC) privilege escalation code exploits protocol flaws and default configurations to give standard Exchange users Domain Administrator access.
Update February 6: Microsoft published a security advisory (ADV190007) that includes a Throttling Policy that will mitigate this vulnerability until a software update. Additionally, they noted that the vulnerability described in the blog post below only affects on-prem deployments of Microsoft Exchange. Microsoft notes in the advisory that this workaround might disrupt some functions in Outlook for Mac, Skype for Business Client, Apple Mail Clients and third-party applications.
Previously documented protocol weaknesses and vulnerabilities in fully patched Microsoft Exchange are now in the spotlight due to publicly released POC code. According to security researcher Dirk-Jan Mollema, this vulnerability: “Probably affects the majority of orgs using AD and Exchange.”
The POC code submitted to Github allows a standard Exchange user to gain Domain Administrator access to a fully patched Microsoft Exchange 2016 server and dump domain credentials from the Domain Controller.
This issue is not a single vulnerability, but rather a collection of previously disclosed protocol weaknesses affecting NT LAN Manager (NTLM) authentication and Exchange Server vulnerabilities. Per the researcher’s blog:
- Exchange Servers have (too) high privileges by default
- NTLM authentication is vulnerable to relay attacks
- Exchange has a feature which makes it authenticate to an attacker with the computer account of the Exchange server
Mollema also included a script that reportedly allows for unauthenticated attacks where one could relay the authentication of a user in the same network segment to Exchange Web Services (EWS) and use their credentials to perform the exploit.
Urgently required actions
This issue reportedly affects fully patched Microsoft Exchange servers, however the following mitigations, including one recommended by Microsoft, are listed by the security researcher:
- Remove the unnecessary high privileges that Exchange has on the Domain object (references included below).
- Enable Lightweight Directory Access Protocol (LDAP) signing and enable LDAP channel binding to prevent relaying to LDAP and LDAPS respectively
- Block Exchange servers from making connections to workstations on arbitrary ports.
- Enable Extended Protection for Authentication on the Exchange endpoints in IIS (but not the Exchange Back End ones, this will break Exchange). This will verify the channel binding parameters in the NTLM authentication, which ties NTLM authentication to a TLS connection and prevent relaying to Exchange web services.
- Remove the registry key which makes relaying back to the Exchange server possible, as discussed in Microsoft’s mitigation for CVE-2018-8581. (Tenable provides coverage for this mitigation)
- Enforce SMB signing on Exchange servers (and preferable all other servers and workstations in the domain) to prevent cross-protocol relay attacks to SMB.
Identifying affected systems
A list of Nessus plugins to identify this vulnerability can be found here.
Tenable also provides the mitigation-specific configuration audit checks below for Server Message Block (SMB) signing and NTLM v2 at https://www.tenable.com/downloads/audit using these audit files:
Get more information
Are You Vulnerable to the Latest Exploits?
Enter your email to receive the latest cyber exposure alerts in your inbox.