Web Security

Authentication and Access Control

Web applications give different users different rights. An ordinary account might be allowed to edit its own profile while an administrator can manage other accounts. Authentication verifies a claimed identity, and access control enforces what that identity is allowed to do. Those limits have to hold even when the user making the request would much rather have someone else's privileges!

Those decisions belong on the server, where they have to hold for the requests a client actually sends. A browser can ask for a different resource or claim a different identity, and a hidden button does nothing to stop that request from arriving. If the application trusts the claim or misses a permission check, an ordinary user can gain access that was never meant for them.

2 challenges

Authentication Bypass

CHALLENGE 01

To Whom It May Concern

— solves

Your username identifies you within an application. When you enter it at login, you're claiming that identity, and the application needs evidence before it believes you. Authentication is the process of verifying that claim, commonly by checking the password associated with the account. Once your identity has been verified, the application can decide what you're allowed to see and do.

The password check is only the start. Your browser makes more HTTP requests as you use the site, and those requests need to remain tied to the identity you proved at login. Applications commonly maintain a session for this purpose. One approach is to issue an unpredictable identifier after login and store its association with your account on the server. Later requests carry that identifier so the application can look up the authenticated user.

A developer might assume that anyone requesting a protected page has already passed through the login form. Unfortunately for that developer, your browser has no obligation to follow the intended path! If the page accepts whatever identity the request claims, the password check can be perfectly correct and still fail to protect the account. This is an authentication bypass, and it lets an attacker gain access without ever learning the victim's password.

Sign in at https://challenge.internal/ with username hacker and password 1337. Follow the requests after login and read /challenge/server to investigate how the application identifies you. Your goal is to read the flag in the admin mailbox.