Attacker Value
Very High
(3 users assessed)
Exploitability
Very High
(3 users assessed)
User Interaction
None
Privileges Required
None
Attack Vector
Network
14

CVE-2020-1472 aka Zerologon

Exploited In the Wild
Reported by VoidSec
Add any MITRE ATT&CK Tactics to the list below that apply to this CVE.
Execution
Techniques
Validation
Validated

Description

An elevation of privilege vulnerability exists when an attacker establishes a vulnerable Netlogon secure channel connection to a domain controller, using the Netlogon Remote Protocol (MS-NRPC). An attacker who successfully exploited the vulnerability could run a specially crafted application on a device on the network.

To exploit the vulnerability, an unauthenticated attacker would be required to use MS-NRPC to connect to a domain controller to obtain domain administrator access.

Add Assessment

6
Ratings
Technical Analysis

The advisory suggests that an unauthenticated attacker, presumably already on a domain-joined host, can connect to a DC over NRPC and escalate to DA. That’s pretty significant, but we have no additional details to go by, short of looking at the patch.

Notably, the patch is partial, and the second phase won’t be rolled out until Q1 2021. If attackers can figure out how to weaponize this, it could be a valuable escalation path to DA.

ETA: Technical details and a PoC check are available. Please see the Rapid7 Analysis for more detailed information.
ETAA: Source and spec confirmation that Samba is also affected by this vulnerability. Hint: look for ZERO_STRUCT(iv);.

6
Ratings
Technical Analysis

It’s a pretty nasty bug that there is now weaponized POC code, and Is now available in #mimikatz. So we are expecting some impressive attacks very soon. 😎

For this particular vulnerability there are three big things I want to emphasize:

1️⃣ The vuln requires that an attacker already has access to a network. However, once in, this is an attack that can be done very quickly.

2️⃣ MS is holding fast on only patching Window Server 2008 R2 and up. It is not 100% confirmed, but there is a good chance that earlier EOL versions of servers could be affected, that could represent a higher risk to legacy systems and applications

3️⃣ What’s worse is that there is not a full fix available. The patch enables the DCs to protect devices, but a second patch currently slated for Q1 2021 enforces secure Remote Procedure Call (RPC) with Netlogon to fully address this bug.

General Information

Technical Analysis

Update September 16, 2020: Samba domain controllers before 4.8 have been confirmed to be vulnerable to CVE-2020-1472. There are reports of the vulnerability’s being actively exploited in the wild, including to spread ransomware. The maintainer of popular post-exploitation tool Mimikatz has also announced a new release of the tool that integrates Zerologon detection and exploitation support. Microsoft customers with affected Windows Server versions are once again urged to apply the patch for CVE-2020-1472 on an emergency basis.

Update September 15, 2020: There are now multiple public PoC exploits available, most if not all of which are modifications to Secura’s original PoC built on Impacket. There’s also at least one report that Samba may be affected by the vulnerability; we have not verified that information independently. Several threads on exploitation traces and community detection rules have also garnered attention from researchers and security engineers.

Description

On Monday, September 14, security firm Secura published a detailed technical paper on CVE-2020-1472, a vulnerability they dubbed “Zerologon.” The vulnerability, which was partially patched in Microsoft’s August 2020 Patch Tuesday release, is an elevation of privilege in Netlogon, a Windows Server process that authenticates users and other services within a domain. The bug makes use of a weak cryptographic algorithm in Netlogon’s authentication process to allow full takeover of Active Directory domains by compromising Windows Servers running as domain controllers. In Secura’s words, the bug allows “an attacker with a foothold on your internal network to essentially become Domain Admin with one click. All that is required is for a connection to the Domain Controller to be possible from the attacker’s viewpoint.” This RPC connection can be made either directly or over SMB via namedpipes. CVE-2020-1472 carries a CVSSv3 base score of 10.

Secura’s blog includes proof-of-concept (PoC) code that uses the popular Impacket library to determine if a target is vulnerable to Zerologon. While Secura reinforced on GitHub that “the script will immediately terminate when successfully performing the bypass, and [will] not perform any Netlogon operations,” the PoC is easily weaponizable to execute operations past a mere check. Rapid7 researchers recommend that organizations that have not already applied the August 11, 2020 security updates patch on an emergency basis due to the severity of the vulnerability, the availability of an easily weaponizable PoC, and the ease of exploitation.

