← Back to Writeups
HTBEasyWeb

baby auth

D3v0o0Nu119/2/20261 min read
#web#htb#easy

baby auth

Platform: HackTheBox | Category: Web | Difficulty: Easy | 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, let's try to input simple SQLi payload.

  3. Hmm.. Let's register account then.

  4. Input both username & pass as admin.

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

  6. Now to bypass the login page, let's 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.