How I Discovered a Private Key Leak on a Company’s Subdomain
A private key was exposed on a company subdomain, likely used for internal server access. An attacker with the key could gain unauthorised access, escalate privileges, or exfiltrate data.
medium.com
Published on medium.com
Finding sensitive information exposed on a company’s infrastructure is always concerning. During a recent security assessment, I encountered a surprising yet critical flaw: a private key was leaked on a company’s subdomain.
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, sensitive files such as private keys were stored on a publicly accessible development or staging subdomain without proper access controls.
Impact
An attacker could gain shell access to servers, escalate privileges, move laterally, and exfiltrate sensitive data, potentially affecting customers.
What the attacker needed
Publicly accessible subdomain; no authentication required
The fix
The company should rotate all potentially affected keys and enforce strict access controls on exposed directories and subdomains.
How it was found
- Perform subdomain enumeration using tools like assetfinder and sublist3r.
- Identify a subdomain that loads a blank page and investigate its endpoints.
- Analyse source code and network traffic with Burp Suite to find the private key.
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 private key is like a secret password that proves your identity to a server. If it is left where anyone can find it, someone else can pretend to be the company and log in. Here, the key was found on a public subdomain, so anyone who looked could use it.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.