Lab — netcat listener local
Lab — netcat listener local
Section titled “Lab — netcat listener local”Objetivo
Section titled “Objetivo”Levantar un listener TCP en 127.0.0.1, conectar desde otra terminal y comprobar eco/recepción.
Prerequisitos
Section titled “Prerequisitos”Entorno lab
Section titled “Entorno lab”Solo localhost. No abras el puerto a redes externas.
PORT=4444-
Terminal A — listener:
Terminal window nc -lvnp "$PORT" -s 127.0.0.1Si tu
ncno acepta-s, usa:nc -lvnp "$PORT"y conecta solo a127.0.0.1. -
Terminal B — cliente:
Terminal window echo "lab-ok" | nc 127.0.0.1 "$PORT" -
En A debe aparecer
lab-ok. Cierra con Ctrl+C.
Verificación
Section titled “Verificación”El texto lab-ok se ve en el listener. Si falla: puerto ocupado (ss -ltnp | grep 4444) o sintaxis distinta de tu
implementación (nc -h).
Referencias
Section titled “Referencias”Advertencia
Section titled “Advertencia”No uses reverse shells hacia hosts ajenos. Listener solo en lab propio / localhost.