root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat cronos.md
// writeups

Cronos

22 Mar 2017 · 15 min read · root access
Cronos - maquina de Hack The Box

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 as www-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 by www-data. Overwriting it gives a root shell in under 60 seconds.

PlatformHack The Box
Operating systemLinux
DifficultyMedium
StatusRetired
Target IP10.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.)

🔒 Clearance required

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.