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

Conversor

25 Oct 2025 · 13 min read · root access
Conversor HTB machine
Executive summary — Conversor is a Linux machine that chains an XSLT-based arbitrary file write with a misconfigured cron job and a needrestart escalation. The Flask web app converts XML+XSLT pairs with lxml: it blocks XXE but not the EXSLT extensions, which lets us drop a .py into a folder that a cron runs as www-data every minute (RCE). From there we dump the database, crack MD5 hashes and log in over SSH as fismathack; the final blow is CVE-2024-48990 in needrestart. A Web → RCE (cron) → SSH → Root path.
PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.238.31

Attack map

[80/HTTP]  Flask app "Conversor" (Apache 2.4.52 / vhost conversor.htb)
   │  XSLT + EXSLT shell:document → arbitrary file write (CVE-2023-46214 / CVE-2025-6985)
   ▼
[CRON]  .py dropped in /var/www/conversor.htb/scripts/ run as www-data every minute
   │  reverse shell → www-data
   ▼
[DB]  sqlite instance/users.db → unsalted MD5 hashes
   │  hashcat -m 0 + rockyou → Keepmesafeandwarm
   ▼
[SSH]  fismathack@conversor.htb   (user.txt)
   │  sudo -l → NOPASSWD: /usr/sbin/needrestart (v3.7)
   ▼
[ROOT]  needrestart PYTHONPATH injection (CVE-2024-48990) → SUID /bin/bash

1. Reconnaissance

We start by mapping the attack surface with a full-port scan and version detection:

nmap -p- --min-rate 3000 -T4 -Pn 10.129.238.31

Why these flags:

  • -p- → scans all 65535 TCP ports, not just the top 1000.
  • --min-rate 3000 → forces at least 3000 packets/s to speed up the sweep.
  • -T4 → aggressive timing template.
  • -Pn → assume the host is up, no ping (HTB blocks ICMP).

Result:

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu
80/tcp open  http    Apache httpd 2.4.52

Only two ports. The web server redirects to the virtual host conversor.htb. Instead of editing /etc/hosts, we resolve the vhost on the fly with curl's --resolve option:

curl -s --resolve conversor.htb:80:10.129.238.31 http://conversor.htb/
Why --resolve: it maps conversor.htb to the target IP for this request only, without touching any system files. Clean and leaves no trace in the environment.
🔒 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.