The Marketplace
Last updated
Last updated
Room Link: https://tryhackme.com/room/marketplace
Kali
Kali
Kali
Kali
I tried updating the token it didn't work
Next we're going to try to steal the JWT from another user.
Kali
Browser
This was annoying because if I went to my posts it wouldn't work so I went to Jakes post and changed the number from 2 to 6 to get to the report page. Then just clicked the report button
we got a token from a user that isn't us
We can see it is from Michael who is an admin.
Sent again but this time just forwarded the request so we could see what that script was doing
The script was printing the flag
This wasn't working before but after next time I went to this box tried I could just update the cookie from the browser and it worked.
Brower cookie
We add a order by and increase the number until we get an error to reveal how many fields there are.
After 5 it give us an error so we know there are four fields
We do a union select, first to try to show our 1s which isn't working because the first part of the statement runs successfully so theres no where to put our info
To work around this we make the userid as 0 which probably doesn't exist and we can start seeing our 1s
Get Version
Get Database
Get tables
Get All tables by concat
Get Columns for table users
Get Columns for table items
Get Columns for table messages
Get Columns for table messages
Get usernames and passwords. The passwords aren't too useful at this point but now we have some usernames.
Kali
Exploit: https://gtfobins.github.io/gtfobins/tar/
Jake can run a backup script as michael. The script is using a wildcard which we manipulate.
We can trick the script to run this to get a shell by making empty files with similar names
Victim
shell.sh
Victim
Victim(micheal)
michael is part of the docker group so it appears we're in a pod
There a few images to test from. I just ran the last command above and changes the image name until it worked. Exploit worked with nginx and mysql images as well.