Sitemap
Debmalya Mondal

Debmalya Mondal

I am Devdebug, documenting my learning in Digital Forensics, OSINT, CTF challenges, and my insights into psychology and cognitive science.

Old Sessions | PicoCTF Challenge Writeup

Exploiting Improper Session Management to Gain Unauthorized Access

3 min readMay 26, 2026

--

Press enter or click to view image in full size

Category: Web Exploitation

Difficulty: Easy

Description

Proper session timeout controls are critical for securing user accounts. If a user logs in on a public or shared computer but doesn’t explicitly log out (instead simply closing the browser tab), and session expiration dates are misconfigured, the session may remain active indefinitely.

This then allows an attacker using the same browser later to access the user’s account without needing credentials, exploiting the fact that sessions never expire and remain authenticated.

Your friend tells you to check out a new social media platform he built a few years ago. Although its still under development, he said the site is almost complete. He also mentioned that he hates constantly logging into sites, and so has made his page that ‘once you login, you never have to log-out again’!

Browse here, and find the flag!

Objective

The objective is to identify and exploit improper session management by verifying whether user sessions remain active indefinitely after login, allowing unauthorized access without re-authentication, and retrieving the flag.

Hints

  • Hint 1: Do you know how to use the web inspector?
  • Hint 2: Where are cookies stored?

Walkthrough

After launching the instance, I visited the web page.

Press enter or click to view image in full size

First, I registered a new user on the site,

Get Debmalya Mondal’s stories in your inbox

Join Medium for free to get updates from this writer.

Username:

Password:

Press enter or click to view image in full size

After registering, I logged into the site.

Press enter or click to view image in full size

There, I found a comment mentioning that there was a strange site in the directory. So I navigated to it.

Press enter or click to view image in full size

Here, I found the cookies of logged‑in users; the first one belongs to the admin, and the second one corresponds to my session.

Then, I used Burp Suite to intercept the homepage request and forwarded it to Repeater:

Press enter or click to view image in full size

I modified the session cookie in the request and replaced it with the admin’s session cookie.

Press enter or click to view image in full size
Press enter or click to view image in full size

After modifying the session cookie, I sent the request to the server and received a 200 OK response. In the response tab, I switched to the Render view, where I successfully obtained the flag.

Press enter or click to view image in full size
Press enter or click to view image in full size

FLAG: picoCTF{***_*******_***********_********}

--

--

I am Devdebug, documenting my learning in Digital Forensics, OSINT, CTF challenges, and my insights into psychology and cognitive science.

See more from me