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

Data

1 Jul 2025 · 9 min read · root access
Data - maquina de Hack The Box

Executive summary — Data is an Easy Linux box that mirrors a very realistic scenario: a Grafana v8.0.0 panel exposed on port 3000 is vulnerable to CVE-2021-43798, an unauthenticated path traversal / LFI. With it we exfiltrate Grafana's SQLite database (grafana.db), crack boris's PBKDF2-HMAC-SHA256 hash and SSH in. Once inside, sudo -l reveals a NOPASSWD entry on docker exec: dropping into a running container as root with --privileged lets us mount the host disk and fully escape the container. Path: Grafana LFI -> grafana.db -> boris -> sudo docker exec --privileged -> mount the host -> root.

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.234.47

Attack map

[3000] Grafana v8.0.0 -> CVE-2021-43798 (path traversal / LFI)
   |  read /var/lib/grafana/grafana.db (SQLite)
   v
[HASH] boris (PBKDF2-HMAC-SHA256) -> cracked -> beautiful1
   |
   v
[SSH]  boris : beautiful1  (user.txt)
   |  sudo -l -> NOPASSWD: /snap/bin/docker exec *
   v
[DOCKER] exec -it --privileged --user root <container> bash
   |  inside, privileged: mount /dev/sda1 /mnt
   v
[ROOT] host disk mounted at /mnt (root.txt + sudoers)

1. Reconnaissance

Before touching anything: a full port sweep, then a version/script scan against whatever is open, so we don't miss a service sitting on a high port.

nmap -p- --min-rate 10000 10.129.234.47 -oN scan.txt
nmap -p22,3000 -sCV 10.129.234.47 -oN scan_services.txt
PortServiceDetail
22SSHOpenSSH 7.6
3000HTTPGrafana

Two useful clues from the first scan already: the response's TTL differs from what a plain Linux host usually shows, which often gives away that the service is running inside a container; and port 3000 (instead of the usual 80/443) signals the web app as the main vector, while SSH is left for later, once we have credentials.

🔒 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.