Delegate

This is not a writeup, just my notes about the machine.

Operating System:

Chain: False

Credentials

Username
Password
Method
Scope

A.Briggs

P4ssw0rd1#123

Found in file

Domain User

N.Thompson

KALEB_2341

GenericWrite + Append fake SPN

Domain User

✅ Valid Usernames

🔑 Passwords list

Information Gathering

Nmap Scan

Service Enumeration

DNS

  • Not Vulnerable to DNS Zone Transfer

SMB (enum4linux-ng)

Domain SID: S-1-5-21-1484473093-3449528695-2030935120

  • Server allows null session authentication

  • Server allows guest session authentication

    • RID-Enumeration returned a list of valid usernames

    • IPC$, NETLOGON and SYSVOL possesses Write permissions

Finding a password in file SYSVOL

  • Not kerberoastable users

  • Not asreproastable users

Bloodhound enumeration

Exploitation

Abusing DACL to compromise user

Assigning fake SPN to make the user kerberoastable

Domain Compromise

Situational Awareness

Windows

Adding Computer to the domain controller

Enabling unconstrained delegation

UserAccountControl Values: useraccountcontrol-manipulate-account-propertiesarrow-up-right

Property flag
Value in decimal
Why?

WORKSTATION_TRUST_ACCOUNT

4096

Indicate is a machine account (mandatory)

TRUSTED_FOR_DELEGATION

524288

Enable Unconstrained Delegation

Total: 524288 + 4096 = 528384

Adding a malicious HTTP SPN

Note: make computer look like a real service by adding SPN HTTP/EVIL.delegate.vl

Checking the configuration applied

Adding a malicious DNS

Take time to replicate you can use nslookup evil.delegate.vl dc1.delegate.vl to sure is replicated into AD.

Running Krbrelayx to capture TGT

Use: pypykatz crypto nt 'Password123'

Coercing the authentication to malicious dns

Capturing the NT Hash via unconstrated delegation

Performing DCSync Attack against domain controller.

Linux

Creating a machine account

Adding the UserControlAccount attributes

Adding HTTP/CIFS SPN's to rogue computer

Checking the ServicePrincipalName

Running Krbrelayx to capture TGT

Coercing the authentication to malicious dns

Output from krbrelayx and printerbugshe;

Performing DCSync Attack

Last updated