Weak Authentication _

Weak Authentication Vulnerability Demo

Weak Authentication

Weak authentication vulnerabilities occur when applications use insecure methods to verify user identity. This includes hardcoded credentials, weak password policies, or client-side authentication.

Try to find the admin password by examining the source code.

The password is hardcoded in the JavaScript file (script.js):

const secretPass = 'admin123';

This demonstrates why authentication should never be performed client-side, as anyone can view the source code and find hardcoded credentials.

Admin Panel Login

How to Prevent Weak Authentication

To prevent weak authentication vulnerabilities:

  • Never store credentials in client-side code
  • Implement proper server-side authentication
  • Use strong password policies
  • Implement multi-factor authentication
  • Use secure session management