Challenge
A drone control panel built in Node.js/Express. Admin features are restricted.
Approach
- The
/api/flight-profileendpoint uses_.merge()(or equivalent) to merge user-supplied JSON into a flight profile object without sanitization. - Pollute
Object.prototype.isAdmin:
| |
- Subsequent requests check
if (req.user.isAdmin)— sinceisAdminis now on the prototype, all objects inherit it. - Access the admin panel to retrieve the flag.
Flag
boroCTF{pr0totyp3_p0llut10n_dr0ne_d4sh}