baby auth
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
-
First, open the host given.
-
First, Try to input simple SQLi payload.
-
Hmm.. let us register account then.
-
Input both username & pass as admin.
-
Let us create account, with both username & password value as
hi. Then login. -
Now to bypass the login page, let us get our cookie by run
document.cookieat the console. -
Copy our cookie then decode it using
base64encoding. -
Now change the username value as admin. Next encode it with
base64then addurlencoding. -
Now copy the cookie and set it as our cookie value.
document.cookie="PHPSESSID-eyJ1c2VybmFtZSI6ImFkbWluIn0"
-
Refresh the page.
-
Got the flag!
Flag
REDACTED
Lessons Learned
- Identify the weakness from source review or fingerprinting first.
- Iterate with incremental payloads instead of guessing.
- Reuse the same pattern in future engagements.