Very High
CVE-2020-1472 aka Zerologon
CVE ID
AttackerKB requires a CVE ID in order to pull vulnerability data and references from the CVE list and the National Vulnerability Database. If available, please supply below:
Add References:
CVE-2020-1472 aka Zerologon
MITRE ATT&CK
Collection
Command and Control
Credential Access
Defense Evasion
Discovery
Execution
Exfiltration
Impact
Initial Access
Lateral Movement
Persistence
Privilege Escalation
Topic Tags
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.
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.
For guidelines on how to manage the changes required for this vulnerability and more information on the phased rollout, see How to manage the changes in Netlogon secure channel connections associated with CVE-2020-1472 (updated September 28, 2020).
When the second phase of Windows updates become available in Q1 2021, customers will be notified via a revision to this security vulnerability. If you wish to be notified when these updates are released, we recommend that you register for the security notifications mailer to be alerted of content changes to this advisory. See Microsoft Technical Security Notifications.
Add Assessment
Ratings
-
Attacker ValueVery High
-
ExploitabilityVery High
Technical Analysis
Unauthenticated attacker, able to directly connect to a Domain Controller over NRPC will be able to reset the Domain Controller’s account password to an empty string, thus enabling the attackers to further escalate their privileges to Domain Admin.
The exploit will be successful only if the Domain Controller uses the password stored in Active Directory to validate the login attempt, rather than the one stored locally as, when changing a password in this way, it is only changed in the AD. The targeted system itself will still locally store its original password.
Target computer will then not be able to authenticate to the domain anymore, and it can only be re-synchronized through manual action.
In test lab a successful attack broke the following functionalities when targeting a Domain Controller: DNS functionality and/or communication with replication Domain Controllers.
Checker and Exploit code
Original research and white-paper: [Secura – Tom Tervoort](https://www.secura.com/blog/zero-logon](https://www.secura.com/blog/zero-logon)
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportRatings
-
Attacker ValueVery High
-
ExploitabilityHigh
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);
.
ETAAA: Microsoft has confirmed that Zerologon is being exploited in the wild.
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportRatings
-
Attacker ValueVery High
-
ExploitabilityVery High
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.
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportRatings
-
Attacker ValueVery High
-
ExploitabilityVery High
Technical Analysis
The Zerologon vulnerability is related to the misuse of the AES-CFB8 cipher within the MS-NRPC (Netlogon) service. The result is that 1 in 256 authentication attempts using an all-zero plaintext value will result in an all-zero ciphertext. This means that a user can authenticate as a target system without knowledge of the shared secret which is the hash of the client’s computer account password.
The affected service by default uses a very high (around 40,000-50,000) TCP port. This port is dynamic since it is a DCERPC service. An attacker must know this value in order to connect to and communicate with the Netlogon service. To find it, an attacker can use the mapping service on tcp/135 to query the services by GUID (12345678-1234-abcd-ef00-01234567cffb
). While it is possible to leverage the vulnerability using a named pipe interface over SMB (tcp/445), it requires authentication which sort of defeats the purpose of the vulnerability.
Most public PoCs (including the Metasploit Framework module) leverage the vulnerability to authenticate to the Netlogon service and then changes the machine account password to an empty / blank value. This value has the LM/NTLM hash value of aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0
. This technique relies on using the NetrServerPasswordSet2
function which encrypts the new computer account password with the session key that also misuses the AES-CFB8 cipher. After exploitation the attacker can use this hash value to authenticate to the target Domain Controller using the machine account (the NetBIOS name with a $
suffix, e.g. WIN2019$
). After leveraging this vulnerability to reset the machine account password, it’s important that the attacker restore the original value to prevent authentication failures to the target Domain Controller.
This vulnerability does not appear to affect Windows Server 2008 which was not patched by Microsoft.
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportTechnical Analysis
This is now supposedly being exploited in the wild by Chinese state actors according to this NSA announcement: https://media.defense.gov/2020/Oct/20/2002519884/-1/-1/0/CSA_CHINESE_EXPLOIT_VULNERABILITIES_UOO179811.PDF
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportRatings
-
Attacker ValueVery High
-
ExploitabilityVery High
Technical Analysis
The scarab ransomware operators have been using this vulnerability to compromise victims. More details: https://www.welivesecurity.com/en/eset-research/scarabs-colon-izing-vulnerable-servers/
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportRatings
-
Attacker ValueVery High
-
ExploitabilityVery High
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportCVSS V3 Severity and Metrics
General Information
Vendors
- Microsoft
Products
- Windows Server version 2004,
- Windows Server 2019,
- Windows Server 2019 (Server Core installation),
- Windows Server, version 1909 (Server Core installation),
- Windows Server, version 1903 (Server Core installation),
- Windows Server 2016,
- Windows Server 2016 (Server Core installation),
- Windows Server 2008 R2 Service Pack 1,
- Windows Server 2008 R2 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 version 20H2
Exploited in the Wild
Would you like to delete this Exploited in the Wild Report?
Yes, delete this reportWould you like to delete this Exploited in the Wild Report?
Yes, delete this report- Government or Industry Alert (https://us-cert.cisa.gov/ncas/alerts/aa21-209a)
- News Article or Blog (https://www.tenable.com/blog/contileaks-chats-reveal-over-30-vulnerabilities-used-by-conti-ransomware-affiliates)
- Other: 2020 Most Exploited Vulnerabilities (https://www.ic3.gov/Media/News/2021/210728.pdf)
Would you like to delete this Exploited in the Wild Report?
Yes, delete this reportWould you like to delete this Exploited in the Wild Report?
Yes, delete this reportReferences
Advisory
Miscellaneous
Additional Info
Technical Analysis
Update September 28, 2020: Researcher Kevin Beaumont further confirmed active exploitation of CVE-2020-1472. CISA disseminated a patch validation script (developed by Microsoft) last week to aid security teams in detecting unpatched domain controllers.
Update September 23, 2020: Microsoft has confirmed that Zerologon is being exploited in the wild. Defenders should ensure that systems, especially domain controllers, are patched and not exposed on the internet. CISA also issued an emergency directive last week.
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.
CISA recommends that security teams use their patch validation script (developed by Microsoft) to detect unpatched domain controllers in their organization’s environment. The script is written in PowerShell and is designed to be run on a domain controller. Please consult the script’s README.md for a full list of requirements.
References
- https://www.secura.com/blog/zero-logon
- https://www.secura.com/pathtoimg.php?id=2055
- https://blog.rapid7.com/2020/09/14/cve-2020-1472-zerologon-critical-privilege-escalation/
- https://www.zdnet.com/article/zerologon-attack-lets-hackers-take-over-enterprise-networks/
- https://github.com/SecuraBV/CVE-2020-1472
- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1472
Report as Exploited in the Wild
CVE ID
AttackerKB requires a CVE ID in order to pull vulnerability data and references from the CVE list and the National Vulnerability Database. If available, please supply below:
Hey @VoidSec! Thanks for the assessment! I noticed you reported this as being exploited in the wild—I have absolutely no doubt that’s true, but I haven’t seen any confirmed reports of active exploitation (only public exploits being available). Have you seen differently? Wondering if I need to tweak my monitoring source list :)
Hi @ccondon-r7 I have one clients that were further compromised using this vulnerability (attackers already had a foothold into his network and used this vulnerability to gain Domain Admin and push a ransomware). As I’m not part of the IR team I’m still waiting for them to gather more details on the attack.
@VoidSec Ah, that’s exactly what I was wondering! I’m really sorry your client was compromised, and thank you for reporting this as exploited in the wild.
https://twitter.com/msftsecintel/status/1308941504707063808?s=11 Microsoft has confirmed that they are seeing attacks in the wild.