Synthèse
L'article explique pourquoi les approches défensives traditionnelles en sécurité sont insuffisantes pour protéger les APIs, notamment contre les attaques de broken object level authorization (BOLA) qui exploitent des failles logiques plutôt que syntaxiques. Contrairement aux vulnérabilités web classiques (SQL injection, XSS) qui présentent des signatures détectables, les failles d'autorisation API passent inaperçues aux WAF standards car les requêtes malveillantes respectent la syntaxe et l'authentification. La détection efficace nécessite une analyse passive du trafic pour identifier les anomalies comportementales et les écarts par rapport aux patterns d'utilisation normaux.
In the web application world, vulnerabilities often look like syntax errors. A SQL injection attempt looks like code where data should be. A cross-site scripting (XSS) attack looks like a script tag in a form field. These have signatures. API vulnerabilities are different.
To illustrate, let’s imagine a food delivery mobile app that communicates solely with an API on the backend. Let’s take the orders endpoint: Endpoint Definition: /api/v1/orders In a broken authorization attack like BOLA, User A (the attacker) requests to update the delivery address of a paid-for order belonging to User B (the victim). The attacker simply inserts User B’s {order_id} in the PATCH request. Here is what that request looks like, with ‘8821’ as User B’s order ID. Notice that User A is fully authenticated with their own valid token: The request headers are valid.
The authentication token is valid. The schema is correct. To a standard WAF, this request looks perfect. A bot management offering may even be fooled if a human is manually sending the attack requests. User A will now get B’s food delivered to them!
The vulnerability exists because the API endpoint fails to validate if User A actually has permission to view or update user B’s data. This is a failure of logic, not syntax. To fix this, the API developer could implement a simple check: if (order. userID ! = user.
ID) throw Unauthorized; You can detect these types of vulnerabilities by actively sending API test traffic or passively listening to existing API traffic. Finding these vulnerabilities through passive scanning requires context. Last year we launched BOLA vulnerability detection for API Shield. This detection automatically finds these vulnerabilities by passively scanning customer traffic for usage anomalies.
Source originale
cloudflare.com