Additional information from Microsoft’s August 2020 advisory:
CVE-2020-1472 is an elevation of privilege vulnerability that exists when an attacker establishes a vulnerable Netlogon secure channel connection to a domain controller using Microsoft’s Netlogon Remote Protocol (MS-NRPC). An attacker who successfully exploited the vulnerability could run a specially crafted application on a device on the network. To exploit the vulnerability, an unauthenticated attacker would be required to use MS-NRPC to connect to a domain controller to obtain domain administrator access. Microsoft is addressing the vulnerability in a phased two-part rollout. These updates address the vulnerability by modifying how Netlogon handles the usage of Netlogon secure channels.

Affected products

  • Windows Server 2008 R2 for x64-based Systems Service Pack 1
  • Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation)
  • Windows Server 2012
  • Windows Server 2012 (Server Core installation)
  • Windows Server 2012 R2
  • Windows Server 2012 R2 (Server Core installation)
  • Windows Server 2016
  • Windows Server 2016 (Server Core installation)
  • Windows Server 2019
  • Windows Server 2019 (Server Core installation)
  • Windows Server, version 1903 (Server Core installation)
  • Windows Server, version 1909 (Server Core installation)
  • Windows Server, version 2004 (Server Core installation)

Rapid7 analysis

Vulnerabilities affecting authentication mechanisms or cryptographic implementations are often severe as a matter of course. News outlet ZDNet characterizes Zerologon in particular as “one of the most severe vulnerabilities ever reported to the company [Microsoft].” It’s difficult to disagree; exploitation by advanced and commodity threat actors is likely to occur very quickly—we would expect to see activity within a day or two—and the vulnerability offers ransomware groups an opportunity to leverage a foothold on the network to infect other hosts with relative ease.

Zerologon arises from a flaw in the cryptographic implementation of the Netlogon protocol, specifically in its usage of AES-CFB8 encryption. Technically, a null Initialization Vector (IV) is the crux of the problem: Secura’s paper notes that “the ComputeNetlogonCredential function…defines that this IV is fixed and should always consist of 16 zero bytes. This violates the requirements for using AES-CFB8 securely: its security properties only hold when IVs are random.”

In AES-CFB8, when a null IV is combined with a chosen plaintext, given a random key, the ciphertext can be predictable/controllable: “[…] for 1 in 256 keys, applying AES-CFB8 encryption to an all-zero plaintext will result in all-zero ciphertext.” The consequence of this is that an attacker can bypass Netlogon authentication using CVE-2020-1472 and impersonate any computer account. Once authenticated, the attacker can leverage Netlogon functionality to set an empty password (among other things) for any computer in the domain, including the domain controller.

It’s worth noting that the password is changed only in Active Directory, so the local registry-backed password is out of sync with the domain’s—causing a potential lockout scenario. The attacker can address this temporary hurdle by manually restoring the value to the original from Active Directory after recovering it from the NTDS.dit file, such as by using Impacket’s secretsdump tool.

A number of researchers have published detection information and alerting guidance. Exploitation of CVE-2020-1472 that results in a password change will show as event ID 4742, Password last set change, performed by Anonymous Logon. To detect DCSync usage, look for event ID 4662 containing the GUID {1131f6ad-9c07-11d1-f79f-00c04fc2dcd2}, which is the DS-Replication-Get-Changes-All extended right required for replication. Any replication from a non Domain Controller is suspicious. (Source: NCC Group).

Guidance

Organizations that have not already applied Microsoft’s August 11, 2020 security updates should patch CVE-2020-1472 on an emergency basis. Microsoft customers who have successfully updated can deploy Domain Controller (DC) enforcement mode—either immediately or after the Q1 2021 update. Microsoft has guidance here on how to manage changes in Netlogon secure channel connections associated with this vulnerability. Organizations are strongly advised to ensure that servers acting as domain controllers are not exposed to the public internet, and to apply the principle of least privilege to all systems and services.

References