Kerberos Ticket Reuse from Linux
Domain-joined Linux hosts maintain Kerberos ticket caches that can be stolen and reused to authenticate to Active Directory services — SMB shares, MSSQL, HTTP services, and other Kerberos-integrated resources — without knowing any password. Keytab files go further: they contain the encrypted key material needed to request fresh tickets at any time.
This page covers locating, validating, and using ccache files and keytabs found on a Linux host. Detecting whether a host is domain-joined and finding these files is covered in the post-exploitation section.
Confirming Kerberos Configuration
The default_realm field gives you the domain name. The kdc entries point to the domain controller. Both are needed for tool configuration.
If klist returns ticket information, the current session already has a valid TGT. If it returns No credentials cache found, you need to load one.
Finding ccache Files
Ticket caches are stored in files or memory-backed locations:
Also check the environment for a non-default cache location:
Inspecting a ccache File
Before using a cache, check its contents and expiry:
Credentials cache: FILE:/tmp/krb5cc_1000
Principal: [email protected]
Issued Expires Principal
Mar 14 08:23:01 2024 Mar 14 18:23:01 2024 krbtgt/[email protected]
Mar 14 08:23:05 2024 Mar 14 18:23:05 2024 cifs/[email protected]
A TGT (krbtgt/) that has not expired is usable. Service tickets (cifs/, http/, mssql/) are for specific services. An expired TGT cannot be renewed without the original credentials, but you can still use valid service tickets until they expire.
Using a ccache for Lateral Movement
Set KRB5CCNAME to point at the stolen cache, then use Impacket tools to authenticate:
List SMB shares on a domain host:
Get a shell via SMB:
Connect to MSSQL:
-k tells Impacket to use Kerberos authentication. -no-pass skips the password prompt and uses the ccache.
For SMB access with nxc:
Finding and Using Keytab Files
Keytabs contain the account's long-term key and can generate fresh tickets at any time — they do not expire like ccache files.
Common locations:
/etc/krb5.keytab— machine account keytab, readable by root/etc/security/*.keytab— service account keytabs/opt/*/conf/*.keytab— application service keytabs (Tomcat, Hadoop, Kafka)
Inspect a keytab:
Keytab name: FILE:/etc/krb5.keytab KVNO Principal 2 host/[email protected] 2 HTTP/[email protected]
Request a TGT using the keytab:
Once you have a TGT, use it with Impacket tools as shown above. The machine account keytab (host/) gives you a computer account TGT — useful for querying AD and accessing resources the computer account has rights to.
Pass the Ticket with Impacket
If you have a ccache file from a high-value account — a service account, domain admin, or DA — use it directly:
This dumps credentials from the domain controller using the stolen ticket. For the full pass-the-ticket and lateral movement workflow, see Pass the Hash and Pass the Ticket and AD Remote Execution.
Extracting the Hash from a Keytab
The key material inside a keytab is the NT hash equivalent for the account. Extract it with:
The extracted NT hash can be used for pass-the-hash attacks against Windows services.
References
-
MIT Kerberos Documentationweb.mit.edu/kerberos/krb5-latest/doc/user/tkt_mgmt.html (opens in new tab)
Ticket Management Reference for klist, kinit, and kdestroy operations.
-
fortra/impacketgithub.com/fortra/impacket (opens in new tab)
GitHub Impacket toolkit — Python implementations of network protocols including Kerberos-authenticated SMB, MSSQL, and secretsdump.
-
GNU Shishi Manualwww.gnu.org/software/shishi/manual/shishi.html (opens in new tab)
Background reference on Kerberos ccache file format and keytab structure.
Was this helpful?
Your feedback helps improve this page.