Explore HackDev

$ writeup

keiione
Nov 9, 2026

HackerDNA - Hack the Cookie: Cookie Poisoning Attack

#hackerdna#ctf

Author: keiione difficulty: Very easy Lab: https://hackerdna.com/labs/hack-the-cookie

  1. open the target and we'll be directed to TechCorp Internal Portal

image

  1. Click Login. Then we'll be directed to the dashboard and logged in as guest/user

image

  1. So we need to be an admin to get the flag. By looking at the challenge name, we need to hack the cookie. So, open devtools and go to 'applicaton' tab and search for 'cookies'.

image

  1. try to inspect the value of 'user_session'. it might be unreadable right?

image

  1. we need to decode that unreadable text using https://www.base64encode.org/ .

image

  1. now it is readable. but how do we get into admin dashboard? change the role value from 'guest' to 'admin'. After that, encode it.

image

  1. Copy the encoded text and replace it in the value section

image

  1. now you're logged in to the admin dashboard :). copy the flag and submit