Back to HTBHack The Box
Write-up

🎗️Support

LDAPReconWinRMExploitationRBCDAttack

HTB Support — Detailed Solution Notes Platform: Hack The Box | Machine: Support | OS: Windows (Active Directory) | Difficulty: Easy | Vulnerability Types: SMB Null Session, Hardcoded Credentials, LDAP Information Disclosure, & RBCD

🗺️ Attack Chain Summary

🧠 How Does a Hacker Think? — The Active Directory Ecosystem In Active Directory environments, the core vulnerabilities are often "Trust and Misconfiguration." Custom-built IT tools frequently hardcode credentials to speed up processes. LDAP directories act like massive phone books where careless administrators leave temporary passwords in plain sight. If a user has broad permissions like GenericAll over a Domain Controller, the very architecture of AD (such as RBCD) can be weaponized against itself.

1️⃣ Reconnaissance

Network Scanning The Nmap scan paints the profile of a typical Domain Controller:

Environment Setup For Kerberos and Impacket tools to function correctly via name resolution, the target IP must be mapped to the domain in the local hosts file: echo "10.129.242.122 support.htb dc.support.htb" | sudo tee -a /etc/hosts

2️⃣ Initial Foothold: The SMB & Reverse Engineering Maneuver

Vulnerability Analysis SMB (Port 445) is tested for shares that do not require authentication (Null Session). The command smbclient -N -L //10.129.242.122 reveals a non-public folder named support-tools.

The Maneuver: UTF-16 String Extraction The archive UserInfo.exe.zip is downloaded from the share. This is a custom .NET application written by the IT team to query LDAP. .NET applications store strings in UTF-16 format rather than standard ASCII.

3️⃣ User Access: The LDAP Leak & WinRM Maneuver

The LDAP Query With the service account (support\ldap), the domain database is queried. A hacker focuses on attributes like info or description where administrators often leave notes.

The Maneuver: WinRM Shell The support user's profile indicates membership in the Remote Management Users group. Executing evil-winrm -i 10.129.242.122 -u support -p 'Ironside47pleasure40Watchful' grants an authorized PowerShell session on port 5985.

4️⃣ Privilege Escalation: The RBCD Maneuver

Identifying the Weakness BloodHound data confirms that the support user holds absolute power (GenericAll) over DC.SUPPORT.HTB (the Domain Controller itself).

The "Trojan Horse" Strategy (Adding a Computer Account) Under default AD settings, the MachineAccountQuota is 10, meaning even a low-privileged user can add computers to the domain.

Delegation and Ticket Theft

🛠️ Core Maneuvers Breakdown

🔑 General Hacker Mindset Summary