Skip to content
Info disclosure Write-up Beginner

The File They Forgot to Delete

A backup source file was left in a publicly listable directory and contained a hardcoded database password. An attacker could download the file and read the password to solve the lab.

guyani Follow

Published on medium.com

Lab 3 of my Information Disclosure series. No payload.

morgan_hack, on 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 server served backup files and enabled directory listing, while a secret was hardcoded in source code.

What the attacker needed

None

The fix

Backup files should not be served from production, directory listing should be disabled, and secrets should not be hardcoded.

How it was found

  1. Read /robots.txt to find the /backup folder.
  2. Open the /backup directory and see a directory listing.
  3. Download the ProductTemplate.java.bak file.
  4. Read the database password from the source code.
  5. Submit the password as the solution.

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 developer saved a copy of a source file with a .bak ending and forgot to remove it from the live website. The server also let anyone list the folder contents, so the file could be downloaded. That file had a database password written directly inside it, which anyone could read.

What is Info disclosure?

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

More by guyani

View all

6 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.