RBCD
ABOUT
RBCD is a Windows Active Directory mechanism where a computer object specifies which accounts are allowed to impersonate users to it, for constrained (limited) network-based delegation using Kerberos.
Attackers exploit it by inserting themselves into that trust list and impersonating any user.
"Resource-Based" means the permission is set on the target machine, not on the impersonating account.
"Constrained" means the impersonation is limited to specific services, like SMB or LDAP, not all services.
"Delegation" means one account can act as another user across the network, not just locally.
RBCD allows a computer or service account to say, "this other account is allowed to act as any user when connecting to me." Attackers abuse it by creating their own computer account, then writing their own SID into the delegation attribute on a target machine. After that, they can impersonate any domain user, like Administrator, to that target.
So basically it is crippled version of full impersonation, which is good, considering rule of least privilege
Requirements
Domain User
Administrator@militech.local
Fake Machine Account
FAKE01$
Fake Machine Password
123456
Fake Machine SID
To be retrieved during attack
Target Machine
WS01
Target Admin
Administrator
Domain Controller
DC01
Delegation Permission
Write access to WS01 RBCD attribute
FLOW
Create a fake machine account (FAKE01$), if
MachineAccountQuota
allows it.Add FAKE01$ SID to the
msDS-AllowedToActOnBehalfOfOtherIdentity
attribute on the target machine WS01, granting delegation rights.Authenticate as FAKE01$ and request a Kerberos ticket as Administrator to FAKE01 (S4U2Self).
Use that ticket to request a second ticket as Administrator to WS01 (S4U2Proxy).
Receive a valid service ticket for Administrator to WS01 and use it to access WS01 as Administrator, achieving privilege escalation.
S4U2Self + S4U2Proxy
S4U2Self and S4U2Proxy are Kerberos protocol extensions, not standalone attack techniques.
They were designed by Microsoft as part of Service-for-User (S4U) functionality to support constrained delegation. Their purpose is to let services act on behalf of users under strict control.
You can think of them as functions inside the Kerberos protocol:
S4U2Self = "Service for User to Self" Lets a service request a ticket for any user to itself, without needing the user's password. LOCAL ONLY (So as separate technique pointless, because to do it we already need to have full control over machine)
S4U2Proxy = "Service for User to Proxy" Lets the service use that ticket to request a second ticket to another service, completing delegation.
WINDOWS
1. Creating Machine Object
Checking Object + Taking it's SID
2. Creating Security Descriptor for FAKE01
Checking Descriptor
3. Generating RC4 Hash for FAKE01
4. Impersonating
Base64 Ticket to Ccache ticket
RESOURCES
Last updated