LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gettgt.py

Kerberos ticket granting ticket requester

TLDR

Get a TGT with a password
$ getTGT.py [domain]/[username]:[password] -dc-ip [dc_ip]
copy
Get a TGT using an NTLM hash
$ getTGT.py [domain]/[username] -hashes :[nthash] -dc-ip [dc_ip]
copy
Get a TGT using an AES key
$ getTGT.py [domain]/[username] -aesKey [aes_key] -dc-ip [dc_ip]
copy
Prompt for the password instead of passing it inline
$ getTGT.py [domain]/[username] -dc-ip [dc_ip]
copy

SYNOPSIS

getTGT.py domain/user[:password] [options]

DESCRIPTION

getTGT.py is an Impacket example script that requests a Kerberos Ticket Granting Ticket (TGT) from an Active Directory domain controller, given a password, an NTLM hash, or an AES key. The official description reads: "Given a password, hash or aesKey, it will request a TGT and save it as ccache."The resulting ticket is written to a ccache file named after the principal (for example `username.ccache`). Set the KRB5CCNAME environment variable to that file and other Impacket tools, or native utilities, can reuse the ticket for pass-the-ticket authentication.There is no dedicated output flag: the ccache filename is derived from the username automatically.

PARAMETERS

DOMAIN/USER[:PASSWORD]

Target identity. The password is optional and is prompted for if omitted.
-dc-ip IP
IP address of the domain controller. Defaults to the domain FQDN if omitted.
-hashes LMHASH:NTHASH
NTLM hashes to authenticate with. The LM half may be left empty (`:NTHASH`).
-aesKey KEY
AES key (128 or 256 bit) for Kerberos authentication.
-k
Use Kerberos credentials from the ccache file (KRB5CCNAME), falling back to the supplied credentials.
-no-pass
Do not prompt for a password, useful together with -k.
-debug
Turn on DEBUG output.
-ts
Add a timestamp to each log line.

CAVEATS

Authorized testing only. Requires valid credentials and clock sync with the domain controller, since large time skew breaks Kerberos. Tickets have a limited lifetime.

HISTORY

getTGT.py is part of Impacket, the Python network protocol toolkit for Active Directory security testing, originally by Core Security and now maintained by Fortra.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid