Skip to content
Access control Write-up Beginner

How I Found Broken Authentication and Authorization on a Website

The user-creation endpoint accepted requests without any session cookie, allowing an unauthenticated attacker to create a new admin account. Separately, a non-admin user could reach the admin dashboard by navigating directly to its URL, because the application only hid the interface rather than enforcing authorisation on the backend.

nyany032 Follow

Published on medium.com

Hello everyone, long time no see! I was inactive for quite a while (mostly due to laziness ๐Ÿ˜„), but today I want to share a real-world finding from a white-box security test I performed for a company.

Shir0E, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the backend endpoint for creating users lacked an authentication check, and the admin dashboard relied on client-side hiding rather than server-side authorisation.

Impact

An attacker could create their own admin account and gain full control of the admin portal, and a non-admin user could access admin functions; the report notes that obtaining the request information still requires logging in first.

What the attacker needed

White-box access with two admin accounts; ability to intercept and modify requests; a non-admin account for the second issue

The fix

Every backend endpoint should enforce authentication and authorisation independently, rather than relying on hiding UI elements.

How it was found

  1. Log in with a valid admin account and intercept requests.
  2. Create a new admin user through the web interface and capture the request.
  3. Send the request to Repeater, change the username and password, and remove the Cookie header.
  4. Observe that the server still returns HTTP 200 OK, creating the admin account.
  5. As a non-admin user, browse directly to the admin URL fragment and access admin functions.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you log in to a website, your browser sends a small piece of data called a cookie so the server knows who you are. This report found that one important action โ€” creating a new administrator account โ€” still worked even when that cookie was removed, meaning the server never checked who was asking. It also found that a normal user could open the admin page just by typing its address, because the site only hid the link instead of blocking access.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.