SkillAgentSearch skills...

AesKrbKeyGen

Generate AES128/256 Kerberos keys for an AD account using a plaintext password and Python3

Install / Use

/learn @Tw1sm/AesKrbKeyGen
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

aesKrbKeyGen

Script to calculate Active Directory Kerberos keys (AES256 and AES128) for an account, using its plaintext password. Either of the resulting keys can be utilized with Impacket's getTGT.py to obtain a TGT for the account, provided it is configured to support AES encryption.

This is a Python port of Kevin Robertson's Get-KerberosAESKey.ps1

Examples

Keep in mind AD user account names are case sensitive when supplying the -user flag

Calculate AES keys for a AD user account:

python3 aesKrbKeyGen.py -domain domain.local -user matt -pass Password1

Calculate AES keys for an AD computer account:

python3 aesKrbKeyGen.py -domain domain.local -user laptop123 -pass Password1 -host

Use Impacket's getTGT.py with a resulting AES key to obtain a TGT:

python3 getTGT.py domain.local/matt -aesKey <AES256/128 key>

Related Skills

View on GitHub
GitHub Stars80
CategoryDevelopment
Updated3d ago
Forks9

Languages

Python

Security Score

85/100

Audited on Mar 26, 2026

No findings