impacket-gettgt
TLDR
View documentation for the original command
SYNOPSIS
impacket-gettgt [-h] [-hashtype {lm,ntlm}] [-user USER] [-nthash NTHASH] [-aesKey AESKEY] [-dc-ip DC_IP] [-k] [-no-pass] [-request] domain/username
PARAMETERS
-h, --help
Show help message and exit
-hashtype {lm,ntlm}
Hash type for authentication; options: lm, ntlm (default)
-user USER
Username for authentication instead of positional arg
-nthash NTHASH
NTLM hash (pass-the-hash) instead of password
-aesKey AESKEY
AES-256 key for Kerberos authentication
-dc-ip DC_IP
IP address of target Domain Controller
-k
Use Kerberos ccache credentials (KRB5CCNAME)
-no-pass
Skip password prompt (for scripting)
-request
Force TGT request even if cached
DESCRIPTION
impacket-gettgt is a tool from the Impacket suite designed to request a Ticket Granting Ticket (TGT) from an Active Directory Kerberos Key Distribution Center (KDC). It supports authentication via password, NTLM hash (pass-the-hash), or AES keys, making it useful for penetration testing and red team operations.
By providing domain credentials, the tool sends an AS-REQ to the KDC (port 88/TCP) and saves the resulting TGT in both ccache (for tools like impacket-ntlmrelayx) and .kirbi formats (for Tiket tools). This enables subsequent Kerberos-based attacks like pass-the-ticket, overpass-the-hash, or service ticket requests with impacket-getST.
Common workflow: impacket-gettgt domain/user:pass or with hash -nthash. Set KRB5CCNAME env var to use the TGT. Detection risks include event logs (4768/4769) on Windows DCs.
CAVEATS
Requires TCP/88 access to DC; generates auth logs (Event ID 4768); invalid creds fail silently sometimes; Python deps (impacket, pyasn1); not for production use.
OUTPUT FILES
Generates user.tgt@DOMAIN.ccache (export KRB5CCNAME=...) and .kirbi ticket file.
EXAMPLE USAGE
impacket-gettgt -nthash aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 TEST/user
Outputs TGT for further attacks.
HISTORY
Part of Impacket library by SecureAuth (now Fortra), evolved since 2010 for protocol fuzzing/pentesting; getTGT added for Kerberos ops in v0.9+.
SEE ALSO
impacket-getST(1), impacket-psexec(1), kinit(1)


