New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Cracking Active Directory Kerberos Keys - Etypes 3/17/18 #1386

Open
elitest opened this Issue Oct 6, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@elitest

elitest commented Oct 6, 2017

I'd like to request the ability to crack Kerberos keys in hashcat. As you may already be aware, Kerberos keys in AD are deterministically derived from the password of the related account. So the keys are hashes in effect. One of the reasons that this has not gotten much attention is that in most places in an Active Directory environment, where you are going to encounter Kerberos keys, you are also going to encounter NTLM hashes or passwords(e.g. mimikatz and NTDS database). However there are places of potential research, that interface with AD, but are not Windows. Macs, Linux and random embedded devices are more likely to use Kerberos only for authentication. While it is true that getting access to the key is enough to authenticate against AD, being able to crack a password allows for more flexibility in toolset, as not many tools support kerberos authentication and virtually no built-in to the OS tools support this kind of auth.

As part of a recent DerbyCon talk, we developed a PoC Kerberos key generator and cracker: echidna. This is probably the most consolidated place to look at how the key generation works. There Is plenty of info in MS-KILE as well, and it references the various RFCs.

I would recommend using the hash format that Secretsdump uses(same as echidna uses). While you could make the argument that using a keytab would be better, I don't think this is the way to go, the format contains binary and can contain multiple keys... It would be confusing. Here are some example keys using the domain/username:password TEST.LOCAL/test:password:

# python krbKeyGenerate.py -u test -d TEST.LOCAL -p password
TEST.LOCAL\test:aes256-cts-hmac-sha1-96:487addf1717899f2ee45c4b67e159d54adec46d086f339b88fd7deaa25d49a65
TEST.LOCAL\test:aes128-cts-hmac-sha1-96:6fb8b78e20ad3df6591cabb9cacf4594
TEST.LOCAL\test:des-cbc-md5:9dbc9bea23237fae
TEST.LOCAL\test:rc4_hmac:8846f7eaee8fb117ad06bdd830b7586c

Note that RC4 probably doesn't need to be done, as the key used is the NTLM hash.

Figuring out how to crack these could also help provide most of the infrastructure for other issues such as #1384 and #959.

If you have any questions or suggestions, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment