How i got admin panel without opening the target
The author found hardcoded API keys in a GitHub organisation's repositories by searching commit history for custom variable names and base64-encoded secrets. Using a leaked API key for a debugging platform, they created an admin user and logged in through the public login page.
Published on thesafdari.medium.com
Hi guys, it’s me Milad i come back with another interesting finding.As you may confused from tittle of this article and may ask how it was possible ? but just let me just show you my magic :)
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 organisation's developers committed sensitive API keys to public GitHub repositories, including base64-encoded secrets, and the debugging platform's API allowed user creation with admin privileges using only that key.
Impact
An attacker could gain administrative access to the debugging platform, potentially viewing or controlling other users' data.
What the attacker needed
Organisation has public GitHub repositories; leaked API key present in commit history; access to the debugging platform's API
How it was found
- Downloaded all repositories of the organisation using the public GitHub API.
- Ran a bash loop to extract every commit from each repository's git log and show the changes.
- Read through the commit logs to learn the developer's coding patterns.
- Found secrets stored in variables named after platforms and random strings.
- Decoded base64-encoded secrets to find an authentication key.
- Used the leaked API key to create an admin user on the debugging platform and logged in via the public login page.
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.
Developers sometimes leave secret passwords or keys inside code they upload to GitHub. If someone finds those keys, they can use them to log in to the services those keys belong to, sometimes as an administrator. This report shows how one researcher searched old code changes to find such keys.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.