Resource-based Constrained

MAQ (Machine Account Quota)

PowerShell (ActiveDirectory module):

PowerView:

LDAP:

CrackMapExec:

CVE-2021-34470

RBCD from Windows

Load tools:

Define credentials for the compromised account with the necessary DACL:

Add new machine account and configure RBCD (i.e., set msDS-AllowedToActOnBehalfOfOtherIdentity property to value of the new machine account SID) on the vulnerable host (DC01):

Ask TGS for CIFS and also inject other potentially useful service names into the ticket (sname field is not protected in TGS-REQ):

If the ticket cannot be imported or there's no access to corresponding services, troubleshoot it:

  • Try impersonating different privileged users when requesting the ticket.

  • Try using FQDN to NetBIOS under /msdsspn parameter (i.e., CIFS/DC01.megacorp.local > CIFS/DC01).

After the ticket has been successfully imported we can go for filesystem access (CIFS), PSRemoting (WSMAN), DCSync (LDAP) and so on:

Clean up:

PowerView 4.0

Configure RBCD on the vulnerable host (DC01):

Clean up:

RBCD from Linux

Add new machine account:

Ask TGS for LDAP:

rbcd-attack

Configure RBCD on the vulnerable host (DC01):

rbcd_permissions

Configure RBCD on the vulnerable host (DC01) via PtH:

impacket-rbcd

Bronze Bit

CVE-2020-17049

Calculate Kerberos keys for the fake machine account with Get-KerberosAESKey:

Or with Mimikatz:

Now you can impersonate a protected user:

Metasploit

RBCD with UPNs

User j.doe is populated within the msDS-AllowedToActOnBehalfOfOtherIdentity property of the SRV01 machine:

Request a regular TGT for j.doe:

Request a U2U ticket providing TGT within the /ticket and /tgs options and specifying the user to impersonate within the /targetuser option (this is an S4U2self request):

Obtain a hex view of the current TGT session key (RC4 HMAC):

Set j.doe's NT hash to the hexlified TGT session key:

Go for the S4U attack providing the initial TGT within the /ticket option and the forwardable TGS (got from the U2U request) within the /tgs option (only the S4U2proxy part is performed):

Automatization

RBCD for PrivEsc

sAMAccountName Spoofing (noPac)

CVE-2021-42278, CVE-2021-42287

Check

Look at the size of the returned TGT. If the DC is not vulnerable, the TGT will contain the PAC part and be obviously larger:

Exploit

dNSHostName Spoofing (Certifried)

CVE-2022-26923

Abuse RBCD

mitm6 + WPAD + LDAPS NTLM Relay + RBCD

WebDav + LDAPS NTLM Relay + RBCD

Clean Up

Last updated