HackTheBoo
Cursed Secret Party
You’ve just received an invitation to a party. Authorities have reported that the party is cursed, and the guests are trapped in a never-ending unsolvable murder mystery party. Can you investigate further and try to save everyone?
Looking through the provided source code, we see a bot.js
file that reads the flag.txt file.
The visit
function opens a browser page and sets a JWT
token as a cookie. The flag is passed in said token. So we need to steal the bot’s cookie to get the flag.
After the bot sets the cookie, it visits the /admin
endpoint waits 5 seconds, then deletes all the content.
In the index.js file, we notice some definitions set for the CSP.
We noticed this earlier in our Response as well:
After a little bit of research about CSP and XSS, I found out in the CSP evaluator :
We can host an xss.js
file on a GH repository and add something like alert(1). We can finally trigger the alert, but we need to cookie.
we need to create a script tag that points to that repository and execute a “query” to our ngrok.
Finally, we got it:
We got the cookie. In the JWTHelper.js
file, we see how the JWT token is signed. It uses HS256 with a big random hex string.
Finally, we decoded our token using jwt.io
.
The flag :
Evaluation Deck
A powerful demon has sent one of his ghost generals into our world to ruin the fun of Halloween. The ghost can only be defeated by luck. Are you lucky enough to draw the right cards to defeat him and save this Halloween?
We are given the source code for the website, after reading some of the code, I found an API that features an interesting method that supposedly calculates the ghost's health (in the website) from the given parameters.
However, they are using Python’s compile
and exec
function, which can be very dangerous when executed from unsanitized user input.
We can control all the parameters, but current_health
and attack_power
are converted to int and that limits us to passing only numbers.
That leaves us with operator
that needs to be added to two numbers. So I tried to find a way to convert the flag into a number which can then be converted back into the flag itself.
I ended up converting the flag into ASCII
Unicode using the following function :
So the final payload is to be sent as a POST request to api:
Then I got the result in ASCII Unicode, so I converted it back to characters using the following function :
The Flag:
Juggling Facts
An organization seems to possess knowledge of the true nature of pumpkins. Can you find out what they honestly know and uncover this centuries-long secret once and for all?
When I press Secret Facts
it shows : Secrets can only be accessed by admin
Since this challenge’s name is Juggling Facts, I’ll google php juggling.
It seems like IndexController.php
is vulnerable:
The first if statement is NOT vulnerable, as it’s using strict comparison (===
, !==
). So, we have to parse the type POST
parameter.
So the final payload to be sent as a POST request to API:
We got the flag:
Spookifier⌗
There’s a new trend of an application that generates a spooky name for you. Users of that application later discovered that their real names were also magically changed, causing havoc in their life. Could you help bring down this application?
The first thing I did was try Server Side Template Injection, which allows RCE. Even if you are not sure from the source code whether it is vulnerable, you could try fuzzing in a few inputs. I tried {{5*5}}
, {5*5}
${5*5}
and found that ${5*5}
worked to display 25 on the webpage!
Perfect, now all we need to do is to read the flag with the payload ${open("/flag.txt").read()}
.
The Flag:
Last updated