Skip to main content

Unconstrained Delegation Hiding on Service Accounts

Critical severityActive Directory About 20 minutes to fixGenerated 28 Jul 2026

Overview

A service account flagged TRUSTED_FOR_DELEGATION forwards a full copy of any caller's TGT into the hosting process's memory, not just an impersonation token. On Active Directory, when a privileged account authenticates to a scheduled task, IIS pool, or SQL service running under that identity, the ticket sits extractable in LSASS on every host the credential touches, and standard delegation reviews rarely check user accounts at all.

At a glance

Symptom
A Tier-0 or admin account authenticates to any service or task running under that account, caching a full forwardable TGT in LSASS.
Likely cause
Service account holds TRUSTED_FOR_DELEGATION (unconstrained Kerberos delegation) rather than constrained, resource-based delegation.
Impact
The extracted TGT lets an attacker impersonate the admin against every service in the domain, from any host running the delegating service.
Verification signal
Re-run the detection test and a controlled negative-path test.
Safe correction
Replace unconstrained delegation with resource-based constrained delegation on a gMSA and place Tier-0 accounts in Protected Users to block all delegation.
Rollback or recovery
Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.

The Trap

Unconstrained Kerberos delegation set directly on a service account rather than a computer object — the userAccountControl bit TRUSTED_FOR_DELEGATION (0x80000) applied to an account such as svc-sqlprod or svc-iisapp.

The Default State

Admins provisioning a legacy application that needs to hop credentials to a backend database or file share open the account’s Delegation tab in ADUC and select “Trust this user for delegation to any service (Kerberos only)” because it is the option that just works, rather than configuring msDS-AllowedToDelegateTo for constrained delegation. The account keeps a static password, an SPN registered against it, and runs an IIS application pool or a Windows service across several member servers. No one revisits the setting once the application ships, and delegation reviews during audits typically enumerate computer objects for unconstrained delegation, skipping user accounts entirely.

The Blast Radius

Any Kerberos ticket a caller presents to a process running under that account arrives with a full, forwardable TGT copy, cached in LSASS on whichever host the service is running. If a Tier-0 admin, backup operator, or help-desk account with elevated rights ever authenticates through that service — browsing the IIS site, connecting to the SQL instance, or triggering the scheduled task — their TGT sits extractable via sekurlsa::tickets on that box. Because the flag lives on the account, not the host, every server that runs the service inherits the same harvesting surface: a cluster of four IIS nodes means four separate places an attacker can lift the same admin’s ticket. The stolen TGT then impersonates that admin against any service in the domain, not just the delegating application, for the remaining lifetime of the ticket. Coercion (PrinterBug or PetitPotam) can also force a domain controller to authenticate to the flagged service, exposing the DC’s TGT for DCSync.

The Lead Mechanic Fix

Audit first: Get-ADObject -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=524288)' -Properties sAMAccountName,ServicePrincipalName. Domain controllers carry this flag by design, so leave them out; migrate every other hit to resource-based constrained delegation bound to a group-managed service account so credentials never sit extractable: Install-ADServiceAccount plus Set-ADComputer -PrincipalsAllowedToDelegateToAccount on the target resource (Set-ADUser or Set-ADServiceAccount when it runs under a service account), then, once the new delegation is tested, clear the flag with Set-ADAccountControl -TrustedForDelegation $false (clearing it first breaks the application at once). Disable the Print Spooler where nothing prints, apply EFSRPC mitigations, and alert on privileged logons (event 4672) on hosts running the service. Place every Tier-0 and admin account in Protected Users, or set “Account is sensitive and cannot be delegated,” so no delegation type — constrained or not — can forward their ticket.

Read-only check

Check your environment (read-only)

List accounts trusted for unconstrained delegation (excluding domain controllers)

Based on vendor documentation; not run by KBY in a test tenant

What it shows: User and computer accounts whose userAccountControl has the TRUSTED_FOR_DELEGATION flag set, leaving out domain controller accounts.

PowerShell
# TRUSTED_FOR_DELEGATION = 0x80000 (524288); SERVER_TRUST_ACCOUNT (domain controllers) = 0x2000 (8192).
# 1.2.840.113556.1.4.803 is the LDAP bitwise-AND matching rule. Read-only LDAP query.
Get-ADObject -LDAPFilter '(&(userAccountControl:1.2.840.113556.1.4.803:=524288)(!(userAccountControl:1.2.840.113556.1.4.803:=8192)))' -Properties userAccountControl |
  Select-Object Name, ObjectClass, DistinguishedName

How to read the result

  • Each result is an account trusted for Kerberos delegation. Microsoft's description of the flag: any service running under that account can impersonate a client requesting the service.
  • Domain controllers are filtered out by the SERVER_TRUST_ACCOUNT bit. Every other result is worth a named owner and a reason; service accounts (ObjectClass user) are the case this trap describes.
  • No results means no non-DC account in the searched domain has the flag.

You need

  • Active Directory module for Windows PowerShell.
  • An account that can read userAccountControl on objects in the domain.

Vendor documentation used

The check only reads configuration. Plan any change it points to through your normal change process.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Fix commands and configuration

Get-ADObject -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=524288)' -Properties sAMAccountName,ServicePrincipalName
Install-ADServiceAccount
Set-ADComputer -PrincipalsAllowedToDelegateToAccount
4

Verify, roll back or escalate

Verify

Re-run the detection test and a controlled negative-path test. Confirm the unsafe behaviour is blocked while approved traffic still succeeds.

Rollback

Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Last updated

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

Unconstrained Delegation Hiding on Service Accounts