- Machine
- Academy
- OS
- Linux
- Difficulty
- Easy
- Steps
- 6
- Added
- 23 Mar 2023
A roleid tamper opens an admin panel; a leaked Laravel key gives RCE, then credential reuse and a sudo composer rule lead to root.
How it went
- 0nmap
An nmap scan points to a web app that redirects to academy.htb.
- 1roleid parameter
Registering a user and tampering with the roleid parameter unlocks the admin panel.
- 2Laravel RCE
A dev-staging-01 subdomain leaks the Laravel APP_KEY, enabling a deserialization RCE as www-data.
- 3cry0l1t3
Credentials recovered from the config and .env log us in over SSH as cry0l1t3 for the user flag.
- 4/var/log
cry0l1t3's adm group grants read access to /var/log, where mrb3n's password turns up in command history.
- 5mrb3n
su to mrb3n, who holds a sudo rule on composer.
- 6composer
composer's sudo entry spawns a root shell.