- Machine
- Gavel
- OS
- Linux
- Difficulty
- Medium
- Steps
- 4
- Added
- 29 Nov 2025
An exposed .git reveals a rule engine that runs auction rules as PHP; a brute-forced auctioneer plants a webshell, and a root daemon's leaky PHP sandbox gives root.
How it went
- 0nmap
nmap shows SSH and an Apache-hosted PHP auction app, Gavel 2.0.
- 1exposed .git
An exposed .git dumps the source; the bid handler runs each auction's rule column as PHP via runkit_function_add.
- 2rule RCE
Brute-forcing the auctioneer login lets admin.php plant a webshell rule that fires when a user bids, giving www-data.
- 3auctioneer
The auctioneer system account reuses the web password; su to it gives the user flag and gavel-seller group membership.
- 4sandbox escape
The root gaveld socket runs a PHP sandbox that still allows file_put_contents; overwriting its php.ini and reloading it via RULE_PATH reads root's files.