← All scrolls
巻 rank
Darkest Hour CTF · Crypto

Cookie: the crypto is in the session

A plain register and login page, where the real challenge is the session cookie.

16 Feb 20251 min read
#cookies#encoding#cyberchef

Description

This is a cryptography task I swear …

Challenge Link

Author: Nedim
So we’re just given a register and a login page , after making an account and trying to login to it we have a look at the cookie there Access Denied

Let’s try to decode it with cyberchef

CyberChef

Well there is nothing to see here , but the thing is we must notice that the cookie changes everytime when you change the username . It’s like the cookie depends somehow on the username . After some thinking i noticed that the operation occuring is a XOR operation between the username and the cookie .

Time to get the key !

CyberChef2 The XOR operation is occuring in the middle of the cookie , so the key here is EAXYXOR ! We’re almost there , now let’s decode the cookie with that key . CyberChef3 We got something really interesting !! a boolean logic variable named isadmin set to 0 and the username ! So let’s try changing isadmin to 1 and the username name to admin , XOR it again with the same key , and put it back in the website ! CyberChef4

AND HERE IS OUR FLAG !! This challenge got few solves ( 2 or 3 ) meanwhile it wasn’t that hard as an idea

FLAG