Skip to content

--find-delegation does not report Constrained and Unconstrained delegation types for the same account #1512

Closed

Description

@SoftAndoWetto

Describe the bug
In the case whre a user has both UF_TRUSTED_FOR_DELEGATION and msDS-AllowedToDelegateTo, the result using "--find-delegation" only shows up ad Constrained delegation since "delegation" gets overwritten

                # Filter out DCs, unconstrained delegation to DCs is not a useful information
                if userAccountControl & UF_TRUSTED_FOR_DELEGATION and not userAccountControl & UF_SERVER_TRUST_ACCOUNT:
                    delegation = "Unconstrained"
                    rightsTo.append("N/A")
                elif userAccountControl & UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION:
                    delegation = "Constrained w/ Protocol Transition"
                    protocolTransition = 1

                if item.get("msDS-AllowedToDelegateTo") is not None:
                    if protocolTransition == 0:
                        delegation = "Constrained"
                    rightsTo = item.get("msDS-AllowedToDelegateTo")

To Reproduce
Command: nxc ldap 10.10.10.10 -u frankhorrigan -p 'TimeToDie123!' --find-delegation
Resulted in:

> nxc ldap 10.10.10.10 -u frankhorrigan -p 'TimeToDie123!' --find-delegation

LDAP        10.10.10.10     389    ENCLAVE-DC       [*] Windows 10 / Server 2019 Build 17763 (name:ENCLAVE-DC) (domain:enclave.local) (signing:None) (channel binding:Never) 
LDAP        10.10.10.10     389    ENCLAVE-DC       [+] enclave.local\frankhorrigan:TimeToDie123! 
LDAP        10.10.10.10     389    ENCLAVE-DC       AccountName AccountType DelegationType             DelegationRightsTo                                              
LDAP        10.10.10.10     389    ENCLAVE-DC       ----------- ----------- -------------------------- ----------------------------------------------------------------
LDAP        10.10.10.10     389    ENCLAVE-DC       judahkreger Person      Constrained                HOST/daisy-svc.enclave.local, CIFS/daisy-svc.enclave.local      
LDAP        10.10.10.10     389    ENCLAVE-DC       judahkreger Person      Resource-Based Constrained orionmoreno 

Expected behavior
The user should be reported with both Constrained and Unconstrained delegation

Screenshots
Image

NetExec info

  • OS: Kali
  • Version of nxc: 1.5.1 - Yippie-Ki-Yay - 0a8b9dd - 1204
  • Installed from: pipx

Activity

  1. SoftAndoWetto commented on Nov 8, 2026

    @SoftAndoWetto
    ContributorAuthor
                    if item.get("msDS-AllowedToDelegateTo") is not None:
                        # Already flagged Unconstrained, record it before delegation/rightsTo get overwritten
                        if delegation == "Unconstrained":
                            answers.append([sAMAccountName, objectType, delegation, rightsTo])

    This worked for me btw

    Image Let me know if anyone has any problems if not I'll put it in a PR
  2. termanix commented on Nov 8, 2026

    @termanix
    Contributor

    if item.get("msDS-AllowedToDelegateTo") is not None:
    # Already flagged Unconstrained, record it before delegation/rightsTo get overwritten
    if delegation == "Unconstrained":
    answers.append([sAMAccountName, objectType, delegation, rightsTo])
    This worked for me btw

    Image Let me know if anyone has any problems if not I'll put it in a PR

    Ofc, Every PR's welcome. We can discus it on PR.

  3. NeffIsBack commented on Nov 15, 2026

    @NeffIsBack
    Member

    The user should be reported with both Constrained and Unconstrained delegation

    I am trying to review #1513, but I don't see how you would be able to configure both unconstrained and constrained delegation at once? That does not make sense to me. Is this even configurable? If so how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions