1 of 18

KERBEROS S4U DELEGATION ABUSE

Kerberos S4U Delegation Abuse Through Active Directory ACE Miscnfiguration

1

2 of 18

  • ACTIVE DIRECTORY - REFRESHER
  • BASICS OF KERBEROS
  • KERBEROS REALM AND AUTH FLOW
  • KERBEROS DELEGATION TYPES
  • RBCD ABUSE & FLOW
  • PRACTCAL DEMONSTRATION
  • HOW TO PROTECT YOURSELF
  • Q & A

AGENDA

2

3 of 18

ACTIVE DIRECTORY - REFRESHER

4

A directory is a hierarchical structure that stores information about objects on a network.

  • For Example, it stores information about user accounts, such as names, passwords, phone numbers, and so on...

Enables centralized and secure management of an entire network, which might span a building, a city or multiple locations throughout the world.

4 of 18

COMPONENTS OF AD

5

One of the MOST Important Thing we need to keep in mind is....

Components of AD ~

  • Schema: Defines object and their attributes.
  • Query and Indexing Mechanism: Provides searching and publication of objects and their properties.
  • Replication Service: Contains information about every object in Directory.
  • General Catalog: Distributes information across domain controllers.

5 of 18

ACTIVE DIRECTORY - STRUCTURE

Forests, domains, and Organizational Units (OUs) form the core hierarchical components of an Active Directory (AD) environment.

A forest - which is a security boundary - may contain multiple domains and each domain may contain multiple OUs.

Forest

If one Domain in AD is Compromised that means Theoretically means Entire AD is Compromised.

6 of 18

KERBEROS

Kerberos is a network authentication protocol developed by MIT in the 1980s (initially released in 1988). It is named after Cerberus, the three-headed dog from Greek mythology that guards the gates of the Underworld.

Microsofi has it's own implementation of the kerbe-ros protocol, called MS-KILE*, and is available since Windows 2000.

  • Kerberos is the default authentication pr-otocol in Active Directory domain environments.
  • Designed to replace NTLM, still widely used.
  • Works as SSO to access multiple domain resources without authenticating again.
  • Services must have a correctly registered SPN in Active Directory for Kerberos service authentication.

7 of 18

KERBEROS REALM

8 of 18

KERBEROS AUTHENTICATION - FLOW

9 of 18

KERBEROS DELEGATION

Allows a service to act on behalf of a user when connecting to other services

Like.... User Impersonation using Kerberos

Sample Scenario:

10 of 18

KERBEROS - TYPES OF DELEGATION

  1. Un-Constrained Delegation ~ "I Can impersonate users against any service."
  2. Constrained Delegation ~ "I can impersonate user against specific services." (Whitelist)
  3. Resource-Based Constrained Delegation ~ "Specific service can impersonate users against me."

11 of 18

HOW RBCD ABUSE ATTACK WORKS?

et service (Service B) to define which service accounts (Service A) can when accessing its resources.

tion: The user authenticates to Service A through Kerberos.

A requests a Kerberos service ticket on behalf of the authenticated

ce A uses the obtained ticket to request access to Service B on behalf If Service B trusts Service A for delegation, access is granted under

RBCD allows a targ impersonate users

1. Initial Authentica

2. S4U2Self: Service user.

3. S4U2Proxy: Servi of that user.

4. Resource Access:

the user's identity.

​

​

Abuse Scenario: An attacker who can modify the target computer's delegation permissions through misconfigured AD ACLs can establish unauthorized delegation

trust and impersonate privileged users to access the target resource.

KDC DECISION FLOW

12 of 18

ATTACKING RBCD | METHODOLOGY

  1. Assumed breach - Attacker starts with a low-privilege domain account
  2. Recon - Enumerate ACLs on computer objects for write rights
  3. Create controlled principal - Add machine account (abuses default quota)
  4. Configure delegation - Write RBCD attribute on target computer
  5. Request impersonation ticket - Abuse S4U2Self / S4U2Proxy
  6. Privileged access - Impersonate admin, pivot further (e.g. DCSync)

13

13 of 18

RBCD ABUSE|PRE-REQUISITES

  • Attacking RBCD is similar to regular constrained delegation. Below are the requirements for attackers:
    • The attacker must have control over the account configured for RBCD delegation.
    • The attacker must know the principal name of the account they want to impersonate.
  • RBCD is configured by setting msDS-AllowedToActOnBehalfOfOtherIdentity.
  • To exploit this type of delegation, an attacker must gain access to an account with write permissions on the targeted resource (computer object), such as GenericAll, GenericWrite, or WriteDACL. This access is necessary to modify the

Resource-Based Constrained Delegation (RBCD) settings on the targeted resource.

14 of 18

DEMONSTRATION

15

Disclaimer - This PoC is presented solely for educational and security awareness purposes. The information and techniques demonstrated must only be used in authorized environments with proper permission. Any unauthorized or malicious use is strictly prohibited.

15 of 18

RBCD ABUSE | DETECTION & AUDITING

16

  • Monitor for changes to msDS-AllowedToActOnBehalfOfOtherIdentity on computer and service accounts - this attribute should rarely change in a healthy environment.
  • Key Windows Event IDs to track:
    • Event ID 4662 - “An operation was performed on an object.” Enable auditing on AD objects to catch writes to the msDS-AllowedToActOnBehalfOfOtherIdentity attribute specifically (requires object-level SACL + “Write Property” auditing).
    • Event ID 5136 - “A directory service object was modified.” Logged on the domain controller when an attribute like RBCD delegation is changed.
    • Event ID 4741 - “A computer account was created.” Flags rogue machine account creation (e.g., via addcomputer.py), ofien the first step in an RBCD attack.
    • Event ID 4624 / 4648 - Logon events that can reveal unusual service ticket requests or explicit credential use tied to delegation abuse.
    • Event ID 4769 - “A Kerberos service ticket was requested.” Spikes or anomalies here can indicate S4U2Self/S4U2Proxy abuse.
    • Centralize logs in a SIEM and alert on any modification to delegation-related attributes, especially from non-admin accounts.

16 of 18

HARDENING STRATEGIES

  • Limit object permissions: Regularly audit and restrict GenericAll, GenericWrite, and WriteDACL rights on computer objects - only Domain/Enterprise Admins or designated service accounts should hold them.
  • Restrict machine account creation: Lower or set ms-DS-MachineAccountQuota to 0 to prevent low-privileged users from creating computer accounts.
  • Enable Protected Users group / sensitive account flags: Mark high-value accounts as “sensitive and cannot be delegated” to block delegation abuse against them.
  • Monitor and alert: Deploy SACLs on sensitive attributes (like msDS-AllowedToActOnBehalfOfOtherIdentity) and forward alerts for any unauthorized writes.
  • Principle of least privilege: Review and minimize standing write access to AD objects; use Just-In-Time (JIT) access or PAM solutions where possible.
  • Regular delegation audits: Periodically review all accounts with delegation configured (constrained, unconstrained, and resource-based) to catch unauthorized or forgotten entries

17

17 of 18

Q & A

18 of 18

THANK YOU!

LinkedIn Handle: https://www.linkedin.com/in/0xnexus/