Manager
Executive summary — Manager is a Medium Active Directory box where the final escalation vector relies on Active Directory Certificate Services (AD CS). With RID brute and trivial password spraying (username=password) we get
operator, which authenticates to MSSQL; withoutxp_cmdshell,xp_dirtreelists the filesystem and locates a website backup leaking credentials forraven(user flag).ravendiscovers a misconfiguredSubCAtemplate (ENROLLEE_SUPPLIES_SUBJECT): after becoming a CA officer, enabling the template, requesting and manually approving a certificate asAdministrator, it authenticates via PKINIT and retrieves their NTLM hash for Pass-the-Hash.
| Platform | Hack The Box |
| Operating system | Windows |
| Domain | manager.htb |
| Difficulty | Medium |
| Status | Retired |
| CA | manager-DC01-CA |
| Target IP | 10.129.5.242 |
Attack map
[1] RID brute -> users -> password spraying (operator:operator)
|
[2] MSSQL as operator -- no xp_cmdshell, but xp_dirtree lists the filesystem ->
a website backup reachable over HTTP
|
[3] Backup leaks raven's credentials -> user.txt
|
[4] adPEAS/Certipy -- SubCA template with ENROLLEE_SUPPLIES_SUBJECT
raven adds itself as a CA officer + enables SubCA
|
[5] Request a cert impersonating administrator@manager.htb -- CERTSRV_E_TEMPLATE_DENIED
but the request IS created (Request ID) -> approve it manually as officer
|
[6] Retrieve administrator.pfx -> PKINIT (Certipy auth) -> Administrator's NTLM hash
(clock skew fixed with ntpdate)
|
[7] Pass-the-Hash (psexec.py) -> nt authority\system -> root.txt
1. Reconnaissance
echo "10.129.5.242 manager.htb dc01.manager.htb ca.manager.htb" | sudo tee -a /etc/hosts
nmap -Pn -sC -sV 10.129.5.242 # DNS, Kerberos, LDAP, SMB, MSSQL(1433), HTTP, WinRM
These three hostnames (
manager.htb,dc01.manager.htb,ca.manager.htb) aren't added on a whim: later on, Certipy needs to resolve the DC and CA names to talk to the certificate's RPC/DCOM services. Without this entry in/etc/hosts,certipycommands fail with opaque errors likeFailed to resolveorFailed to get dynamic TCP endpoint for CertSvc, hard to tie back to DNS if you don't already know it.
Resumen ejecutivo — Manager es un Medium de Active Directory donde el vector de escalada final se basa en Active Directory Certificate Services (AD CS). Con RID brute y un password spraying trivial (usuario=contraseña) conseguimos
operator, que autentica en MSSQL; sinxp_cmdshell,xp_dirtreepermite listar el filesystem y localizar un backup web filtrando credenciales deraven(user flag).ravendescubre una plantillaSubCAmal configurada (ENROLLEE_SUPPLIES_SUBJECT): tras convertirse en officer de la CA, habilitar la plantilla, solicitar y aprobar manualmente un certificado a nombre deAdministrator, se autentica con él vía PKINIT y recupera su hash NTLM para Pass-the-Hash.
| Plataforma | Hack The Box |
| Sistema operativo | Windows |
| Dominio | manager.htb |
| Dificultad | Medium |
| Estado | Retired |
| CA | manager-DC01-CA |
| IP objetivo | 10.129.5.242 |
Mapa del ataque
[1] RID brute -> usuarios -> password spraying (operator:operator)
|
[2] MSSQL como operator -> sin xp_cmdshell, pero xp_dirtree lista el filesystem ->
backup del sitio web accesible por HTTP
|
[3] Backup filtra credenciales de raven -> user.txt
|
[4] adPEAS/Certipy -- plantilla SubCA con ENROLLEE_SUPPLIES_SUBJECT
raven se anade como officer de la CA + habilita SubCA
|
[5] Solicitar cert suplantando a administrator@manager.htb -- CERTSRV_E_TEMPLATE_DENIED
pero la peticion SI se crea (Request ID) -> aprobarla manualmente como officer
|
[6] Recuperar administrator.pfx -> PKINIT (Certipy auth) -> hash NTLM de Administrator
(desfase de reloj corregido con ntpdate)
|
[7] Pass-the-Hash (psexec.py) -> nt authority\system -> root.txt
1. Reconocimiento
echo "10.129.5.242 manager.htb dc01.manager.htb ca.manager.htb" | sudo tee -a /etc/hosts
nmap -Pn -sC -sV 10.129.5.242 # DNS, Kerberos, LDAP, SMB, MSSQL(1433), HTTP, WinRM
Los tres nombres (
manager.htb,dc01.manager.htb,ca.manager.htb) no se añaden por capricho: más adelante Certipy necesita resolver el nombre del DC y de la CA para hablar con los servicios RPC/DCOM del certificado. Sin esta entrada en/etc/hosts, los comandos decertipyfallan con errores opacos comoFailed to resolveoFailed to get dynamic TCP endpoint for CertSvc, difíciles de relacionar con DNS si no se conoce de antemano.
This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.
See Root Access plansNo account? Create one free then upgrade from your console.
Este contenido es solo para Root Access. Todo lo demás del sitio — el nivel gratuito, toda la biblioteca pública — sigue abierto.
Ver planes de Root Access¿Sin cuenta? Crea una gratis y luego mejora desde tu consola.