Skip to content

What Is Broken Authentication

Alexis edited this page Apr 16, 2020 · 2 revisions

Broken Auth

These types of vulnerabilities can allow a hacker to capture or bypass the authentication methods that are used by your web application, here are some examples

  • User authentication credentials are not protected when stored.
  • Predictable login credentials.
  • Session IDs are exposed in the URL (e.g., URL rewriting).
  • Session IDs are vulnerable to session fixation attacks.
  • Session value does not timeout or does not get invalidated after logout.
  • Session IDs are not rotated after successful login.
  • Passwords, session IDs, and other credentials are sent over unencrypted connections.

The goal of these types of attacks is to take over one or a large amount of accounts or to give the attacker the same privileges as the user being attacked.

Examples

Url Rewriting

Some websites will put the session ID inside the url like this:

   http://example.com/sale/saleitems;jsessionid=2P0OC2JSNDLPSKHCJUN2JV?dest=Hawaii

this is very bad, because an attacker could use this session ID to try and grant privileges to another account that has less privileges than the user associated with the Session ID

Application Timeout is not setup properly or non existent at all

Imagine somebody is using a public computer, the user is done with his session, but instead of logging out he just closes the page. later this day, somebody else might go on the same computer, use the same browser and website and find that the user before him has not logged out, because the user is still authenticated. this person could then proceeed and do malicious things with this person's account such as change his passwords or infos and completely Hijack the account, in the process, possibly steal this user's bank info

Passwords are not hashed and salted when stored inside the database

whenever you store a private information inside a database such as a password, you need to encrypt it, otherwise, if your database gets hacked, the hackers will have access to everyone's password, and that could be very bad. If you know one of your user's password just by looking at it inside the database, your app is not secure

Clone this wiki locally