Skip to content
Access control Write-up Intermediate

Websocket response manipulation leads to access admin panel (Arab

The login WebSocket request carried a user-controlled role parameter set to visitor, and the server trusted it. By rewriting that value to admin on every WebSocket message, an attacker could log in with a normal account and gain full administrative control.

rood Follow

Published on ro0od.medium.com

وأنا أشتغل على هدف في برنا� ج باونتي، وصلت ل� وقع فرعي شكله عادي، بس بعد � ا تصفحته شوي لاحظت إن فيه نظا� صلاحيات، يعني ال� ستخد� ين � و كله� نفس الشي.

rood, on ro0od.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 server took the user's role from a client-supplied WebSocket login parameter instead of looking up the account's real role on the server side.

Impact

The author could raise a normal account to administrator and then reach all user data, delete accounts, edit content and run administrative actions, giving full control of the site.

What the attacker needed

A free ordinary account; ability to intercept WebSocket traffic

How it was found

  1. Browse the company's other domain and find its login page.
  2. Inspect the login request and notice it is sent over WebSocket with a role parameter set to visitor.
  3. Read the main JavaScript file to find the other role values: visitor, manager and admin.
  4. Set up a Burp Suite Match & Replace rule that swaps the visitor role for admin on every WebSocket message.
  5. Log in with an ordinary account and observe that the session is granted administrator rights.

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, your browser sends your details to the server. Here the site used a WebSocket, a two-way connection that stays open, instead of a normal request-and-response page load. The login message also included a field saying what kind of user you are, and the server simply believed whatever value arrived, so changing it to the highest level gave the author administrator rights.

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.

More by rood

View all

1 more disclosed report, best first.

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.