← Back to Writeups
HTBN/AWeb

baby auth

XESXOR8/23/20261 min read
#web#htb#n/a

baby auth

Platform: HackTheBox | Category: Web | Difficulty: N/A | Author: D3v0o0Nu11 | Date: 2026-02-10

Description

Who needs session integrity these days?

Solution Approach

Core idea: Identify the weakness from source review or fingerprinting first. Iterate with incremental payloads instead of guessing.

Steps

  1. First, open the host given.

  2. First, Try to input simple SQLi payload.

  3. Hmm.. let us register account then.

  4. Input both username & pass as admin.

  5. Let us create account, with both username & password value as hi. Then login.

  6. Now to bypass the login page, let us get our cookie by run document.cookie at the console.

  7. Copy our cookie then decode it using base64 encoding.

  8. Now change the username value as admin. Next encode it with base64 then add urlencoding.

  9. Now copy the cookie and set it as our cookie value.

document.cookie="PHPSESSID-eyJ1c2VybmFtZSI6ImFkbWluIn0" 
  1. Refresh the page.

  2. Got the flag!

Flag

REDACTED

Lessons Learned

  1. Identify the weakness from source review or fingerprinting first.
  2. Iterate with incremental payloads instead of guessing.
  3. Reuse the same pattern in future engagements.