Contents

E-CTF - Web - Favourite Website


Web - Favourite Website - writeup

Description

After a long time, Alex tries to visit his favorite website. But nobody thought he would become very unlucky. Visit the website and help him get the flag.

Link: https://wec-ctf-2022-web.herokuapp.com/q2

Writeup

If we refresh the webpage we see there is a cookie that changes everytime i refresh the page.

That cookie is called _gatj

Currently its value is

1
c3RpbGwgY2Fubm90IHNvbHZlIHRoaXMgdGFzaz90aW1lcz0wMDAwMDAwOCZpZD03Yzg3ZjBlOC1hODNiLTQyZDQtYmU1MS1hYWI5MjY5MzRjYzI3

That is base64 and decodes to

1
still cannot solve this task?times=00000008&id=7c87f0e8-a83b-42d4-be51-aab926934cc27

So since the website says You can get the flag when you visit our website for 12893422th time.

We just change the value to

1
task?times=12893422&id=7c87f0e8-a83b-42d4-be51-aab926934cc27

Then we use base64 to encode this string again and we get

1
dGFzaz90aW1lcz0xMjg5MzQyMiZpZD03Yzg3ZjBlOC1hODNiLTQyZDQtYmU1MS1hYWI5MjY5MzRjYzI3

If we now replace the cookies value with that string … lets see what happens

If we now refresh the page after replacing the cookie value we see:

Congrats! You got the flag: CTF{C@@kie$_@re_the_be$t}

So the flag is

1
CTF{C@@kie$_@re_the_be$t}