OWASP Hunting
Authentication & Authorization

Authentication Bypass

Authentication bypass techniques exploit logical flaws, parameter manipulation, or weak mechanisms to gain access without valid credentials.

These payloads are for authorized testing only — systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.

What it is

Authentication bypass vulnerabilities allow an attacker to gain access to a system without providing valid credentials. These vulnerabilities arise from flawed authentication logic, improper session management, weak authentication mechanisms, or parameter manipulation. Common vectors include header injection, token manipulation, default credentials, and multi-factor authentication bypasses.

Attack Vectors

  • Login forms with flawed server-side validation
  • JWT token validation
  • Password reset flows
  • Multi-factor authentication mechanisms
  • OAuth and SSO integrations
  • Session management systems

Testing Methodology

  1. Test with SQL injection in username/password fields
  2. Manipulate authorization headers (X-Forwarded-For: 127.0.0.1)
  3. Test with empty/null values in required authentication fields
  4. Attempt to bypass MFA with response manipulation
  5. Try common default credentials for the identified platform
  6. Test forced browsing to authenticated endpoints without a session

Payloads

Reference payloads for authorized testing. Always verify you have permission before use.

Header-Based Bypass
X-Forwarded-For: 127.0.0.1X-Original-IP: 127.0.0.1X-Remote-IP: 127.0.0.1X-Client-IP: 127.0.0.1X-Host: localhostX-Custom-IP-Authorization: 127.0.0.1
Parameter Manipulation
admin=trueisAdmin=1role=adminauthenticated=trueaccess_level=0
Response Manipulation (MFA Bypass)
{"success": true, "mfa_required": false}{"verified": true}
Default Credentials
admin:adminadmin:passwordadmin:123456root:roottest:test

Indicators of Vulnerability

  • Successful authentication without valid credentials
  • Access to authenticated pages without a valid session
  • Admin functionality accessible without admin credentials

Detection Guidance

Implement server-side session validation on every protected route. Monitor for authentication requests with unusual header patterns. Alert on repeated authentication attempts.

Mitigation & Remediation

  • Implement server-side authentication checks on every protected endpoint
  • Never trust client-supplied authentication state
  • Use secure session management with server-side validation
  • Implement proper MFA with server-side state verification
  • Enforce account lockout after repeated failed attempts

References

Responsible Use

All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.

  • Systems and applications you own
  • Authorized penetration testing engagements
  • Bug bounty programs with defined scope
  • Educational lab environments (DVWA, WebGoat, HackTheBox)