API Security Testing
Modern web applications rely heavily on APIs, which introduce their own unique set of security challenges distinct from traditional web vulnerabilities. You will learn how to discover, map, and test REST and GraphQL APIs for authentication flaws, excessive data exposure, and injection vulnerabilities. API security testing is one of the fastest-growing areas of web application penetration testing.
Learning Objectives — Deep Dive
Each objective below is broken down into plain English so you know exactly what you are learning, why it matters, and what you will be able to do when you are done. Mark each one complete as you work through the lesson.
Find API documentation
Navigate to common API documentation paths on the target: /api/docs, /swagger, /swagger-ui.html, /openapi.json, /api/v1/docs, and /redoc. Swagger UI and OpenAPI specifications are frequently left exposed on production servers, providing a complete map of all API endpoints, parameters, authentication requirements, and expected responses. If no documentation is found at common paths, check the application's JavaScript source files for API endpoint strings using browser developer tools or 'grep -r api src/'. Undocumented APIs are not necessarily secure — they are just harder to find.
Map all API endpoints
Use the discovered documentation or Burp Suite's Spider/Crawler to build a complete inventory of all API endpoints. For each endpoint, record the HTTP method, path, required parameters, authentication requirement, and the type of data it returns or accepts. Pay particular attention to endpoints that accept object IDs as parameters (IDOR candidates), endpoints that return lists of resources (potential data exposure), and endpoints that perform privileged actions (authorization testing targets). A thorough endpoint map is the foundation of a systematic API security assessment.
Test for BOLA
Broken Object Level Authorization (BOLA) is the API equivalent of IDOR and is the most common API vulnerability. For each endpoint that accepts an object ID, test whether you can access objects belonging to other users by substituting their IDs. Use Burp Suite's Intruder to iterate through a range of IDs (1 through 1000) and compare response lengths — a consistent response length for a range of IDs indicates the server is returning data for all of them regardless of ownership. Document any endpoint where you can access another user's data as a Critical or High severity finding.
Test rate limiting
Send rapid repeated requests to authentication endpoints (login, password reset, OTP verification) and check whether the server enforces any rate limiting or account lockout. Use Burp Suite's Intruder with a null payload set and 100 iterations to send 100 login attempts in quick succession. If all 100 requests return the same response without any throttling, 429 Too Many Requests responses, or CAPTCHA challenges, the endpoint lacks rate limiting and is vulnerable to brute force. Also test rate limiting on resource-intensive endpoints such as search and report generation, which can be abused for denial-of-service attacks.