You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/windows-hardening/active-directory-methodology/unconstrained-delegation.md
+57-10Lines changed: 57 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,51 @@ Find here other ways to **force an authentication:**
58
58
printers-spooler-service-abuse.md
59
59
{{#endref}}
60
60
61
+
Any other coercion primitive that makes the victim authenticate with **Kerberos** to your unconstrained-delegation host works too. In modern environments this often means swapping the classic PrinterBug flow for **PetitPotam**, **DFSCoerce**, **ShadowCoerce**, **MS-EVEN**, or **WebClient/WebDAV**-based coercion depending on which RPC surface is reachable.
62
+
63
+
### Abusing a user/service account with unconstrained delegation
64
+
65
+
Unconstrained delegation is **not limited to computer objects**. A **user/service account** can also be configured as `TRUSTED_FOR_DELEGATION`. In that scenario, the practical requirement is that the account must receive Kerberos service tickets for an **SPN it owns**.
66
+
67
+
This leads to 2 very common offensive paths:
68
+
69
+
1. You compromise the password/hash of the unconstrained-delegation **user account**, then **add an SPN** to that same account.
70
+
2. The account already has one or more SPNs, but one of them points to a **stale/decommissioned hostname**; recreating the missing **DNS A record** is enough to hijack the authentication flow without modifying the SPN set.
71
+
72
+
Minimal Linux flow:
73
+
74
+
```bash
75
+
# 1) Find unconstrained-delegation users and their SPNs
- This is especially useful when the unconstrained principal is a **service account** and you only have its credentials, not code execution on a joined host.
103
+
- If the target user already has a **stale SPN**, recreating the corresponding **DNS record** may be less noisy than writing a new SPN into AD.
104
+
- Recent Linux-centric tradecraft uses `addspn.py`, `dnstool.py`, `krbrelayx.py`, and one coercion primitive; you do not need to touch a Windows host to complete the chain.
105
+
61
106
### Abusing Unconstrained Delegation with an attacker-created computer
62
107
63
108
Modern domains often have `MachineAccountQuota > 0` (default 10), allowing any authenticated principal to create up to N computer objects. If you also hold the `SeEnableDelegationPrivilege` token privilege (or equivalent rights), you can set the newly created computer to be trusted for unconstrained delegation and harvest inbound TGTs from privileged systems.
Why this works: with unconstrained delegation, the LSA on a delegation-enabled computer caches inbound TGTs. If you trick a DC or privileged server to authenticate to your fake host, its machine TGT will be stored and can be exported.
92
137
93
-
4) Start krbrelayx in export mode and prepare the machine NT hash
138
+
4) Start krbrelayx in export mode and prepare the Kerberos material
94
139
95
140
```bash
96
-
# Compute NT hash (MD4 over UTF-16LE) of the machine account password
5) Coerce authentication from the DC/servers to your fake host
@@ -140,6 +183,8 @@ Notes and requirements:
140
183
- Setting `TRUSTED_FOR_DELEGATION` on a computer requires `SeEnableDelegationPrivilege` (or domain admin).
141
184
- Ensure name resolution to your fake host (DNS A record) so the DC can reach it by FQDN.
142
185
- Coercion requires a viable vector (PrinterBug/MS-RPRN, EFSRPC/PetitPotam, DFSCoerce, MS-EVEN, etc.). Disable these on DCs if possible.
186
+
- If the victim account is marked as **"Account is sensitive and cannot be delegated"** or is a member of **Protected Users**, the forwarded TGT will not be included in the service ticket, so this chain won't yield a reusable TGT.
187
+
- If **Credential Guard** is enabled on the authenticating client/server, Windows blocks **Kerberos unconstrained delegation**, which can make otherwise valid coercion paths fail from an operator perspective.
143
188
144
189
Detection and hardening ideas:
145
190
@@ -162,5 +207,7 @@ Detection and hardening ideas:
0 commit comments