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

Goal: 1000 CNY · Raised: 1336 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
Zerologon AutoExploit Tool | CVE-2020-1472
Readme
## Açıklama

Zafiyetli şifreleme protokolü, netlogon protokolündeki kimlik doğrulama mekanizması yerine uygulanır. Kimliği doğrulanmayan bir saldırgan, Zerologon güvenlik açığını kullanarak Domain Controller makinesinin bilgisayar hesap parolasını boş (null) olarak oluşturabilir (NT hash = 31d6cfe0d16ae931b73c59d7e0c089c0). Böylece, saldırgan oluşturmuş olduğu kimlik bilgileri ile Domain Controller makinesine erişerek diğer kullancıların kimlik bilgilerini elde edebilir. Yetkili kullanıcılara ait kimlik bilgilerinin elde edilmesiyle Domain Controller makinesinde yüksek yetkilerle oturum elde edilebilir.

## Kurulum
```
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
```

## Kullanımı

```
python3 ADZero.py dc_ip
```

Privia Security ekibi tarafından geliştirilen ADZero aracı kullanılarak, Zerologon güvenlik açığı bulunan Domain Controller makinesinde `nt authority\system` yetkisiyle Command Prompt oturum elde edilebilir. 

`python3 ADZero.py dc_ip` komutunun çalıştırılmasıyla, `dc_ip` IP adresine sahip Domain Controller makinesinde `Command Prompt` oturumu elde edilir.

ADZero aracı, hedef Domain Controller makinesinin `dc_name` (bilgisayar adı) ve `dom_name` (domain adı) bilgisini elde etmek için kimlik bilgileri null olan bir SMB login isteğinde bulunur. Alınan yanıttan, Domain Controller makinesine ait `dc_name` (bilgisayar adı) ve `dom_name` (domain) bilgisi elde edilebilir.

`dc_name` (bilgisayar adı), `com_name` (bilgisayar adı sonuna `$` sembolünün eklenmesiyle oluşturulan bilgisayar hesabı) ve `dc_ip` (Domain Controller IP adresi) bilgisi kullanılarak güvenlik açığı tetiklenir. Netlogon Remote protokolü üzerinde yapılan istek sonucunda güvenlik açığının tetiklenmesiyle `com_name` (bilgisayar hesabı) parolası boş oluşturulur (NT hash = 31d6cfe0d16ae931b73c59d7e0c089c0).

Impacket modüllerinden biri olan `secretdump.py` modülü kullanılarak `com_name` (bilgisayar hesabı), `dom_name`, `dc_ip` ve `com_name` için oluşturulan boş parola bilgisiyle Domain Controller makinesinden `Administrator` kullanıcısına ait parola bilgisi `LM:NTLM` hash olarak dump edilir. Ayrıca, dump işlemi sırasında elde edilen `LM:NTLM` hash ``out`` adında bir dosyaya yazdırılır.

Elde edilen `LM:NTLM` hash'in Impacket modüllerinden `smbexec.py` modülüyle kullanılması sonucunda Domain Controller makinesinde `Command Prompt` oturumu elde edilir. `LM:NTLM` hash değerinin parola olarak kullanılması tekniğine `Pass The Hash` denir. Domain Controller makinesinde bir meterpreter oturumu, ``out`` adlı dosyaya yazdırılan `LM:NTLM` hash değerinin Metasploit Framework içerisindeki `exploit/windows/smb/psexec` exploit modülüyle kullanılması sonucunda elde edilebilir.

## Ekran Görüntüleri

![](PoC.png)

## Kaynak

https://github.com/blackarrowsec/redteam-research

File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →