Skip to content
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

Output issue with kerberoast hashes, does not match hashcat format #301

Open
evilmog opened this issue May 13, 2024 · 4 comments
Open

Output issue with kerberoast hashes, does not match hashcat format #301

evilmog opened this issue May 13, 2024 · 4 comments

Comments

@evilmog
Copy link

evilmog commented May 13, 2024

Describe the bug
Kerberosoast etype 23, etype 17, and etype 18 do not match the hashcat parser. The hashcat parser expects in this format (example for type 18)

/**
   * $krb5tgs$18$*user*realm*$checksum$edata2
   * $krb5tgs$18$*user*realm*spn*$checksum$edata2
   */

A sanitized example:
$krb5tgs$18$USERNAME$REALM.EXAMPLE$REALM.example/USERNAME$ (bad) vs
$krb5tgs$18$USERNAME$REALM.EXAMPLE$*REALM.example/USERNAME*$ (good)

Notice the * around the SPN, this is required for hashcat parsing, otherwise you get an error in the hashcat parser for all kerberosting modes.

Lines 66, 75, 84, and 93 in nxc/protocols/ldap/kerberos.py show this issue.

To Reproduce
Perform a kerberoast attack against a domain, extract hashes and then try to crack with hashcat, you will get an error

Expected behavior

hashcat.exe --identify 'kerberoasthash here'

The following hash-mode match the structure of your input hash:

      # | Name                                                | Category
  ======+=====================================================+======================================
  19700 | Kerberos 5, etype 18, TGS-REP                       | Network Protocols

this should apply for all 3 kerberoasting hash types

NetExec info

  • OS: Kali
  • Version of nxc: latest
  • Installed from: github

** Details on the parser **
19700 etype 18

"$krb5tgs$18$srv_http$synacktiv.local$16ce51f6eba20c8ee534ff8a$57d07b23643a516834795f0c010da8f549b7e65063e5a367ca9240f9b800adad1734df7e7d5dd8307e785de4f40aacf901df41aa6ce695f8619ec579c1fa57ee93661cf402aeef4e3a42e7e3477645d52c09dc72feade03512dffe0df517344f673c63532b790c242cc1d50f4b4b34976cb6e08ab325b3aefb2684262a5ee9faacb14d059754f50553be5bfa5c4c51e833ff2b6ac02c6e5d4c4eb193e27d7dde301bd1ddf480e5e282b8c27ef37b136c8f140b56de105b73adeb1de16232fa1ab5c9f6";

19600 etype 17

"$krb5pa$18$hashcat$HASHCATDOMAIN.COM$96c289009b05181bfd32062962740b1b1ce5f74eb12e0266cde74e81094661addab08c0c1a178882c91a0ed89ae4e0e68d2820b9cce69770";

13100 etype 23

$krb5tgs$23$*user$realm$test/spn*$b548e10f5694ae018d7ad63c257af7dc$35e8e45658860bc31a859b41a08989265f4ef8afd75652ab4d7a30ef151bf6350d879ae189a8cb769e01fa573c6315232b37e4bcad9105520640a781e5fd85c09615e78267e494f433f067cc6958200a82f70627ce0eebc2ac445729c2a8a0255dc3ede2c4973d2d93ac8c1a56b26444df300cb93045d05ff2326affaa3ae97f5cd866c14b78a459f0933a550e0b6507bf8af27c2391ef69fbdd649dd059a4b9ae2440edd96c82479645ccdb06bae0eead3b7f639178a90cf24d9a";
@NeffIsBack
Copy link
Contributor

Thanks for the bug report!

@NeffIsBack NeffIsBack added the bug Something isn't working label May 14, 2024
@Marshall-Hallenbeck
Copy link
Collaborator

@evilmog what commands are you running? This is working in my lab via nxc ldap $IP -u $USERNAME -p $PASSWORD --kerberoast kerberoast.txt

image

image

@evilmog
Copy link
Author

evilmog commented May 14, 2024 via email

@mpgn
Copy link
Collaborator

mpgn commented May 15, 2024

Hello @evilmog , i'm a bit suprise by this one, why the hash from @Marshall-Hallenbeck is wrong ?

@NeffIsBack NeffIsBack added investigation and removed bug Something isn't working labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants