Skip to content
Access control Write-up Intermediate

Storing Passwords - A Journey Of Common Pitfalls

The STARFACE PBX web interface allowed authentication using the stored password hash instead of the cleartext password. An attacker who obtained the password hash (e.g., from a database backup) could log in without cracking it.

RedTeam Pentesting Follow

Published on blog.redteam-pentesting.de

As pentesters, we regularly see creative ways of handling authentication and almost as often we see the pitfalls that come along with these unconventional ways. For instance, we recently discovered a vulnerability in the web interface of STARFACE PBX allowing login using the password hash rather than the cleartext…

RedTeam Pentesting GmbH, on blog.redteam-pentesting.de

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

The server compared a client-supplied value derived from the stored password hash against a hash of the username, salt, and stored hash, so knowledge of the stored hash alone was sufficient for authentication.

Impact

An attacker with access to the password hashes (e.g., via database backup or SQL injection) could authenticate to the web interface and REST API without cracking the hashes; the fix in version 8.0.0.11 only encrypts the hashes, so an attacker who also obtains the encryption key can still exploit it.

What the attacker needed

Access to the password hash (e.g., database backup); network access to the web interface

The fix

The vulnerability was partially fixed in version 8.0.0.11 by encrypting the stored password hashes, but a full solution is still planned.

How it was found

  1. Obtain high-privileged SSH access to the STARFACE system.
  2. Extract the web application users' password hashes from the database.
  3. Decompile the Java archive to analyse the login code.
  4. Identify that the secret parameter is a SHA-512 hash of username, salt, and stored password hash.
  5. Craft an HTTP request with the correct secret value using the password hash.
  6. Use the Python script to log in and obtain a session ID and API token.

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.

Normally, a website stores a scrambled version of your password (a hash) so that even if its database is stolen, the thief cannot easily log in as you. Here, the login process accepted that scrambled version directly as if it were your real password. So anyone who stole the scrambled version could log in without needing to unscramble it.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by RedTeam Pentesting

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.