Skip to content
Info disclosure Write-up Beginner

How i was able to dump SqlDB | Simple bug

A directory-listing misconfiguration exposed template files and a backup archive containing the application's PHP source, which revealed a database-dump action and a SQL authentication bypass on the login page. An attacker could read the source code, dump the SQL database, and bypass login authentication.

clever idi0t Follow

Published on clever-idi0t.com

Hello everybody i’m bug hunter from Yemen and i’m 17 … this’s my first writeup so please ignore any mistakes .

clever idi0t, on clever-idi0t.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 directory listing was left enabled on the login directory, exposing template files and a backup archive of the application source, which revealed a database-dump action and a SQL authentication bypass.

Impact

An attacker could download the application source, dump the SQL database, and bypass login authentication.

What the attacker needed

Access to the login page; directory listing enabled

How it was found

  1. Browse to the login page of the target subdomain.
  2. Run directory brute-forcing against the login directory and find directory listing is enabled.
  3. Find the admin template directory and open the database backup template file.
  4. Notice the template references a database dump action.
  5. Find the update directory and download the backup archive containing the PHP source.
  6. Read the source and discover a SQL authentication bypass in the login page.

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 web server can be set to show a list of every file in a folder, like leaving a filing cabinet open. Here that exposed a backup archive of the site's code, and reading the code showed a hidden feature that dumps the whole database and a flaw that lets someone log in without a valid password.

What is Info disclosure?

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

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.