UpDown
Executive summary — UpDown doesn't fall to a single vulnerability, but to the combination of four controls that, individually, almost work: an extension blacklist on file upload, an LFI that forces a
.phpsuffix, a deletion of the uploaded file at the end of the request, and adisable_functionslist that blocks the wholesystem/execfamily. An exposed.gitrepository hands over the source code and a secret header that unlocks the dev vhost; the phar:// wrapper defeats both the extension blacklist and theinclude()restriction at once; and the site-checker loop itself turns the file deletion into a ~270-second window the attacker controls through the content of their own payload.disable_functionsforgetsproc_open, giving RCE aswww-data. From there, a SUID binary that calls Python 2 — whereinput()iseval()— escalates todeveloper, and asudo NOPASSWDovereasy_install(which by design runs thesetup.pyof any package) closes the chain as root.
| Platform | Hack The Box |
| Operating system | Linux (Ubuntu 20.04 focal) |
| Difficulty | Medium |
| Status | Retired |
| Target IP | <TARGET_IP> |
Attack map
[1] /dev/.git exposed ──────────────► source code + "Special-Dev: only4dev" header
│
[2] vhost dev.siteisup.htb (403) ◄────────────┘ access granted with the header
│
[3] upload (extension blacklist) + LFI (forced .php suffix)
│ │
└── phar:// resolves BOTH at once ────┤
│
[4] @unlink after a 30 s/line curl loop ──► ~270 s window controlled by the attacker
│
[5] disable_functions missing proc_open ──────► RCE as www-data
│
[6] SUID siteisup -> /usr/bin/python 2.7 -> input() == eval() ──► developer ✦ user.txt
│
[7] sudo NOPASSWD easy_install -> setup.py as root ─────────────► root ✦ root.txt
1. Reconnaissance
sudo nmap -p- --min-rate 3000 -T4 -Pn -oN nmap-allports.txt <TARGET_IP>
sudo nmap -p22,80 -sCV -Pn -oN nmap-services.txt <TARGET_IP>
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
80/tcp open http Apache httpd 2.4.41 ((Ubuntu))
|_http-title: Is my Website up ?
Minimal surface: SSH and HTTP. The OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 banner pins the distro to Ubuntu 20.04 focal without any further testing, which already rules out the kernel privesc vectors typical of older boxes.
The web app is a website availability checker: a site field and a Debug mode checkbox. The footer leaks the real domain, siteisup.htb:
echo "<TARGET_IP> siteisup.htb" | sudo tee -a /etc/hosts
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.