Bypassing Authentication Using Javascript Debugger.
The login page performed authentication checks in client-side JavaScript, so an attacker could pause execution in the browser debugger and change the comparison value to bypass the check. This revealed more information than intended.
Published on mohitdabas.wordpress.com
So I was checking a website and tried to test it for flaws just a general thing nothing new. I targeted the login mechanism.
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 application relied on client-side JavaScript to decide whether authentication succeeded, instead of enforcing the check on the server.
Impact
An attacker could bypass the client-side login check and view information that should have required authentication.
What the attacker needed
Access to the login page; browser developer tools
How it was found
- Open the login page and observe that clicking login triggers JavaScript events.
- Search the site's JavaScript files and find the authentication function.
- Set a breakpoint on the data variable comparison.
- Modify the data value in the browser console.
- Continue execution and observe additional information being returned.
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.
Some websites check your password or login status inside the browser itself, using JavaScript code that runs on your computer. Because that code is visible and editable, a person can pause it with the browser's developer tools and change the values it compares. Here the author did exactly that and got past the login check.
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.