Buried Treasures in Backups: How .bak Files Handed Me the Keys t
Backup files with .bak extensions were publicly accessible, exposing a GraphQL schema with sensitive queries and database credentials. An attacker could use these to retrieve user data including password hashes and payment card details, and potentially access the production database.
Free link 🎈
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, backup files containing sensitive configuration and schema information were stored in publicly accessible web directories without proper access controls.
Impact
The exposed backups and credentials could allow an attacker to enumerate users, dump hashed passwords, access payment card data, and pivot into the production database.
What the attacker needed
Publicly accessible .bak files; no authentication required
How it was found
- Find exposed .bak files through subdomain and content discovery.
- Download the graphql.bak file to obtain the GraphQL schema.
- Use the schema to query adminViewAllUsers and retrieve user data including password hashes.
- Query searchPayments to retrieve payment card details.
- Extract database credentials from database.bak.
- Use the credentials to access the production database and admin panel.
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 backup file is a copy of a website's code or data that is sometimes left on the server by mistake. Here, files ending in .bak were publicly accessible, and they contained the blueprint of the website's database queries and even a password. This let the researcher ask the website for private information like user details and credit card numbers.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.