One way hackers stole API keys, Passwords, Tokens and Secrets.
The article describes how hardcoded credentials and API keys left in public repositories or application memory can be discovered by attackers, who could then use those keys to access services and cause financial or operational harm. It also explains heap inspection, where sensitive strings remain in memory and can be extracted from a memory dump.
medium.com
Published on medium.com
This is great to be on your toolset as well, target of my write-up is for our beloved Developers, Application Security Engineers, Penetration Tester, Cybersecurity Consultant etc…
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 root cause is the practice of hardcoding sensitive credentials in source code and failing to protect them in memory, combined with insufficient security review during development.
Impact
Attackers could use exposed API keys to access services without authorization, potentially messing up analytics, decreasing revenue, or causing the key owner to pay for services used by others; heap inspection could allow anyone with access to the application to steal sensitive information.
What the attacker needed
Publicly accessible code repositories; ability to run and dump memory of an application
The fix
The article recommends avoiding hardcoded passwords by using secure storage, encryption, dynamic secrets, and environment isolation, and preventing heap inspection by zeroing out sensitive data, minimizing memory exposure, implementing access controls, using secure libraries, and employing…
How it was found
- Use Google Dorks or a tool like grep.app to search public repositories for patterns matching API keys.
- Identify exposed API keys, such as those starting with 'AIza' for Google APIs.
- Use the exposed keys to access services without creating an account or paying.
- For heap inspection, run an application that contains hardcoded strings.
- Open Task Manager and create a memory dump of the running application.
- Inspect the memory dump to find the hardcoded sensitive data.
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.
This article explains that developers sometimes leave passwords or API keys directly in code or in public places like GitHub. Anyone can find these keys using search tools, and then use them to access services without permission, potentially costing the owner money or disrupting their service. It also shows how secrets can be found in a computer's memory if not handled carefully.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.