HTB - Craft
TL;DR - A brewery site points at a Gogs instance and a REST API. A public commit on Gogs leaks dinesh’s creds, and digging through the API code I find an eval() on the abv parameter of the /brew endpoint. I abuse it with a little python script for a reverse shell, landing inside a Docker container. The DB config there leaks MySQL creds, the user table hands me gilfoyle, and his repo has an id_rsa that logs me into the actual host over SSH (user.txt). For root, gilfoyle manages HashiCorp Vault, and there’s an SSH OTP role called root_otp, so I just ask Vault for a one-time password and SSH straight in as root. ...