BuckeyeCTF 2024 | Homecooked & Quotes (Web)
Difficulty : Medium

Quotes :
This task consists of an express js app.
App.js :
Quotes :
Out objective here is to try to get the 7th quote, but since it is restricted for us we need some way to bypass at least one of the two conditions. Hacking the JWT is impossible so we need to find a way to bypass the subscriber limit.
Our ID is converted into a number and then parsed into int, since Javascript is a mess of a programming language we can exploit the loose typing.
you can see on the console test that the function Number will take a small string number 0.(n*0)N as N*exp(-n), this can be exploited as when it is parsed it only takes N rather than 0. the n amount of zeros after the "." needs to be more than 7 for this to work.
Homecooked :
This is a somewhat hard task to understand, you can download the code from here.
This challenge consists of a sandbox that runs a variation of python that uses emojis for certain parts.
Since we need to run a function we would need to read the gammar.
Skipping the useless parts we can see that to run code we need to put it between π₯’π₯’ and functions need to be run with π¦π¦, accessing attributes will be done with π₯ and for arrays with ππ.
these are the only python functions that can be passed to our sandbox.
so now we start making our payload.

Most of Builtins in here are hidden or removed, thankfully we can use FileLoader.

With it we can now access all of pythons functions and then we perform a read on the flag file.

our payload was :
translated to normal python syntax would be :
Last updated