From NA to P1, How i was able to get access to a Bank Admin Panel
A JavaScript file exposed a hardcoded Basic authorization header that granted access to a WordPress API. The attacker used this header to create a new administrator user via the WordPress REST API, bypassing the need for existing credentials and 2FA.
Published on medium.com
In this write-up, I’ll walk you through one of my findings that allowed me to exploit a hardcoded Basic header to obtain admin-level privileges.
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 a hardcoded Basic authentication header was embedded in client-side JavaScript, exposing credentials that allowed access to the WordPress REST API with sufficient privileges to create users.
Impact
An attacker could create an administrator account and gain full control of the WordPress site, potentially leading to further compromise.
What the attacker needed
Access to the public JavaScript file; No authentication required
How it was found
- Collected subdomains and filtered live ones using httpx.
- Performed manual dorking and reviewed Burp Suite traffic.
- Found a JavaScript file referencing an API call with a Basic authorization header.
- Tested the header against a WordPress endpoint, receiving 200 OK with information.
- Accessed /dir/wp-login.php and tried the credentials, but 2FA was enabled.
- Used the header to send a POST request to /wp-json/wp/v2/users/ to create an administrator user.
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.
A website's code accidentally included a secret username and password (a 'Basic header') that let anyone access its backend. The attacker found this secret and used it to create a new admin account, giving them full control of the site.
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.