Pass the Ticket (PtT) (Linux)

Many organizations join Linux machines to an Active Directory domain to centralize identity management; in this case, Kerberos serves as the authentication mechanism.

Ticket Storage on Linux

  • ccache (by default in /tmp/krb5cc_*): temporary files that store tickets (TGT/TGS). The KRB5CCNAME variable points to the file.
  • keytab (by default /etc/krb5.keytab): contains (principal, Kerberos key) pairs for automatic passwordless authentication.

Determining Whether the Machine Is Domain-Joined

  • realm list: shows whether the machine is joined to a Kerberos domain.
  • Check sssd or winbind: ps -ef | grep sssd

Searching for Tickets on Linux

Keytab

terminal
$ find / -name "*keytab*"klist -k -t /opt/specialfiles/carlos.keytabkinit carlos@INLANEFREIGHT.HTB -k -t /opt/specialfiles/carlos.keytab$ smbclient //dc01/carlos -k -c ls

ccache

terminal
$ cp /tmp/krb5cc_647401106_XYZ ~/julio_ccache$ export KRB5CCNAME=~/julio_ccacheklist$ smbclient //dc01/julio -k -c ls

Abusing Keytab and Ccache

Keytab: extract hashes (NTLM, AES) with keytabextract.py, crack them, and log in with su - usuario@dominio or over SSH.
Ccache: copy a ccache file belonging to a user of interest, set KRB5CCNAME, and use tools that support -k (smbclient -k, impacket-wmiexec -k, etc.).

Privilege Escalation

If you find a keytab or ccache file belonging to a privileged user who can run sudo su → you can escalate to root. You may also find a Domain Admin's ccache file and access resources on the DC.

Pivoting and Using Kerberos from the Attacker Machine

Set up a chisel server, create a SOCKS proxy on localhost:1080, configure /etc/hosts to resolve the DC, and use proxychains impacket-wmiexec dc01 -k or proxychains evil-winrm -i dc01.

Converting Formats (ccache ↔ kirbi)

impacket-ticketConverter converts from ccache to kirbi or vice versa.

Linikatz

It is like mimikatz but for Linux. It runs as root and searches for credentials from sssd, Samba, Kerberos, etc. It extracts tickets (ccache, keytab) from the Linux machine joined to AD.