Showing posts with label Active Directory. Show all posts
Showing posts with label Active Directory. Show all posts

Sunday, 7 March 2021

Stealing user hashes without needing credentials via AS -Rep roasting

Unlike kerberoasting which require the account to be a service account, AS-Rep roasting is able to acquire hashes from standard users provided kerberos per-authentication is disabled. Typically this option is disabled when a user must authenticate to an application that does not support kerberos per-authentication.

With pre-authentication disabled an attacker is able to request a TGT from the KDC without requiring any credentials. This means that an attacker only needs a valid username and can be handed the hash from the KDC.

I have created a backup account with kerberos pre-authentication turned off to demonstrate.

The Attack

The attack uses another of IMPackets tools called GetNPUsers. The hash format can be output as hashcat or john the ripper format.

GetNPUsers.py <domain_name>/ -usersfile <users_file> -format <AS_REP_responses_format [hashcat | john]> -outputfile <output_AS_REP_responses_file>