Skip to content
Leaked secrets Write-up Intermediate

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.

thesafdari Follow

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 :)

Milad Safdari (Eulex), on thesafdari.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 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

  1. Downloaded all repositories of the organisation using the public GitHub API.
  2. Ran a bash loop to extract every commit from each repository's git log and show the changes.
  3. Read through the commit logs to learn the developer's coding patterns.
  4. Found secrets stored in variables named after platforms and random strings.
  5. Decoded base64-encoded secrets to find an authentication key.
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.