Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1020 CNY

100%

CVE-2020-1472 PoC — Netlogon Elevation of Privilege Vulnerability

Source
Associated Vulnerability
Title:Netlogon Elevation of Privilege Vulnerability (CVE-2020-1472)
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.
Description
PoC for Zerologon (CVE-2020-1472) - Exploit
Readme
# CVE-2020-1472 - Zero-Logon POC

![alt text](https://github.com/harshil-shah004/zerologon-CVE-2020-1472/blob/master/PoC%20-%20CVE-2020-1472.png)

This exploit requires you to use the latest impacket from [GitHub](https://github.com/SecureAuthCorp/impacket).

Ensure impacket installation is done with netlogon structures added.

Note : 

1. By default, successful exploitation changes the password of the DC Account. 

2. Allows DCSync

3. Breaks communication with other domain controllers (Be careful!)

Original Research & information [here](https://www.secura.com/blog/zero-logon)

## Installation

Requires Python 3.7 or higher and Pip. Install dependencies as follows:

    pip install -r requirements.txt
    
## Before Zerologon 
![alt text](https://github.com/harshil-shah004/zerologon-CVE-2020-1472/blob/master/Screenshots/before-zerologon.png)

Unable to dump secrets!

## Performing Zerologon Attack!
![alt text](https://github.com/harshil-shah004/zerologon-CVE-2020-1472/blob/master/Screenshots/zerologon-attack.png)

## After Zerologon
![alt text](https://github.com/harshil-shah004/zerologon-CVE-2020-1472/blob/master/Screenshots/after-zerologon.png)

Successfully dumped NTDS.dit secrets!

## Exploit Steps
- Read the related articles/blogs/whitepapers to know the objective of the exploit
- Run `python3 zero-logon-exploit.py` with IP and netbios name of DC
- DCSync with secretsdump, using `-just-dc` and `-no-pass` or empty hashes and the `DCHOSTNAME$` account


## Restore steps
If you make sure that [this line](https://github.com/SecureAuthCorp/impacket/blob/64ce46580286b5ab15a4737bddf85201ce2adde3/impacket/examples/secretsdump.py#L1530) in secretsdump passes (so make it `if True:` for example) secretsdump will also dump the plaintext (hex encoded) machine account password from the registry. You can do this by running it against the same DC and using a DA account.

Alternatively you can dump this same password by first extracting the registry hives and then running secretsdump offline (it will then always print the plaintext key because it can't calculate the Kerberos hashes, this saves you modifying the library).

With this password you can run `restorepassword.py` with the `-hexpass` parameter. This will first authenticate with the empty password to the same DC and then set the password back to the original one. Make sure you supply the netbios name and IP again as target, so for example:

```
python restorepassword.py testsegment/s2016dc@s2016dc -target-ip 192.168.222.113 -hexpass e6ad4c4f64e71cf8c8020aa44bbd70ee711b8dce2adecd7e0d7fd1d76d70a848c987450c5be97b230bd144f3c3...etc
```

Credits for Exploit Provision : [dirkjanm](https://github.com/dirkjanm) 
File Snapshot

[4.0K] /data/pocs/412ad6726b2f72ea8c9218f975ceacb6b63d387e ├── [138K] PoC - CVE-2020-1472.png ├── [2.6K] README.md ├── [ 289] requirements.txt ├── [6.1K] restorepassword.py ├── [4.0K] Screenshots │   ├── [ 81K] after-zerologon.png │   ├── [ 70K] before-zerologon.png │   └── [ 27K] zerologon-attack.png ├── [3.0K] zerologon_check_vulnerable.py └── [3.8K] zero-logon-exploit.py 1 directory, 9 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →