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

Dog

8 Mar 2025 · 11 min read · root access
Dog - maquina de Hack The Box

Executive summary — Dog is an Easy Linux box built on a chain of failures that's extremely realistic and depressingly common in sloppy CMS deployments: an exposed .git repository on the web server lets you reconstruct the full source of a Backdrop CMS install (a Drupal 7 fork). Inside that source sit the CMS's database credentials, which turn out to be reused as the system user's SSH password. Once in, sudo -l reveals full permission on bee, Backdrop's official admin CLI, whose eval subcommand runs arbitrary PHP — and since it runs via sudo, that's instant root. Path: Web → exposed .git → credentials → SSH → bee eval → Root.

PlatformHack The Box
Operating systemLinux
DifficultyEasy
StatusRetired
Target IP10.129.231.223

Attack map

[80] Backdrop CMS  (fuzzing → /core /modules /themes /sites /files)
   │  exposed .git/ → git-dumper → repository dump
   ▼
[CREDS]  password in the CMS config  → reused
   ▼
[SSH]  johncusack   (user.txt)
   │  sudo -l → NOPASSWD /usr/local/bin/bee
   ▼
[BEE]  bee eval "system('/bin/bash')"  (as root)
   ▼
[ROOT]

1. Reconnaissance

We always start with a full port sweep, not just the top-1000: on web-focused "Easy" boxes the attack surface is often deliberately small, so confirming there are only two services already points the rest of the assessment toward HTTP.

nmap -sC -sV -p- 10.129.231.223
22/tcp  open  ssh     OpenSSH
80/tcp  open  http    Apache

Two open ports: SSH (likely the final destination of a foothold, not the entry point) and HTTP, which is where we focus.

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