CaSSiNo¶
By observing the source code, we can see that we can input any javascript code in prompt to run it in VM (nodejs module).
The Source Code¶
The main function call in this programm is
This means that whatever input we give the binary, it will run it in a new context, of course, without any filters.The Solution¶
I'm not too familiar with nodejs nor node vm modules so I searched up node vm security
and I found an article on Pwnisher Blog called Sandboxing NodeJS is hard, here is why
. It basically is set up almost identical to this challenge. By modifing the payload a bit I got: