Kerberos Abuses - AS-REP Roasting

First we need to understand what is kerberos and why is it used? it's already explained very well check the below link for an overview.

https://www.roguelynn.com/words/explain-like-im-5-kerberos/

Lets say you have a foothold and you have access to a user account, you can check if any user has kerberos preauth set, if you have powerview loaded, this command should provide all the users:

Get-DomainUser -PreauthNotRequired

courtesy: HarmJ0y https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993

Found the user? Great!

Alternatively, the following we can also use the same author's ASREPRoast PS script, available below, clone it and load it to the session.

https://github.com/HarmJ0y/ASREPRoast

You may notice (at the time of writing) the repository is no longer current, but it still can be used. The active development is happening as part of GhostPack (more on this later).


* you may be wondering what's all this extensive redacting? I'm security conscious even while on CTFs! LOL

Now the fun / tiresome part is to crack the hash:

john --format:krb5asrep krb --wordlist /usr/share/wordlists/rockyou.txt

If you are not able to crack this hash? Sorry I won't be able to help you. Just joking, use some mangling rules, generate a more robust list. At this day and age I would still use Korelogic's rules, available below. I would change some things like years and things like that.



So to summarise if you've seen someone for some reason would have disabled Pre-Auth (why would some disable Pre-Auth baffles me? and even the punters can't say :-), but you can think of a scenario if someone identified using BloodHound - Don't know how yet that a particular user has rights to modify a target user's account could they could unset the "Dont Require Preauth" setting?)

However for the attack to work you still need to have a weak password, and the pre-auth disabled.






Comments

Popular posts from this blog

The correct way to install Jython (for Burpsuite)

RFID cloning with Proxmark3 Easy

Extracting an IPA; App distributed through Testflight