Cronos
Executive summary — Cronos is a Medium Linux box whose compromise chain starts where almost nobody looks: the open DNS port (53). A misconfigured AXFR (zone transfer) leaks the entire subdomain structure with no brute forcing required, including an admin panel at
admin.cronos.htb. Its login falls to a textbook SQL injection. Inside, a network utility called Net Tool v0.1 (traceroute/ping) concatenates user input straight into a shell command with no validation: command injection → RCE aswww-data(user flag). The final escalation doesn't need a kernel exploit or a SUID binary: a root cron job runs a Laravel PHP script (artisan) every minute that, due to a deployment oversight, is owned bywww-data. Overwriting it gives a root shell in under 60 seconds.
| Platform | Hack The Box |
| Operating system | Linux |
| Difficulty | Medium |
| Status | Retired |
| Target IP | 10.129.16.88 |
Attack map
[1] Recon -- 22 ssh, 53 dns (UNCOMMON, worth checking), 80 http
|
[2] dig axfr cronos.htb -- misconfigured zone transfer ->
subdomains with no brute force needed: admin.cronos.htb, ns1.cronos.htb
|
[3] admin.cronos.htb/login -- SQLi login bypass: ' or '1'='1 -> panel access
|
[4] "Net Tool v0.1" panel (traceroute/ping) -- unsanitised input passed to the shell
+-> command injection: host=8.8.8.8; whoami -> RCE as www-data
|
[5] Reverse shell + stabilisation (pty.spawn) -> user.txt
|
[6] crontab -- * * * * * root php /var/www/laravel/artisan schedule:run
artisan is owned by www-data but root runs it every minute
+-> overwrite artisan with <?php system(reverse shell) ?> -> wait 1 min -> root.txt
1. Initial enumeration
As with any box, we start with a port scan combining service detection and NSE's default scripts:
nmap -sC -sV -Pn 10.129.16.88
-sC runs the default script set (looking for common misconfigurations and banners); -sV attempts to fingerprint the exact version of each service; -Pn skips ICMP host discovery — plenty of HTB hosts block ping, and an nmap run without -Pn would report "host down" on a perfectly reachable box.
22/tcp open ssh
53/tcp open domain
80/tcp open http
SSH (22) offers nothing without credentials yet, and HTTP (80) is the usual candidate for web vulnerabilities, but what really stands out is DNS (53) being open: it's not that common to find an exposed name server on a lab box, and when it shows up it's often the entry point — worth checking before anything else.
(Externally verifiable detail, not captured in this session: the service is ISC BIND 9.10.3-P4 on Ubuntu 16.04 "Xenial", with Apache httpd 2.4.18 and OpenSSH 7.2p2 — consistent with a box from that HTB generation.)
Resumen ejecutivo — Cronos es una Medium de Linux cuya cadena de compromiso empieza donde casi nadie mira: el puerto DNS (53) abierto. Un AXFR (zone transfer) mal restringido filtra la estructura completa de subdominios sin necesidad de fuerza bruta, incluido un panel administrativo en
admin.cronos.htb. Su login cae ante una SQL injection de manual. Dentro, una utilidad de red llamada Net Tool v0.1 (traceroute/ping) concatena el input del usuario directamente en un comando de shell sin validarlo: command injection → RCE comowww-data(user flag). La escalada final no depende de un exploit de kernel ni de binarios SUID: un cron de root ejecuta cada minuto un script PHP de Laravel (artisan) que, por descuido de despliegue, pertenece awww-data. Sobrescribirlo da una shell de root en menos de 60 segundos.
| Plataforma | Hack The Box |
| Sistema operativo | Linux |
| Dificultad | Medium |
| Estado | Retired |
| IP objetivo | 10.129.16.88 |
Mapa del ataque
[1] Recon -- 22 ssh, 53 dns (POCO COMUN, revisar), 80 http
|
[2] dig axfr cronos.htb -- zone transfer mal configurado ->
subdominios sin fuerza bruta: admin.cronos.htb, ns1.cronos.htb
|
[3] admin.cronos.htb/login -- SQLi de bypass: ' or '1'='1 -> acceso al panel
|
[4] Panel "Net Tool v0.1" (traceroute/ping) -- input sin sanear pasado al shell
+-> command injection: host=8.8.8.8; whoami -> RCE como www-data
|
[5] Reverse shell + estabilizacion (pty.spawn) -> user.txt
|
[6] crontab -- * * * * * root php /var/www/laravel/artisan schedule:run
artisan es propiedad de www-data pero lo ejecuta root cada minuto
+-> sobrescribir artisan con <?php system(reverse shell) ?> -> espera 1 min -> root.txt
1. Enumeración inicial
Como en cualquier caja, empezamos con un escaneo de puertos con detección de servicios y scripts básicos de NSE:
nmap -sC -sV -Pn 10.129.16.88
-sC lanza el conjunto de scripts por defecto (busca configuraciones comunes y banners); -sV intenta identificar versión exacta de cada servicio; -Pn se salta el descubrimiento por ICMP — en HTB muchos hosts bloquean ping y un nmap sin -Pn daría "host down" con la máquina perfectamente viva.
22/tcp open ssh
53/tcp open domain
80/tcp open http
SSH (22) no aporta nada sin credenciales todavía, y HTTP (80) es el candidato habitual a vulnerabilidades web, pero lo que realmente llama la atención es DNS (53) abierto: no es tan común encontrar un servidor de nombres expuesto en una máquina de laboratorio, y cuando aparece suele ser la puerta de entrada — vale la pena mirarlo antes que nada.
(Dato verificable externamente, no capturado en esta sesión: el servicio corresponde a ISC BIND 9.10.3-P4 sobre Ubuntu 16.04 "Xenial", con Apache httpd 2.4.18 y OpenSSH 7.2p2 — coherente con una máquina de esa generación de HTB.)
This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.
See Root Access plansNo account? Create one free then upgrade from your console.
Este contenido es solo para Root Access. Todo lo demás del sitio — el nivel gratuito, toda la biblioteca pública — sigue abierto.
Ver planes de Root Access¿Sin cuenta? Crea una gratis y luego mejora desde tu consola.