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 | <TARGET_IP> |
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 <TARGET_IP>
-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.)
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.