"We are the music makers, and we are the dreamers of dreams." - Willy Wonka
Wonka is a sweet Windows tool that extracts Kerberos tickets from the Local Security Authority (LSA) cache. Like finding a ticket, but for security research and penetration testing! π«
- π System Impersonation - Automatically becomes SYSTEM to access LSA
- π Session Discovery - Finds all active logon sessions
- ποΈ Ticket Extraction - Retrieves detailed Kerberos ticket information
- π¦ Base64 Output - Ready-to-use ticket format
- Windows machine
- Administrator privileges
- .NET 7.0+ (for building)
Option 1: Build Single Executable (Recommended)
dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=trueOption 2: Simple Build
dotnet build --configuration Release# Run as Administrator
.\Wonka.exe[+] Starting Kerberos ticket extraction process...
[+] Successfully impersonated as SYSTEM
[+] Logon sessions found: 15
[+] User: charlie.bucket@CHOCOLATE.FACTORY
[+] Tickets found: 3
-----------------------------------------------------------------------
Username = charlie.bucket
DnsDomainName = chocolate.factory
StartTime ---> 10/21/2025 10:30:15 AM
EndTime ---> 10/21/2025 8:30:15 PM
Server Name ---> krbtgt/CHOCOLATE.FACTORY
Ticket b64 ---> YIIFgjCCBX6gAwIBBaEDAgEWooIEhjCCBIJhggR+MII...
-----------------------------------------------------------------------
wonka/
βββ Program.cs # Main ticket extraction logic
βββ winapi.cs # Windows API definitions
βββ Config.cs # Configuration and logging
βββ wonka.csproj # Project file
OpenProcessToken- Process token accessLsaRegisterLogonProcess- LSA registrationLsaEnumerateLogonSessions- Session enumerationLsaCallAuthenticationPackage- Kerberos communication
- Impersonates SYSTEM via winlogon process token
- Registers with Local Security Authority
- Enumerates all logon sessions
- Extracts Kerberos tickets from each session
- Outputs tickets in Base64 format
| Issue | Solution |
|---|---|
| "Could not impersonate as SYSTEM" | Run as Administrator |
| "Could not initialize LSA" | Check Windows compatibility |
| "No tickets found" | Ensure Kerberos is in use (klist) |
"A little nonsense now and then is relished by the wisest men."
This tool is for authorized security research and testing only. Like Wonka's factory, enter only with permission! π
Use responsibly:
- β Security research and education
- β Authorized penetration testing
- β System administration
- β Unauthorized access to systems
Created for security professionals who need to extract Kerberos tickets as sweet as Wonka's chocolate. Remember: with great power comes great responsibility!
"So shines a good deed in a weary world." π
