
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! π«
"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! π«
Option 1: Build Single Executable (Recommended)
dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true
Option 2: Simple Build
dotnet build --configuration Release
.\Wonka.exe <list|dump> [/luid:<luid>] [/service:<name>]
Running
.\Wonka.exewith no arguments (or-h) prints the help β you must passdumporlistexplicitly to do anything.
Wonka adapts to the privileges it is running with:
/luidand/serviceare dump-only filters; combining them withlistis rejected.
# Show help (also shown when run with no arguments)
.\Wonka.exe -h
# Dump every accessible ticket (all sessions if elevated, otherwise just yours)
.\Wonka.exe dump
# Just enumerate who has tickets, without pulling the blobs (admin)
.\Wonka.exe list
# Pull a single krbtgt ticket (TGT) for one logon session
.\Wonka.exe dump /luid:0x3e7 /service:krbtgt
Starting Kerberos ticket extraction process...
[+] Running with administrative privileges
[+] Successfully impersonated as SYSTEM
[+] Logon sessions found: 15
[+] User: [email protected]
[+] LogonId: 0x3e7 | 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...
-----------------------------------------------------------------------
In
listmode the output is identical except theTicket b64/EncTypelines are omitted β you get the metadata without the extractable ticket blob.
Wonka/
βββ Program.cs # CLI parsing + ticket extraction logic
βββ Winapi.cs # Windows API definitions
βββ Wonka.csproj # Project file
OpenProcessToken / DuplicateTokenEx / ImpersonateLoggedOnUser / RevertToSelf - SYSTEM impersonation (admin path)LsaRegisterLogonProcess - Privileged LSA registration (admin path)LsaConnectUntrusted - Unprivileged LSA connection for the current user (standard-user path)LsaEnumerateLogonSessions - Session enumerationLsaCallAuthenticationPackage - Kerberos communicationElevated (Administrator):
LsaRegisterLogonProcess)/luid / /service)list mode)Standard user:
LsaConnectUntrusted) β no impersonation needed{0,0})| Issue | Solution |
|---|---|
| "Could not impersonate as SYSTEM" | Run as Administrator (or run as a standard user to dump just your own tickets) |
| "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:
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." π
| Command | What it does |
|---|
.\Wonka.exe (no args) | Show help. |
.\Wonka.exe dump | Extract tickets (base64) for every accessible session. |
.\Wonka.exe list | List users and ticket metadata only β no base64 is extracted. |
.\Wonka.exe dump /luid:<luid> | Dump only the session with the given LUID (hex 0x3e7 or decimal 999). |
.\Wonka.exe dump /service:<name> | Dump only tickets whose server name contains <name> (e.g. krbtgt, cifs/host.domain). |
.\Wonka.exe dump /luid:0x3e7 /service:krbtgt | Combine filters to dump a single ticket. |
.\Wonka.exe -h | Show help. |