Field manual · BAC · Chapter 7
Race Conditions as BAC
Vertical via timing
Chapter 7: race conditions as BAC: vertical via timing
Section titled “Chapter 7: race conditions as BAC: vertical via timing”Why care: a role check that is correct at rest can still be beaten by firing requests faster than the write that enforces it. Sometimes the authorization is there, but only eventually:
7.1 Role-change TOCTOU (time-of-check/time-of-use)
Section titled “7.1 Role-change TOCTOU (time-of-check/time-of-use)”1. Open two parallel browser windows: one as a standard user, one mid-upgrade2. The standard-user account clicks "Upgrade to admin" and immediately fires N parallel requests to /admin/users in the same instant3. A request lands before the role-write commits, so it is processed as "already admin"Turbo Intruder, or simplest version: fire 30 parallel curls with &:
for i in $(seq 30); do curl -s -o /dev/null -w "%{http_code}\n" \ -b "$ADMINISH_SESSION" https://target.com/admin/users & done7.2 Downgrade-race (downgrade-detection bug)
Section titled “7.2 Downgrade-race (downgrade-detection bug)”Admin gets demoted. Between "admin" and "demoted" — the app kills active sessions... eventually.If old admin-session tokens work for a window (or forever) → persistent privileged accessafter role loss. This is a *report-worthy* category: "former employees retain admin access" is a consultant's favorite finding.These are 30-curl-loop demonstrations. The verified single-packet procedure wins tight races. It uses HTTP/2 request concatenation and Turbo Intruder’s race engine. See the race-condition chapter in Bug Hunting for Beginners.
Next step: Chapter 8 rounds up the exotic biomes where BAC hides, debug flags, mobile-only APIs, and multi-tenant boundaries.
Open local graph around this page
Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.