-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Get crackable ASREP hashes #18338
Get crackable ASREP hashes #18338
Conversation
…ash. Fall back to defaults.
It might be worth opening an issue to both of them to get this added :P |
Looks like it is supported by at least hashcat? Untried. But @smashery 's ticket says it's not supported and then cracks it with hashcat anyways, so I'm a bit confused. @smashery I guess I'm the hash and crack person for msf, and had planned to take a look at this tomorrow. If I see things (formatters etc) to get this working, I'll send you a PR |
Preferencing RC4_HMAC for the default offered etype makes sense to me - I believe this was the default/only behavior before all of the awesome work to support additional etypes was added 😄 |
The docs call out using hashcat for ASREPRoasting (rendered) metasploit-framework/documentation/modules/auxiliary/scanner/kerberos/kerberos_login.md Lines 68 to 90 in 90cf371
But on reflection the docs aren't super great, since it doesn't really call out when you should use john or hashcat, or that 18200 isn't always correct depending on the negotiated etype (which is easy to trip up users IMO): From hashcat's docs
|
@h00die - to clarify the apparent discrepancy: cracking ASREPs is supported by Hashcat... as long as the DC encrypts the ASREP it with the |
this fell off my radar, go ahead and land it, and ill get another PR later to put the hash cracking/identification/etc in all the things. No sense holding it up |
e5622ca
to
a7f2165
Compare
Changes look good and testing was as expected. Thanks for the PR as well as the detailed verification steps. Verification
Revert the pre-auth disabled setting for the Administrator account, then test:
Force update the Group Policy changes:
Confirm brute forcing still works:
|
Release NotesThis PR updates the kerberos.rb library such that when a kerberos login is attempted, on a user where pre-authentication is not required, the module now requests a RRC4-HMAC ticket, since it's more easily crackable. |
This PR fixes the ASREP roasting workflow in Metasploit, which resolves #17988. A note on that ticket: That ticket states that the behaviour (and thus the bug) is in the
get_user_spns
module, but that module is actually TGS-REP roasting (kerberoasting), and I was unable to reproduce any issues with that module. But the issue correctly describes a replicable issue in thekerberos_login
module, so that's what this ticket addresses.The cause of this issue was that, when we offer AES ciphers alongside our RC4 cipher, the server complies, and gives us an ASREP encrypted with one of the AES ciphers. Cracking this is slow, and is not currently supported by JtR or Hashcat, so is less valuable. To fix this, we just tell the server that we only support RC4_HMAC, and it gives us what we want.
If we made only this change, it would potentially break the login scanner in the (admittedly rare) situation where RC4 has been disabled in the domain. So if we receive an "encryption type not supported" error, we retry with our defaults.
Verification
msfconsole
use kerberos_login
hashcat -m18200 '$krb5asrep$23$user...' -a 3 --force /tmp/wordlist
kerberos_login
module still works to brute force passwords for users without pre-auth disabledkerberos_login
module still works to brute force passwords for users without pre-auth disabled, when RC4 is disabled in the domain (In Group Policy, Computer Configuration >> Windows Settings >> Security Settings >> Local Policies >> Security Options >> "Network security: Configure encryption types allowed for Kerberos")