Request replay authorization diff
Replay each API request with a second user’s session and compare the responses line by line to find the endpoints that skip an ownership or role check.
- Interactive lab
- Beginner
- 5 graded steps
- 0 of 5 solved
Your goal
Your goalFind the endpoints that answer a regular member exactly as they answer an admin, and say what each bug is.
You captured five API requests while signed in as Alice Moreno, an admin. Replay each one with the session of Bob Okafor, a regular member, and compare the two responses.
An identical response to an owner-only or admin-only request means the server never checked who was asking.
What’s on screen
- Captured as Alice
- the list of five API requests on the left, recorded while Alice, an admin, was signed in.
- Replay as Bob
- the button under the list. It sends the selected request again with Bob’s session cookie.
- Responses
- the two boxes on the right, Alice’s reply and Bob’s reply side by side.
- diff
- the box at the bottom. It compares the two replies line by line, like the diff command.
- Walkthrough
- the numbered path beside the workbench (below it on a phone). Each step says what to do and what you should see. Hints open one at a time.
Words to know
- API
- application programming interface, how programs talk to a service
Captured as Alice
GET /api/me HTTP/1.1
Host: api.contoso.example
Cookie: sess=al1ce-7f3a
HTTP/1.1 200 OK
{
"id": "u-100",
"name": "Alice Moreno",
"role": "admin"
}Not replayed yet.
Read first
More in Web and API security
The whole walkthrough
Every step in order: 296 words, about 2 min. It gives away every answer, so try the steps first.