Skip to content
Access control Write-up Advanced

How I was decrypting the traffic and getting from low privilege user to full admin access

The application encrypted traffic client-side, and the author reverse-engineered the JavaScript to decrypt and re-encrypt requests. A low-privilege user could then add permission keys such as VIEWUSERS to the permissions section of the response, gaining full admin access.

sadc0d3r Follow

Published on sadc0d3r.medium.com

During the test and use burp as usual, I found that all information sent or received is encrypted, as shown.

Ahmed Rabeaa Mosaa (SadC0d3r), on sadc0d3r.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 trusted client-supplied permission data in the response and did not enforce authorisation checks on the server side.

What the attacker needed

A low-privilege account; ability to intercept and modify traffic; reverse-engineering the client-side crypto

How it was found

  1. Observe that requests and responses are encrypted in Burp.
  2. Debug the JavaScript to find the client-side encrypt and decrypt functions.
  3. Write a PHP script to encrypt and decrypt traffic.
  4. Log in as a low-privilege user and try to access the users section.
  5. Find the permissions section in the login response and the VIEWUSERS key in an error message.
  6. Encrypt the permission keys and add them to the permissions section of the response.

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.

The website scrambled data in the browser before sending it, so it looked safe, but the scrambling code was also in the browser. The author found that code, learned how to unscramble and re-scramble messages, and then changed a list of permissions in a server response. Because the server trusted that list, the normal user was treated as an admin.

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.