CVE-2020-1472 (Zerologon)
The Netlogon Remote Protocol used a fixed all-zero initialisation vector with AES-CFB8, which weakened authentication between domain machines and the Domain Controller. An unauthenticated attacker who could reach the Domain Controller over the network could send crafted Netlogon requests and, after enough attempts, have them accepted, potentially leading to domain administrator access.
medium.com
Published on medium.com
Cybersecurity
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.
Context
CVE-2020-1472, better known as Zerologon, is a critical security flaw in Microsoft's Netlogon Remote Protocol (MS-NRPC). Netlogon is the component that lets machines in a Windows domain environment communicate securely with a Domain Controller. Normally, a domain-joined computer has to prove its identity when it talks to a Domain Controller. Zerologon is a problem precisely in that authentication step.
The target of the attack is the Active Directory Domain Controller running on Windows Server. When a Domain Controller is affected, user accounts, computer accounts, authorisation checks and the trust relationships inside the domain are all put at risk. This is not the kind of flaw that only affects a single application: the thing being targeted is the authentication centre of the corporate network.
Setup
The report does not describe a specific test environment that was actually built, nor any tool versions. It does, however, set out the conditions under which a proof of concept should be attempted, and the first of those is that the vulnerability must never be tried on real systems. A mistaken or unauthorised attempt against a Domain Controller can damage the whole Active Directory structure, so a PoC belongs only in an isolated laboratory environment.
A safe laboratory can be set up as follows:
- 1 Windows Server with an Active Directory Domain Controller installation
- 1 test client
- An isolated virtual network
- An environment that is not connected to the real corporate network
The aim in this PoC scenario is not to take over the system but to understand the logic of the flaw: how the Domain Controller uses the Netlogon service, how domain-joined machines are authenticated, and why the faulty cryptographic design creates risk.
Finding it
The root of the flaw is a cryptographic error. In the AES-CFB8 construction used by the Netlogon protocol, the initialisation vector, the IV, is not generated securely at random. According to the CERT/CC description, MS-NRPC is affected by the use of a known, fixed all-zero IV in AES-CFB8 mode. This weakens the authentication process.
Because of this error, an attacker can send specially crafted Netlogon requests to the Domain Controller. Zero values play an important role in these requests. Not every attempt has to succeed, but after enough attempts the Domain Controller may accept the request as valid. This is also why the flaw is called Zerologon: the attack logic relies heavily on zero values.
Put simply, the system should normally work like this:
Domain computer > Authentication > Domain Controller > Secure channel
In Zerologon, the attacker tries to deceive that verification process:
Attacker > Specially crafted Netlogon requests > Error in cryptographic verification > Domain Controller can be deceived > A path to high privileges on the domain can open
What makes the flaw dangerous is that the attacker does not need to be a Domain Admin to begin with. According to CISA, an unauthenticated attacker who can reach the Domain Controller over the network can use this weakness to compromise Active Directory identity services.
Exploitation
Step 1: Understand what a PoC is for
A PoC, a Proof of Concept, is a test carried out to show that a security flaw does not exist only in theory and can work under certain conditions. The PoC side of Zerologon has to be handled very carefully, because the flaw directly affects a critical system such as the Domain Controller.
Step 2: Build an isolated laboratory
Use the setup described above: a Windows Server Domain Controller, a test client, an isolated virtual network and no connection to the real corporate network. In this scenario the goal is to study how the Domain Controller uses the Netlogon service, how domain-joined machines are authenticated and why the faulty cryptographic design is a risk.
Step 3: Send crafted authentication requests
In the Zerologon PoC logic, the attacker sends specially crafted authentication requests over Netlogon to a vulnerable Domain Controller. These requests are built using zero values. Because of the error in cryptographic verification, the Domain Controller may accept the request as valid in some attempts. This can bring the attacker to a level where they can affect the Domain Controller machine account.
The report does not include the actual request bytes, script or command used for this step.
Root cause
The mistake is in the design of the protocol's cryptography. The AES-CFB8 construction used by Netlogon does not generate its initialisation vector securely at random; MS-NRPC uses a known, fixed all-zero IV. With that input, the authentication process is weakened, and after enough crafted requests using zero values the Domain Controller may accept the request as valid.
The report does not describe which specific defences were in place or why they failed to stop the attack. What it does say is that Microsoft required all Domain Controllers and Read-Only Domain Controllers to be updated, and that the use of secure RPC on Netlogon secure channel connections had to be made mandatory.
Impact
At the centre of CVE-2020-1472 are Active Directory Domain Controller systems running on Windows Server. Microsoft stated that all Domain Controller and Read-Only Domain Controller systems must be updated, and that secure RPC use on Netlogon secure channel connections must be made mandatory.
The main structures affected by this flaw are:
- Windows Server Domain Controller systems
- Read-Only Domain Controller systems
- Corporate networks that use Active Directory
- Domain-joined Windows devices
- Some third-party systems that use the Netlogon protocol
- Some Samba configurations used as Domain Controllers
These products are not affected in the way an ordinary application flaw affects them. A flaw in a web application, for example, can affect only that website. With Zerologon, the structure being targeted is the authentication centre of the corporate network. When the Domain Controller is affected, user accounts, computer accounts, authorisation checks and trust relationships inside the domain are put at risk.
CISA stated that unpatched Active Directory Domain Controller systems can be taken over through this flaw and that the attacker can obtain domain administrator access. Zerologon is therefore critical enough to affect not just a single computer but the authentication infrastructure of the entire corporate network.
The impact chain can be summarised briefly as follows:
Vulnerable Domain Controller > Netlogon authentication error > Machine account security can be broken > Active Directory identity structure can be affected > Very high privileges on the domain can be obtained
This is why Zerologon is regarded as one of the most critical flaws in Windows domain environments: the target of the attack is the Domain Controller, the very centre of the system.
Fix
Microsoft's guidance, as described in the report, is that all Domain Controller and Read-Only Domain Controller systems must be updated, and that secure RPC use on Netlogon secure channel connections must be made mandatory.
Variants to test
These are directions suggested by the report's own material rather than tests it performed:
- Read-Only Domain Controllers. Microsoft's guidance covers RODCs as well as writable Domain Controllers.
- Third-party systems using Netlogon. The report lists some third-party systems that use the Netlogon protocol as affected.
- Samba configurations acting as Domain Controllers. The report lists some Samba configurations used as Domain Controllers as affected.
- Domain-joined Windows devices. The report lists domain-joined Windows devices among the affected structures.
References
The report cites the following sources:
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1210/
- CVE.org: https://www.cve.org/CVERecord?id=CVE-2020-1472
- MITRE CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1472
- Microsoft (TR): https://support.microsoft.com/tr-tr/topic/cve-2020-1472-ile-ili%C5%9Fkilendirilmi%C5%9F-netlogon-g%C3%BCvenli-kanal-ba%C4%9Flant%C4%B1lar%C4%B1nda-yap%C4%B1lan-de%C4%9Fi%C5%9Fiklikleri-y%C3%B6netme-f7e8cc17-0309-1d6a-304e-5ba73cd1a11e
- Microsoft (EN): https://www.microsoft.com/en-us/msrc/blog/2020/10/attacks-exploiting-netlogon-vulnerability-cve-2020-1472/
- CISA: https://www.cisa.gov/news-events/alerts/2020/10/29/microsoft-warns-continued-exploitation-cve-2020-1472
- CERT/CC: https://kb.cert.org/vuls/id/490028
- CERT-EU: https://cert.europa.eu/publications/security-advisories/2020-046/
- Secura: https://www.secura.com/whitepaper/zerologon-whitepaper
- Kaspersky (TR): https://www.kaspersky.com.tr/blog/cve-2020-1472-domain-controller-vulnerability/8828/
- Trend Micro (TR): https://www.trendmicro.com/tr_tr/what-is/zerologon.html
What happened, in plain words
CVE-2020-1472 is the official catalogue number of a serious security flaw in Windows networks. It is better known by its nickname, Zerologon. The flaw lives in a piece of Microsoft software called the Netlogon Remote Protocol, shortened to MS-NRPC.
To understand what Netlogon does, picture a large office building. Every employee has a badge, and every door has a reader. Before a door opens, the reader checks the badge with a central security desk. In a Windows network, that central security desk is called a Domain Controller, and Netlogon is the conversation between a computer and that desk: the computer says "it is me, let me in", and the desk checks whether that claim is true.
Zerologon is a problem in exactly that checking step. A computer that has joined the network is supposed to prove its identity before the Domain Controller trusts it. Because of a mistake in the way the proof is calculated, an attacker can sometimes get the Domain Controller to accept a crafted request as valid.
That is why the flaw matters so much. The Domain Controller is not one website or one application: it is the place where the whole company network decides who is allowed to do what. If an attacker can fool it, the consequences reach every account and every machine in the network.
The pieces you need to know first
Before going further, here are the basic ideas, explained from zero.
- Domain: a group of computers and user accounts that are managed together and trust one central authority. Think of a company where every employee badge is issued by the same security office.
- Domain Controller: the server that plays the role of that security office. It stores accounts and decides who may log in and what they may access.
- Active Directory: Microsoft's system for storing all those accounts, computers and permissions. The Domain Controller is the server that runs Active Directory.
- Windows Server: the version of Windows meant to run on servers rather than on a person's desk.
- Protocol: an agreed set of rules for how two computers talk, like the etiquette of a phone call (who speaks first, what words are used, how the call ends).
- Authentication: proving who you are. Showing a passport at a border is authentication.
- Cryptography: the mathematics used to keep messages secret and to prove that a message really came from who it claims. A wax seal on a letter is a simple, physical comparison: hard to forge, easy to check.
- Initialisation vector (IV): a random starting value used by some encryption methods so that the same message never produces the same scrambled output twice. Think of it as the random salt added to a recipe so that two loaves never taste identical.
- AES-CFB8: a specific way of using a well-known encryption algorithm (AES) to scramble a stream of data. The details do not matter here; what matters is that this mode needs a good random starting value.
- CVE: a public catalogue number given to a known security flaw, so that everyone in the world refers to the same issue by the same name.
- PoC (Proof of Concept): a small, controlled demonstration showing that a flaw is real and can actually be triggered, rather than only existing on paper.
- Patch: an update from the software maker that repairs a flaw.
- RPC: a way for one computer to ask another computer to run a function, as if the function were local. It is like phoning a colleague and asking them to look something up in their filing cabinet.
The flaw itself
The root of the problem is a cryptographic mistake. The Netlogon protocol uses a construction called AES-CFB8, and that construction needs a starting value, the initialisation vector, or IV. That starting value must be unpredictable and different every time. In the affected Netlogon implementation, it was not generated securely at random: according to the CERT/CC description, MS-NRPC uses a known, fixed, all-zero IV in AES-CFB8 mode.
Using the same, known starting value every time weakens the authentication process. It is a bit like a lock whose key is always cut from the same blank: once someone works out the pattern, the lock stops being a real barrier.
Because of this error, an attacker can send specially crafted Netlogon requests to the Domain Controller. Zero values play an important role in those requests. Not every attempt has to succeed, but after enough attempts the Domain Controller may accept the request as valid. That is where the name Zerologon comes from: the attack logic relies heavily on zero values.
Put simply, the system should normally work like this:
Domain computer > Authentication > Domain Controller > Secure channel
In Zerologon, the attacker tries to deceive that verification process:
Attacker > Specially crafted Netlogon requests > Error in cryptographic verification > Domain Controller can be deceived > A path to high privileges on the domain can open
What makes the flaw dangerous is that the attacker does not need to be a Domain Admin to begin with. According to CISA, an unauthenticated attacker who can reach the Domain Controller over the network can use this weakness to compromise Active Directory identity services. "Unauthenticated" simply means the attacker has not logged in and has no account: they only need to be able to send network traffic to the server.
Setting up a safe place to study it
The report does not describe a specific test environment that was actually built, nor any tool versions. It does, however, set out the conditions under which a proof of concept should be attempted, and the first of those is that the vulnerability must never be tried on real systems. A mistaken or unauthorised attempt against a Domain Controller can damage the whole Active Directory structure, so a PoC belongs only in an isolated laboratory environment.
A safe laboratory can be set up as follows:
- 1 Windows Server with an Active Directory Domain Controller installation
- 1 test client
- An isolated virtual network
- An environment that is not connected to the real corporate network
The aim in this PoC scenario is not to take over the system but to understand the logic of the flaw: how the Domain Controller uses the Netlogon service, how domain-joined machines are authenticated, and why the faulty cryptographic design creates risk.
A virtual network here means a network that exists only inside software, on your own machine, with no cable to the outside world. It is the difference between practising a fire drill in an empty building and setting off the alarm in a full one.
Step by step: what a PoC is for
A PoC, a Proof of Concept, is a test carried out to show that a security flaw does not exist only in theory and can work under certain conditions. The PoC side of Zerologon has to be handled very carefully, because the flaw directly affects a critical system such as the Domain Controller.
Why bother with a PoC at all? Because a written description of a flaw can be wrong, incomplete, or misunderstood. A PoC turns the description into something you can watch happen.
Step 1: Build an isolated laboratory
Use the setup described above: a Windows Server Domain Controller, a test client, an isolated virtual network and no connection to the real corporate network. In this scenario the goal is to study how the Domain Controller uses the Netlogon service, how domain-joined machines are authenticated and why the faulty cryptographic design is a risk.
Step 2: Send crafted authentication requests
In the Zerologon PoC logic, the attacker sends specially crafted authentication requests over Netlogon to a vulnerable Domain Controller. These requests are built using zero values. Because of the error in cryptographic verification, the Domain Controller may accept the request as valid in some attempts. This can bring the attacker to a level where they can affect the Domain Controller machine account.
The machine account is the account a computer itself uses inside the domain, separate from any human user's account. Every joined computer has one, and it carries its own password. If an attacker can affect that account, they are tampering with the identity of the server's own trusted peer.
The report does not include the actual request bytes, script or command used for this step.
Why the flaw exists at all
The mistake is in the design of the protocol's cryptography. The AES-CFB8 construction used by Netlogon does not generate its initialisation vector securely at random; MS-NRPC uses a known, fixed all-zero IV. With that input, the authentication process is weakened, and after enough crafted requests using zero values the Domain Controller may accept the request as valid.
The report does not describe which specific defences were in place or why they failed to stop the attack. What it does say is that Microsoft required all Domain Controllers and Read-Only Domain Controllers to be updated, and that the use of secure RPC on Netlogon secure channel connections had to be made mandatory.
A Read-Only Domain Controller is a Domain Controller that holds a copy of the directory but does not accept most changes. It is often placed in a branch office where physical security is weaker, on the reasoning that a stolen read-only copy is less damaging than a stolen full one. It still takes part in authentication, which is why it also needed updating.
What can go wrong: the impact
At the centre of CVE-2020-1472 are Active Directory Domain Controller systems running on Windows Server. Microsoft stated that all Domain Controller and Read-Only Domain Controller systems must be updated, and that secure RPC use on Netlogon secure channel connections must be made mandatory.
The main structures affected by this flaw are:
- Windows Server Domain Controller systems
- Read-Only Domain Controller systems
- Corporate networks that use Active Directory
- Domain-joined Windows devices
- Some third-party systems that use the Netlogon protocol
- Some Samba configurations used as Domain Controllers
Samba is a free software package that lets non-Windows systems act like Windows file and directory servers, and it can be configured to act as a Domain Controller. If it speaks the same protocol, it can inherit the same weakness.
These products are not affected in the way an ordinary application flaw affects them. A flaw in a web application, for example, can affect only that website. With Zerologon, the structure being targeted is the authentication centre of the corporate network. When the Domain Controller is affected, user accounts, computer accounts, authorisation checks and trust relationships inside the domain are put at risk.
Authorisation is the step after authentication: not "who are you" but "what are you allowed to do". Trust relationships are the agreements between domains that let one domain accept logins from another, like two companies honouring each other's staff passes.
CISA stated that unpatched Active Directory Domain Controller systems can be taken over through this flaw and that the attacker can obtain domain administrator access. Zerologon is therefore critical enough to affect not just a single computer but the authentication infrastructure of the entire corporate network.
The impact chain can be summarised briefly as follows:
Vulnerable Domain Controller > Netlogon authentication error > Machine account security can be broken > Active Directory identity structure can be affected > Very high privileges on the domain can be obtained
This is why Zerologon is regarded as one of the most critical flaws in Windows domain environments: the target of the attack is the Domain Controller, the very centre of the system.
The fix
Microsoft's guidance, as described in the report, is that all Domain Controller and Read-Only Domain Controller systems must be updated, and that secure RPC use on Netlogon secure channel connections must be made mandatory.
In everyday terms: install the vendor's update, and stop allowing the old, weaker way of talking to the Domain Controller.
Other places to look
These are directions suggested by the report's own material rather than tests it performed:
- Read-Only Domain Controllers. Microsoft's guidance covers RODCs as well as writable Domain Controllers.
- Third-party systems using Netlogon. The report lists some third-party systems that use the Netlogon protocol as affected.
- Samba configurations acting as Domain Controllers. The report lists some Samba configurations used as Domain Controllers as affected.
- Domain-joined Windows devices. The report lists domain-joined Windows devices among the affected structures.
Sources
The report cites the following sources:
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1210/
- CVE.org: https://www.cve.org/CVERecord?id=CVE-2020-1472
- MITRE CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1472
- Microsoft (TR): https://support.microsoft.com/tr-tr/topic/cve-2020-1472-ile-ili%C5%9Fkilendirilmi%C5%9F-netlogon-g%C3%BCvenli-kanal-ba%C4%9Flant%C4%B1lar%C4%B1nda-yap%C4%B1lan-de%C4%9Fi%C5%9Fiklikleri-y%C3%B6netme-f7e8cc17-0309-1d6a-304e-5ba73cd1a11e
- Microsoft (EN): https://www.microsoft.com/en-us/msrc/blog/2020/10/attacks-exploiting-netlogon-vulnerability-cve-2020-1472/
- CISA: https://www.cisa.gov/news-events/alerts/2020/10/29/microsoft-warns-continued-exploitation-cve-2020-1472
- CERT/CC: https://kb.cert.org/vuls/id/490028
- CERT-EU: https://cert.europa.eu/publications/security-advisories/2020-046/
- Secura: https://www.secura.com/whitepaper/zerologon-whitepaper
- Kaspersky (TR): https://www.kaspersky.com.tr/blog/cve-2020-1472-domain-controller-vulnerability/8828/
- Trend Micro (TR): https://www.trendmicro.com/tr_tr/what-is/zerologon.html
Glossary
- Active Directory: Microsoft's directory service that stores user accounts, computer accounts and permissions for a Windows network.
- AES: a widely used encryption algorithm.
- AES-CFB8: a mode of using AES that turns it into a stream cipher and requires a random starting value.
- Authentication: the process of proving an identity, such as a computer proving it is who it claims to be.
- Authorisation: deciding what an already identified user or computer is allowed to do.
- CERT/CC: a computer emergency response team that publishes vulnerability information.
- CISA: the US Cybersecurity and Infrastructure Security Agency, which issues alerts about exploited flaws.
- CVE: a public catalogue identifier for a known security vulnerability.
- Domain: a group of computers and accounts managed together under one central authority.
- Domain Admin: an account with the highest level of control over a Windows domain.
- Domain Controller: the server that authenticates users and computers and holds the directory for a domain.
- Domain-joined device: a computer that has been registered with and trusts a domain.
- Initialisation vector (IV): a starting value used by some encryption modes so that identical messages do not produce identical output; it must be unpredictable.
- Machine account: the account a computer itself uses inside a domain, separate from any human user account.
- MS-NRPC: Microsoft's Netlogon Remote Protocol, the rules computers use to talk to a Domain Controller.
- Netlogon: the Windows service and protocol that handles authentication between domain members and the Domain Controller.
- Patch: an update from a software vendor that fixes a flaw.
- PoC (Proof of Concept): a controlled demonstration that a vulnerability can actually be triggered.
- Protocol: an agreed set of rules for communication between computers.
- Read-Only Domain Controller (RODC): a Domain Controller holding a read-only copy of the directory, often used in less secure locations.
- RPC: a mechanism that lets one computer call functions on another as if they were local.
- Samba: free software that lets non-Windows systems provide Windows-compatible file sharing and, optionally, act as a Domain Controller.
- Secure channel: the protected connection between a domain member and a Domain Controller.
- Unauthenticated attacker: someone with no valid account or login who can still send network traffic to a target.
- Virtual network: a network that exists only in software, isolated from real networks.
- Windows Server: the server edition of the Windows operating system.
- Zerologon: the nickname for CVE-2020-1472, referring to the heavy use of zero values in the attack.