- Machine
- Encoding
- OS
- Linux
- Difficulty
- Medium
- Steps
- 5
- Added
- 15 Apr 2023
An API file:// read dumps the git repo and exposes an LFI for a shell; git filters and a systemd service give root.
How it went
- 0nmap
An nmap scan shows the haxtables conversion web app.
- 1file:// read
The API's file_url parameter accepts file://, turning it into a local file read.
- 2git dump
That read dumps the site's .git repo, exposing an action_handler.php endpoint and an image subdomain.
- 3filter chain
The handler's include, driven through a PHP filter chain, executes code as www-data for the user flag.
- 4svc
A git-commit helper runnable as svc is abused via git attribute filters to get a shell as svc.
- 5systemd service
svc can manage systemd; a oneshot service runs a reverse shell as root.