ESC1 UnPAC
A Beacon Object File (BOF) that performs the complete ESC1 attack chain in a single execution: certificate request with arbitrary SAN (+SID), PKINIT authentication, and NT hash extraction via UnPAC-the-hash.
Install / Use
/learn @RayRRT/ESC1 UnPACREADME
ESC1-unPAC BOF
Request a certificate with arbitrary SAN (and SID to bypass KB5014754 AKA Strong Mapping), authenticate via PKINIT, and extract the NT hash
Demo
Havoc:
https://github.com/user-attachments/assets/806cfbed-2d64-4256-bc2b-0f93bc6c8e08
CS:
https://github.com/user-attachments/assets/9ecfdfbc-4300-482e-9229-69d7fcd6dcd8
Features
| Feature | Description | |---------|-------------| | ESC1 Exploitation | Request certificates with arbitrary Subject Alternative Name | | KB5014754 Bypass | Automatic SID inclusion for Strong Certificate Mapping | | PKINIT Authentication | Full RFC 4556 implementation with DH key exchange | | UnPAC-the-hash | Extract NT hash from PAC credentials | | U2U Fallback | User-to-User when PA-PAC-CREDENTIALS unavailable | | Single BOF | Complete attack chain in one command | | Rubeus Compatible | Kirbi output works with Rubeus/Mimikatz |
Build
git clone https://github.com/RayRRT/ESC1-unPAC.git && cd ESC1-unPAC && chmod +x build.sh && ./build.sh
Usage
Havoc
- Scripts → Load Script →
havoc/esc1-unpac.py
Cobalt Strike
- Script Manager → Load →
cobaltstrike/esc1-unpac.cna
Command
esc1-unpac <CA> <Template> <UPN> [KDC]
Example
esc1-unpac EVILCA1.evilcorp.net\evilcorp-EVILCA1-CA ESC1Template administrator@evilcorp.net
Output
- PFX certificate (base64, password:
SpicyAD123) - TGT in kirbi format (Rubeus compatible)
- NT Hash
References
⚠️ Disclaimer
This tool is intended for authorized security testing and educational purposes only. Unauthorized access to computer systems is illegal. Always obtain proper authorization before testing.
Related Skills
node-connect
338.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.4kCommit, push, and open a PR
