AS-REP Roasting
Last updated
Last updated
Login on DC02
with the username Administrator
and password Welcome01!
.
Open the "Active Directory Users and Computers" administration tool on DC02
.
3. Click on "View" and enable "Advanced Features".
4. Open "Users", right click the user banktest
and click on "Properties"
5. Open "Account" and scroll to the bottom in "Account options", then select "Do not require kerberos preauthentication".
6. Click on "Apply" and "OK".
When pre-authentication is not required, an attack can directly send a request for authentication. The KDC will return an encrypted TGT and the attacker can extract the hash and brute-force it offline.
AS-REP roasting was already covered in the Initial Access Attacks section.
But since we have a set of valid credentials of the domain now, we could request a list of all usernames and check for AS-REP roastable users. During the Initial Access AS-REP Roasting we used a example script from Impacket. But there are more tools that can accomplish the same thing, such as Crackmapexec.
Use the discovered credentials john
and password Welcome2022!
with crackmapexec to authenticate over ldap and AS-REP roast all roastable users.
2. We retrieved two hashes, one new one from bankuser
. Lets crack it with hashcat and use the passwordlist we created earlier during the passwordspray. The hashcat parameters are:
Crackingmode: -a 0
for using a wordlist
Hashmode: -m 18200
for Kerberos 5, etype 23, AS-REP
List with hashes: asreproasting.txt
Passwords list: passwords.txt
We successfully cracked the password of the user bankuser
, the password is Bank2022!
.
Periodically check for users that don't require pre-authentication and remove the attribute.
Check for users with the attribute:
Remove the attribute for a single user:
Check for users with the attribute and remove it:
If pre authenticatio is required. Use strong passwords (at least 32 characters).