Skip to content
Info disclosure Write-up Intermediate

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.

iski Follow

Published on infosecwriteups.com

Free link 🎈

Iski, on infosecwriteups.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, 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

  1. Find exposed .bak files through subdomain and content discovery.
  2. Download the graphql.bak file to obtain the GraphQL schema.
  3. Use the schema to query adminViewAllUsers and retrieve user data including password hashes.
  4. Query searchPayments to retrieve payment card details.
  5. Extract database credentials from database.bak.
  6. 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.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.