Beg-o-Matic 3000
Description
Ever wish someone would just GIVE you the flag if you asked nicely?
Source: beg-o-matic.zip
Author: @tsuto
Solution
As the name suggest we have to beg for flags 🤣

From given source quick glance at middleware.js gives us attack vector idea: XSS
utils/bot.js is used to emulate the admin
/api/list endpoint returns the flag only if the post is approved by the bot, so if we manage to approve the post can leak the flag.

app/admin/[id]/page.js:
When bot views our submission React uses dangerouslySetInnerHTML to render our message, exposing bot to XSS attack as long as we can bypass the CSP.
This might not be so easy as it sounds...

Similar challenges (research~):
The solution was easier then expected, I was just overthinking about leaking the tokens with CSS, but you just needed header that bot head 💀. Dont overthink.
Solution by other players: USCG Beg-o-matic 3000 (CSRF) by FlagHoarders
@clovismint solution:

Last updated