~/write-ups/writeup-b607d93542

Host & Network Penetration Testing: The Metasploit Framework CTF 2

Imported from Notion: Host & Network Penetration Testing: The Metasploit Framework CTF 2

target:: Notion MEDIUM date:: 2026.07.26 notion

Aqui tenemos dos targets en la misma red, target1.ine.local y target2.ine.local

Empezamos con el primer target, haciendo un escaneo:

service postgresql start && msfconsole
db_nmap -sV -O target​1.ine.​local
Notion image
Notion image

Inspeccionamos el banner con:

rsync rsync:​//targ​et1.in​e.loca​l
Notion image
Notion image

Que nos devuelve la primera flag: FLAG1_9c22cc05a6be4d6bacf41e4c82dec24e

Usamos este comando para inspeccionar que hay en backupwscohen

rsync -av rsync:​//targ​et1.in​e.loca​l/back​upwsco​hen/ .
Notion image
Notion image

Esto nos descarga todos los archivos (office_staff.vhd, pii_data.xlsx y TPSData.txt) Analizamos cada contenido y vemos en pii_data.xlsx la segunda flag!

Notion image
Notion image

Aqui hemos terminado con la maquina víctima 1 ya que las siguientes pistas son de la segunda.

Procedemos como en la maquina 1 a escanearla:

db_nmap -sV -O target​2.ine.​local
Notion image
Notion image

Como podemos ver el puerto 80 esta abierto, investiguemos en firefox que vemos:

Notion image
Notion image

Buscamos en metasploit roxy-wi :

search roxy-wi
Notion image
Notion image

Y usamos el módulo exploit/linux/http/roxy_wi_exec

Configuramos todo lo necesario en:

show options
Notion image
Notion image

y explotamos:

exploit
Notion image
Notion image

Vamos a la raíz del sistema y vemos la tercera flag:

Notion image
Notion image

FLAG3_197fa63e7401457f82d86ed79333853f

Para la cuarta nos dan de pista:_ Automated tasks can sometimes leave clues. Investigate scheduled jobs or running processes to uncover the hidden flag._

A si que vamos a investigar los cron del sistema, como crontab no funciona toca hacerlo manual buscando en los archivos cron:

ls /etc/cron*
Notion image
Notion image

Analicemos cron.d :

Notion image
Notion image
Notion image
Notion image

Y ahí tenemos la 4ª flag en www-data-cron

FLAG4_9e25df036fc44382a413cf1115d485fb

- EOF -

<< back_to_index