Authorization attacks
We now have a thorough understanding of the wide array of attacks that can be used on the authentication mechanisms of an API. Let us now turn the focus to the counterpart of authentication: authorization.
Object-level authorization
As a reminder, broken object-level authorization (BOLA) occurs when an API becomes confused about the right to access an object and allows unauthorized access. In Chapter 3, Understanding Common API Vulnerabilities, this is covered in detail in the API1:2019 — Broken object-level authorization section.
Conceptually speaking, BOLA attacks are simple to originate using the following recipe:
- Identify an API operation that takes an object ID as a parameter.
- Create a resource for the first user (call them
user A
). - Confirm that
user A
can access the new resource. - Using a second user (call them
user B
) who does not have access to the new resource, attempt to access the same resource. If you succeed, you...