Skip to content
Info disclosure Write-up Beginner

Finding hidden gems vol. 3: quick win with .sh file

A publicly accessible shell script on a WordPress blog contained plaintext admin credentials. The attacker could log in to the WordPress admin panel with full administrative privileges.

Mateusz Olejarka Follow

Published on medium.com

I observed that some application deployment’s automation is done by the use of shell scripts, mostly files with .sh extensions.

Mateusz Olejarka, 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 deployment script was placed in the web root and contained hardcoded admin credentials.

Impact

An attacker could gain full administrative access to the WordPress blog.

What the attacker needed

Publicly accessible shell script; Script contains admin credentials

How it was found

  1. Search for common shell script filenames on the target site.
  2. Find an install.sh file containing plaintext WordPress admin credentials.
  3. Open the WordPress admin login page and enter the credentials.
  4. Successfully log in and confirm admin privileges.

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 shell script is a file that runs commands on a server. This one was left in a public folder and included the username and password for the blog's admin area. Anyone who found the file could log in as the site administrator.

What is Info disclosure?

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

More by Mateusz Olejarka

View all

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