Concepts / Web access and file flaws

Web access and file flaws

Broken access control

Also called authorisation bypass, privilege escalation (web), forced browsing

An access check that rests on something the client controls, so an attacker simply sets it and walks past.

Never trust a role the client sends
Never trust a role the client sends

Anyone can type a cookie that says role=admin. A role the server looks up from its own session table cannot be changed by the client.

Broken access control is an access check an attacker can walk past, usually because it rests on something the client sends: admitting anyone who sends Cookie: role=admin, hiding only an admin page's link, trusting an isAdmin=true field. Cookies, headers, hidden fields and the URL are all attacker-controlled. [[idor|IDOR]] is the per-object case. The fix: decide on the server from a session it issued, deny by default, check every request.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab