Baby Web
Description
I just learnt how to design my favourite flask webpage using htmx and bootstrap. I hope I don't accidentally expose my super secret flag. Comment Suggest edit
Author: Junhua
http://challs.nusgreyhats.org:33338
https://storage.googleapis.com/greyctf-challs/dist-baby-web.zip
Code Analysis
The app is extremely straight forward flask application.
It signs a cookie with the app.secret_key, which is stored as plain text in the application
Exploit
Using flask-unsign, we are able to forge a token and login as admin to retrieve the flag.
After modifying the cookies, we are able to access the admin endpoint, however there is no flag.
Looking at the page source, we saw that there was a hidden endpoint at /flag
Visiting /flag
leaks the code.
Flag: grey{0h_n0_mY_5up3r_53cr3t_4dm1n_fl4g}
Last updated